comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"not in block window"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import './IRewardDistributionRecipient.sol'; import './IMintable.sol'; import './Oracle.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; contract MiningV3 is Ownable { using SafeMath for uint256; IUniswapV2Pair public pair; IMintable public token; IRewardDistributionRecipient public pool; Oracle public oracle; uint public constant DEV_REWARD = 10e18; uint public constant MINING_REWARD = 100e18; uint public constant BLOCK_TIME = 10 minutes; address public dev; uint public priceHighest; uint public blockTimestampLast; uint Xe18 = 1e18; constructor(address _pair, address _token, address _pool, address _oracle, address _dev) public { } modifier isInBlockWindow() { require(<FILL_ME>) _; } function mine() isInBlockWindow public { } function newHighest() public view returns (bool) { } function inBlockWindow() public view returns (bool){ } function priceLast() public view returns (uint) { } function setDev(address _dev) public onlyOwner { } }
inBlockWindow(),"not in block window"
52,108
inBlockWindow()
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { require(<FILL_ME>) require(withinRange(msg.value)); return true; } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function getTokenAddress() onlyOwner external view returns (address) { } }
withinCap(msg.value)
52,285
withinCap(msg.value)
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { require(withinCap(msg.value)); require(<FILL_ME>) return true; } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function getTokenAddress() onlyOwner external view returns (address) { } }
withinRange(msg.value)
52,285
withinRange(msg.value)
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { require(<FILL_ME>) return true; } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function getTokenAddress() onlyOwner external view returns (address) { } }
weiRaised.add(weiAmount)<=cap
52,285
weiRaised.add(weiAmount)<=cap
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { require(hasEnded()); require(<FILL_ME>) token.burnTokens(icoSupply); totalSupply = totalSupply.sub(publicSupply); preicoSupply = 0; icoSupply = 0; publicSupply = 0; checkBurnTokens = true; return true; } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function getTokenAddress() onlyOwner external view returns (address) { } }
!checkBurnTokens
52,285
!checkBurnTokens
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { require(!checkBurnTokens); require(<FILL_ME>) for (uint256 i = 0; i < recipients.length; i++) { if (partnershipsSupply >= values[i]) { partnershipsSupply = partnershipsSupply.sub(values[i]); token.mint(recipients[i], values[i]); } } } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function getTokenAddress() onlyOwner external view returns (address) { } }
(reserveTimeLock<now)
52,285
(reserveTimeLock<now)
null
contract Crowdsale is Ownable, Pausable, Whitelisted { using SafeMath for uint256; MintableToken public token; uint256 public minPurchase; uint256 public maxPurchase; uint256 public investorStartTime; uint256 public investorEndTime; uint256 public preStartTime; uint256 public preEndTime; uint256 public ICOstartTime; uint256 public ICOEndTime; uint256 public preICOBonus; uint256 public firstWeekBonus; uint256 public secondWeekBonus; uint256 public thirdWeekBonus; uint256 public forthWeekBonus; uint256 public flashSaleStartTime; uint256 public flashSaleEndTime; uint256 public flashSaleBonus; uint256 public rate; uint256 public weiRaised; uint256 public weekOne; uint256 public weekTwo; uint256 public weekThree; uint256 public weekForth; uint256 public totalSupply = 2500000000E18; uint256 public preicoSupply = totalSupply.div(100).mul(30); uint256 public icoSupply = totalSupply.div(100).mul(30); uint256 public bountySupply = totalSupply.div(100).mul(5); uint256 public teamSupply = totalSupply.div(100).mul(20); uint256 public reserveSupply = totalSupply.div(100).mul(5); uint256 public partnershipsSupply = totalSupply.div(100).mul(10); uint256 public publicSupply = preicoSupply.add(icoSupply); uint256 public teamTimeLock; uint256 public partnershipsTimeLock; uint256 public reserveTimeLock; uint256 public cap; bool public checkBurnTokens; bool public upgradeICOSupply; event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); RefundVault public vault; constructor(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap) public { } function createTokenContract() internal returns (MintableToken) { } function () external payable { } function buyTokens(address beneficiary) whenNotPaused onlyWhitelisted public payable { } function validPurchase() internal returns (bool) { } function withinRange(uint256 weiAmount) internal view returns (bool) { } function withinCap(uint256 weiAmount) internal view returns (bool) { } function hasEnded() public view returns (bool) { } function hardCapReached() public view returns (bool) { } function burnToken() onlyOwner external returns (bool) { } function updateDates(uint256 _preStartTime,uint256 _preEndTime,uint256 _ICOstartTime,uint256 _ICOEndTime) onlyOwner external { } function flashSale(uint256 _flashSaleStartTime, uint256 _flashSaleEndTime, uint256 _flashSaleBonus) onlyOwner external { } function updateInvestorDates(uint256 _investorStartTime, uint256 _investorEndTime) onlyOwner external { } function updateMinMaxInvestment(uint256 _minPurchase, uint256 _maxPurchase) onlyOwner external { } function transferFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function acceptEther() onlyOwner external payable { } function bountyFunds(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferPartnershipsTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferReserveTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { } function transferTeamTokens(address[] calldata recipients, uint256[] calldata values) onlyOwner external { require(!checkBurnTokens); require(<FILL_ME>) for (uint256 i = 0; i < recipients.length; i++) { if (teamSupply >= values[i]) { teamSupply = teamSupply.sub(values[i]); token.mint(recipients[i], values[i]); } } } function getTokenAddress() onlyOwner external view returns (address) { } }
(now>teamTimeLock)
52,285
(now>teamTimeLock)
"SVG cannot be empty"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /* https://twitter.com/_n_collective */ contract PythagoreanScholars is ERC721, Ownable, ReentrancyGuard, ERC721Holder { mapping(uint256 => string) public tokenNames; mapping(uint256 => string) public tokenDescriptions; mapping(uint256 => string) public tokenAttributes; mapping(uint256 => string) public tokenSVGs; uint256 public totalSupply; constructor() ERC721("Pythagorean Scholars", "PythagoreanScholars") {} function mintToken( uint256 tokenId, address to, string memory name, string memory description, string memory attributes, string memory svg ) onlyOwner nonReentrant external { require(to != address(0), "Wut?"); require(<FILL_ME>) tokenNames[tokenId] = name; tokenDescriptions[tokenId] = description; tokenAttributes[tokenId] = attributes; tokenSVGs[tokenId] = svg; _mint(to, tokenId); totalSupply++; } function tokenURI(uint256 tokenId) public view override returns (string memory) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function _encode(bytes memory data) internal pure returns (string memory) { } }
bytes(svg).length!=0,"SVG cannot be empty"
52,373
bytes(svg).length!=0
null
contract ZURNote is MintableToken, BurnableToken { using SafeMath for uint256; string public constant name = "ZUR Notes By Notes Labs"; string public constant symbol = "ZUR-N"; uint8 public constant decimals = 5; uint public constant rate = 100000; address public ZUR = 0x3A4b527dcd618cCea50aDb32B3369117e5442A2F; constructor() public { } // call approve(ZURNote address, amt) first function swapFornote(uint _amt) public { require(_amt >= rate); require(<FILL_ME>) MintableToken(this).mint(msg.sender, _amt.mul(10 ** uint(decimals)).div(rate)); } // if your transfer to the note to this contract it will swap for the token function transfer(address _to, uint256 _value) public returns (bool) { } function swapForToken(uint _amt) public { } address public feeAddress = 0x6c18DCCDfFd4874Cb88b403637045f12f5a227e3; function changeFeeAddress(address _addr) public { } }
ERC20(ZUR).transferFrom(msg.sender,address(this),_amt)
52,404
ERC20(ZUR).transferFrom(msg.sender,address(this),_amt)
null
contract ZURNote is MintableToken, BurnableToken { using SafeMath for uint256; string public constant name = "ZUR Notes By Notes Labs"; string public constant symbol = "ZUR-N"; uint8 public constant decimals = 5; uint public constant rate = 100000; address public ZUR = 0x3A4b527dcd618cCea50aDb32B3369117e5442A2F; constructor() public { } // call approve(ZURNote address, amt) first function swapFornote(uint _amt) public { } // if your transfer to the note to this contract it will swap for the token function transfer(address _to, uint256 _value) public returns (bool) { } function swapForToken(uint _amt) public { require(_amt > 0); require(<FILL_ME>) // 1% fee uint fee = _amt.div(100); uint notes = _amt.sub(fee); burn(notes); ERC20(ZUR).transfer(msg.sender, notes.mul(rate).div(10 ** uint(decimals))); transfer(feeAddress, fee); } address public feeAddress = 0x6c18DCCDfFd4874Cb88b403637045f12f5a227e3; function changeFeeAddress(address _addr) public { } }
balances[msg.sender]>=_amt
52,404
balances[msg.sender]>=_amt
"Not an owner or operator"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../interfaces/INftCollection.sol"; import "./AuthorizeAccess.sol"; import "./OperatorAccess.sol"; /** @title NftMintingStation. */ contract NftMintingStation is AuthorizeAccess, OperatorAccess, EIP712 { using Address for address; using ECDSA for bytes32; uint8 public constant STATUS_NOT_INITIALIZED = 0; uint8 public constant STATUS_PREPARING = 1; uint8 public constant STATUS_CLAIM = 2; uint8 public constant STATUS_CLOSED = 3; uint8 public currentStatus = STATUS_NOT_INITIALIZED; uint256 public maxSupply; uint256 public availableSupply; INftCollection public nftCollection; // modifier to allow execution by owner or operator modifier onlyOwnerOrOperator() { require(<FILL_ME>) _; } constructor( INftCollection _nftCollection, string memory _eipName, string memory _eipVersion ) EIP712(_eipName, _eipVersion) { } function setStatus(uint8 _status) external onlyOwnerOrOperator { } function getNextTokenId() internal virtual returns (uint256) { } function _mint(uint256 _quantity, address _to) internal returns (uint256[] memory) { } function _syncSupply() internal { } function syncSupply() external onlyOwnerOrOperator { } /** * @notice verifify signature is valid for `structHash` and signers is a member of role `AUTHORIZER_ROLE` * @param structHash: hash of the structure to verify the signature against */ function isAuthorized(bytes32 structHash, bytes memory signature) internal view returns (bool) { } }
hasRole(DEFAULT_ADMIN_ROLE,_msgSender())||hasRole(OPERATOR_ROLE,_msgSender()),"Not an owner or operator"
52,463
hasRole(DEFAULT_ADMIN_ROLE,_msgSender())||hasRole(OPERATOR_ROLE,_msgSender())
null
pragma solidity ^0.4.23; /// @title MintableToken /// @author Applicature /// @notice allow to mint tokens /// @dev Base class contract MintableToken is BasicToken, Ownable { using SafeMath for uint256; uint256 public maxSupply; bool public allowedMinting; mapping(address => bool) public mintingAgents; mapping(address => bool) public stateChangeAgents; event Mint(address indexed holder, uint256 tokens); modifier onlyMintingAgents () { require(<FILL_ME>) _; } modifier onlyStateChangeAgents () { } constructor(uint256 _maxSupply, uint256 _mintedSupply, bool _allowedMinting) public { } /// @notice allow to mint tokens function mint(address _holder, uint256 _tokens) public onlyMintingAgents() { } /// @notice update allowedMinting flat function disableMinting() public onlyStateChangeAgents() { } /// @notice update minting agent function updateMintingAgent(address _agent, bool _status) public onlyOwner { } /// @notice update state change agent function updateStateChangeAgent(address _agent, bool _status) public onlyOwner { } /// @return available tokens function availableTokens() public view returns (uint256 tokens) { } }
mintingAgents[msg.sender]
52,657
mintingAgents[msg.sender]
null
pragma solidity ^0.4.23; /// @title MintableToken /// @author Applicature /// @notice allow to mint tokens /// @dev Base class contract MintableToken is BasicToken, Ownable { using SafeMath for uint256; uint256 public maxSupply; bool public allowedMinting; mapping(address => bool) public mintingAgents; mapping(address => bool) public stateChangeAgents; event Mint(address indexed holder, uint256 tokens); modifier onlyMintingAgents () { } modifier onlyStateChangeAgents () { require(<FILL_ME>) _; } constructor(uint256 _maxSupply, uint256 _mintedSupply, bool _allowedMinting) public { } /// @notice allow to mint tokens function mint(address _holder, uint256 _tokens) public onlyMintingAgents() { } /// @notice update allowedMinting flat function disableMinting() public onlyStateChangeAgents() { } /// @notice update minting agent function updateMintingAgent(address _agent, bool _status) public onlyOwner { } /// @notice update state change agent function updateStateChangeAgent(address _agent, bool _status) public onlyOwner { } /// @return available tokens function availableTokens() public view returns (uint256 tokens) { } }
stateChangeAgents[msg.sender]
52,657
stateChangeAgents[msg.sender]
"Err: Invalid Signature"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— // β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ // β–‘β–‘β–ˆβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β• // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // ///@author Zapper ///@notice Zapper Mail implementation with inspiration from Melon Mail. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/access/Ownable.sol"; import "./Signature_Verifier.sol"; import "./ENS_Registry.sol"; import "./ENS_Resolver.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } contract Zapper_Mail_V1 is SignatureVerifier { EnsRegistry public registry; EnsResolver public resolver; bytes32 public baseNode; bool public paused = false; mapping(address => bytes32) public addressToNode; event UserRegistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username, string publicKey ); event UserUnregistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username ); event MessageSent( bytes32 indexed baseNode, address indexed from, address indexed to, string mailHash ); event RegistryUpdated(address indexed registry); event ResolverUpdated(address indexed resolver); event BaseNodeUpdated(bytes32 indexed basenode); constructor( address _signer, EnsRegistry _registry, EnsResolver _resolver, bytes32 _baseNode ) SignatureVerifier(_signer) { } modifier pausable { } /** * @dev Pause or unpause the mail functionality */ function pause() external onlyOwner { } /** * @dev Transfer ownership of any domain or subdomain owned by this address * @param _node - namehash of the domain or subdomain to transfer * @param _owner - new owner for the ENS domain */ function transferDomainOwnership(bytes32 _node, address _owner) external onlyOwner { } /** * @dev Returns the node for the subdomain specified by the username */ function node(string calldata _username) public view returns (bytes32) { } /** * @dev Updates to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) external onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) external onlyOwner { } /** * @dev Allows to update to new ENS base node. * @param _baseNode The new ENS base node to use. */ function updateBaseNode(bytes32 _baseNode) external onlyOwner { } /** * @dev Registers a username to an address, such that the address will own a subdomain of zappermail.eth * i.e.: If a user registers "joe", they will own "joe.zappermail.eth" * @param _username - Username being requested * @param _publicKey - The Zapper mail encryption public key for this username * @param _signature - Verified signature granting account the subdomain */ function registerUser( string calldata _username, string calldata _publicKey, bytes calldata _signature ) external pausable { bytes32 _node = node(_username); // Confirm that the signature matches that of the sender require(<FILL_ME>) // Require that the subdomain is not already owned or owned by the previous implementation (migration) require( resolver.addr(_node) == address(0) || resolver.addr(_node) == address(this) || resolver.addr(_node) == msg.sender, // For migrations from previous contract deployments "Err: Subdomain already assigned" ); // Require that the account does not already own a subdomain require( addressToNode[msg.sender] == "", "Err: Account already owns a subdomain" ); // Take ownership of the subdomain and configure it bytes32 usernameHash = keccak256(bytes(_username)); registry.setSubnodeOwner(baseNode, usernameHash, address(this)); registry.setResolver(_node, address(resolver)); resolver.setAddr(_node, msg.sender); registry.setOwner(_node, address(this)); // Keep track of the associated node per account addressToNode[msg.sender] = _node; // Emit event to index registration on the backend emit UserRegistered( baseNode, usernameHash, msg.sender, _username, _publicKey ); } function setUserData( string calldata _username, string calldata _key, string calldata _value, bytes calldata _signature ) external pausable { } function unregisterUser(string calldata _username) external pausable { } /** * @dev Sends a message to a user * @param _recipient - Address of the recipient of the message * @param _hash - IPFS hash of the message */ function sendMessage(address _recipient, string calldata _hash) external pausable { } /** * @dev Batch sends a message to users * @param _recipients - Addresses of the recipients of the message * @param _hashes - IPFS hashes of the message */ function batchSendMessage( address[] calldata _recipients, string[] calldata _hashes ) external pausable { } /** * @dev Emergency withdraw if anyone sends funds to this address * @param _tokens - Addresses of the tokens (or ETH as zero address) to withdraw */ function withdrawTokens(address[] calldata _tokens) external onlyOwner { } }
verifyAccountAndPublicKeyPair(msg.sender,_publicKey,_signature),"Err: Invalid Signature"
52,706
verifyAccountAndPublicKeyPair(msg.sender,_publicKey,_signature)
"Err: Subdomain already assigned"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— // β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ // β–‘β–‘β–ˆβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β• // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // ///@author Zapper ///@notice Zapper Mail implementation with inspiration from Melon Mail. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/access/Ownable.sol"; import "./Signature_Verifier.sol"; import "./ENS_Registry.sol"; import "./ENS_Resolver.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } contract Zapper_Mail_V1 is SignatureVerifier { EnsRegistry public registry; EnsResolver public resolver; bytes32 public baseNode; bool public paused = false; mapping(address => bytes32) public addressToNode; event UserRegistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username, string publicKey ); event UserUnregistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username ); event MessageSent( bytes32 indexed baseNode, address indexed from, address indexed to, string mailHash ); event RegistryUpdated(address indexed registry); event ResolverUpdated(address indexed resolver); event BaseNodeUpdated(bytes32 indexed basenode); constructor( address _signer, EnsRegistry _registry, EnsResolver _resolver, bytes32 _baseNode ) SignatureVerifier(_signer) { } modifier pausable { } /** * @dev Pause or unpause the mail functionality */ function pause() external onlyOwner { } /** * @dev Transfer ownership of any domain or subdomain owned by this address * @param _node - namehash of the domain or subdomain to transfer * @param _owner - new owner for the ENS domain */ function transferDomainOwnership(bytes32 _node, address _owner) external onlyOwner { } /** * @dev Returns the node for the subdomain specified by the username */ function node(string calldata _username) public view returns (bytes32) { } /** * @dev Updates to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) external onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) external onlyOwner { } /** * @dev Allows to update to new ENS base node. * @param _baseNode The new ENS base node to use. */ function updateBaseNode(bytes32 _baseNode) external onlyOwner { } /** * @dev Registers a username to an address, such that the address will own a subdomain of zappermail.eth * i.e.: If a user registers "joe", they will own "joe.zappermail.eth" * @param _username - Username being requested * @param _publicKey - The Zapper mail encryption public key for this username * @param _signature - Verified signature granting account the subdomain */ function registerUser( string calldata _username, string calldata _publicKey, bytes calldata _signature ) external pausable { bytes32 _node = node(_username); // Confirm that the signature matches that of the sender require( verifyAccountAndPublicKeyPair(msg.sender, _publicKey, _signature), "Err: Invalid Signature" ); // Require that the subdomain is not already owned or owned by the previous implementation (migration) require(<FILL_ME>) // Require that the account does not already own a subdomain require( addressToNode[msg.sender] == "", "Err: Account already owns a subdomain" ); // Take ownership of the subdomain and configure it bytes32 usernameHash = keccak256(bytes(_username)); registry.setSubnodeOwner(baseNode, usernameHash, address(this)); registry.setResolver(_node, address(resolver)); resolver.setAddr(_node, msg.sender); registry.setOwner(_node, address(this)); // Keep track of the associated node per account addressToNode[msg.sender] = _node; // Emit event to index registration on the backend emit UserRegistered( baseNode, usernameHash, msg.sender, _username, _publicKey ); } function setUserData( string calldata _username, string calldata _key, string calldata _value, bytes calldata _signature ) external pausable { } function unregisterUser(string calldata _username) external pausable { } /** * @dev Sends a message to a user * @param _recipient - Address of the recipient of the message * @param _hash - IPFS hash of the message */ function sendMessage(address _recipient, string calldata _hash) external pausable { } /** * @dev Batch sends a message to users * @param _recipients - Addresses of the recipients of the message * @param _hashes - IPFS hashes of the message */ function batchSendMessage( address[] calldata _recipients, string[] calldata _hashes ) external pausable { } /** * @dev Emergency withdraw if anyone sends funds to this address * @param _tokens - Addresses of the tokens (or ETH as zero address) to withdraw */ function withdrawTokens(address[] calldata _tokens) external onlyOwner { } }
resolver.addr(_node)==address(0)||resolver.addr(_node)==address(this)||resolver.addr(_node)==msg.sender,"Err: Subdomain already assigned"
52,706
resolver.addr(_node)==address(0)||resolver.addr(_node)==address(this)||resolver.addr(_node)==msg.sender
"Err: Account already owns a subdomain"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— // β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ // β–‘β–‘β–ˆβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β• // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // ///@author Zapper ///@notice Zapper Mail implementation with inspiration from Melon Mail. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/access/Ownable.sol"; import "./Signature_Verifier.sol"; import "./ENS_Registry.sol"; import "./ENS_Resolver.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } contract Zapper_Mail_V1 is SignatureVerifier { EnsRegistry public registry; EnsResolver public resolver; bytes32 public baseNode; bool public paused = false; mapping(address => bytes32) public addressToNode; event UserRegistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username, string publicKey ); event UserUnregistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username ); event MessageSent( bytes32 indexed baseNode, address indexed from, address indexed to, string mailHash ); event RegistryUpdated(address indexed registry); event ResolverUpdated(address indexed resolver); event BaseNodeUpdated(bytes32 indexed basenode); constructor( address _signer, EnsRegistry _registry, EnsResolver _resolver, bytes32 _baseNode ) SignatureVerifier(_signer) { } modifier pausable { } /** * @dev Pause or unpause the mail functionality */ function pause() external onlyOwner { } /** * @dev Transfer ownership of any domain or subdomain owned by this address * @param _node - namehash of the domain or subdomain to transfer * @param _owner - new owner for the ENS domain */ function transferDomainOwnership(bytes32 _node, address _owner) external onlyOwner { } /** * @dev Returns the node for the subdomain specified by the username */ function node(string calldata _username) public view returns (bytes32) { } /** * @dev Updates to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) external onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) external onlyOwner { } /** * @dev Allows to update to new ENS base node. * @param _baseNode The new ENS base node to use. */ function updateBaseNode(bytes32 _baseNode) external onlyOwner { } /** * @dev Registers a username to an address, such that the address will own a subdomain of zappermail.eth * i.e.: If a user registers "joe", they will own "joe.zappermail.eth" * @param _username - Username being requested * @param _publicKey - The Zapper mail encryption public key for this username * @param _signature - Verified signature granting account the subdomain */ function registerUser( string calldata _username, string calldata _publicKey, bytes calldata _signature ) external pausable { bytes32 _node = node(_username); // Confirm that the signature matches that of the sender require( verifyAccountAndPublicKeyPair(msg.sender, _publicKey, _signature), "Err: Invalid Signature" ); // Require that the subdomain is not already owned or owned by the previous implementation (migration) require( resolver.addr(_node) == address(0) || resolver.addr(_node) == address(this) || resolver.addr(_node) == msg.sender, // For migrations from previous contract deployments "Err: Subdomain already assigned" ); // Require that the account does not already own a subdomain require(<FILL_ME>) // Take ownership of the subdomain and configure it bytes32 usernameHash = keccak256(bytes(_username)); registry.setSubnodeOwner(baseNode, usernameHash, address(this)); registry.setResolver(_node, address(resolver)); resolver.setAddr(_node, msg.sender); registry.setOwner(_node, address(this)); // Keep track of the associated node per account addressToNode[msg.sender] = _node; // Emit event to index registration on the backend emit UserRegistered( baseNode, usernameHash, msg.sender, _username, _publicKey ); } function setUserData( string calldata _username, string calldata _key, string calldata _value, bytes calldata _signature ) external pausable { } function unregisterUser(string calldata _username) external pausable { } /** * @dev Sends a message to a user * @param _recipient - Address of the recipient of the message * @param _hash - IPFS hash of the message */ function sendMessage(address _recipient, string calldata _hash) external pausable { } /** * @dev Batch sends a message to users * @param _recipients - Addresses of the recipients of the message * @param _hashes - IPFS hashes of the message */ function batchSendMessage( address[] calldata _recipients, string[] calldata _hashes ) external pausable { } /** * @dev Emergency withdraw if anyone sends funds to this address * @param _tokens - Addresses of the tokens (or ETH as zero address) to withdraw */ function withdrawTokens(address[] calldata _tokens) external onlyOwner { } }
addressToNode[msg.sender]=="","Err: Account already owns a subdomain"
52,706
addressToNode[msg.sender]==""
"Err: Invalid Signature"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— // β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ // β–‘β–‘β–ˆβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β–‘β–‘β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β• // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // ///@author Zapper ///@notice Zapper Mail implementation with inspiration from Melon Mail. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/access/Ownable.sol"; import "./Signature_Verifier.sol"; import "./ENS_Registry.sol"; import "./ENS_Resolver.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } contract Zapper_Mail_V1 is SignatureVerifier { EnsRegistry public registry; EnsResolver public resolver; bytes32 public baseNode; bool public paused = false; mapping(address => bytes32) public addressToNode; event UserRegistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username, string publicKey ); event UserUnregistered( bytes32 indexed baseNode, bytes32 indexed usernameHash, address indexed addr, string username ); event MessageSent( bytes32 indexed baseNode, address indexed from, address indexed to, string mailHash ); event RegistryUpdated(address indexed registry); event ResolverUpdated(address indexed resolver); event BaseNodeUpdated(bytes32 indexed basenode); constructor( address _signer, EnsRegistry _registry, EnsResolver _resolver, bytes32 _baseNode ) SignatureVerifier(_signer) { } modifier pausable { } /** * @dev Pause or unpause the mail functionality */ function pause() external onlyOwner { } /** * @dev Transfer ownership of any domain or subdomain owned by this address * @param _node - namehash of the domain or subdomain to transfer * @param _owner - new owner for the ENS domain */ function transferDomainOwnership(bytes32 _node, address _owner) external onlyOwner { } /** * @dev Returns the node for the subdomain specified by the username */ function node(string calldata _username) public view returns (bytes32) { } /** * @dev Updates to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) external onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) external onlyOwner { } /** * @dev Allows to update to new ENS base node. * @param _baseNode The new ENS base node to use. */ function updateBaseNode(bytes32 _baseNode) external onlyOwner { } /** * @dev Registers a username to an address, such that the address will own a subdomain of zappermail.eth * i.e.: If a user registers "joe", they will own "joe.zappermail.eth" * @param _username - Username being requested * @param _publicKey - The Zapper mail encryption public key for this username * @param _signature - Verified signature granting account the subdomain */ function registerUser( string calldata _username, string calldata _publicKey, bytes calldata _signature ) external pausable { } function setUserData( string calldata _username, string calldata _key, string calldata _value, bytes calldata _signature ) external pausable { bytes32 _node = node(_username); // Confirm that the signature matches that of the sender require(<FILL_ME>) // Require that the subdomain is owned by this account require( _node == addressToNode[msg.sender] && resolver.addr(_node) == msg.sender, "Err: Subdomain not assigned to account" ); resolver.setText(_node, _key, _value); } function unregisterUser(string calldata _username) external pausable { } /** * @dev Sends a message to a user * @param _recipient - Address of the recipient of the message * @param _hash - IPFS hash of the message */ function sendMessage(address _recipient, string calldata _hash) external pausable { } /** * @dev Batch sends a message to users * @param _recipients - Addresses of the recipients of the message * @param _hashes - IPFS hashes of the message */ function batchSendMessage( address[] calldata _recipients, string[] calldata _hashes ) external pausable { } /** * @dev Emergency withdraw if anyone sends funds to this address * @param _tokens - Addresses of the tokens (or ETH as zero address) to withdraw */ function withdrawTokens(address[] calldata _tokens) external onlyOwner { } }
verifyUserDataPair(msg.sender,_key,_value,_signature),"Err: Invalid Signature"
52,706
verifyUserDataPair(msg.sender,_key,_value,_signature)
'Wrong amount'
pragma solidity 0.5.11; // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- contract SafeMath { function safeAdd(uint a, uint b) public pure returns(uint c) { } function safeSub(uint a, uint b) public pure returns (uint c) { } function safeMul(uint a, uint b) public pure returns (uint c) { } function safeDiv(uint a, uint b) public pure returns (uint c) { } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // ---------------------------------------------------------------------------- contract ERC20Interface { function totalSupply() public view returns (uint); function balanceOf(address tokenOwner) public view returns (uint balance); function allowance(address tokenOwner, address spender) public view returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract Coin is ERC20Interface, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; address owner; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor(address _owner) public { } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public view returns (uint) { } // ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { } // ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------ function () external payable { } // ------------------------------------------------------------------------ // Get current sale price // ------------------------------------------------------------------------ function getPrice() public view returns (uint price) { } // ------------------------------------------------------------------------ // Buy one coin // ------------------------------------------------------------------------ function buyOne() public payable returns (bool success) { uint price = getPrice(); uint fee = price / 10; require(<FILL_ME>) balances[address(this)] = safeSub(balances[address(this)], 1); balances[msg.sender] = safeAdd(balances[msg.sender], 1); emit Transfer(address(this), msg.sender, 1); address(uint160(owner)).transfer(fee); return true; } // ------------------------------------------------------------------------ // Sell one coin // ------------------------------------------------------------------------ function sellOne() public returns (bool success) { } }
msg.value==(price+fee),'Wrong amount'
52,770
msg.value==(price+fee)
"The value is not sufficient or exceed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MultiTransfer { address owner; modifier onlyOwner() { } function charge() payable public { } constructor() payable{ } function withdraw(address payable receiverAddress, uint256 _amount) private { } function withdrawls(address payable[] memory addresses, uint256 amounts) payable public onlyOwner { require(<FILL_ME>) for (uint i=0; i < addresses.length; i++) { withdraw(addresses[i], amounts); } } }
address(this).balance>=amounts,"The value is not sufficient or exceed"
52,808
address(this).balance>=amounts
"Contract instance has already been initialized EVEN times"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /** * @dev Modifier to use in the initializer function of a contract when upgrade EVEN times. */ modifier initializerEven() { require(<FILL_ME>) bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = false; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract Governable is Initializable { address public governor; event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor); /** * @dev Contract initializer. * called once by the factory at time of deployment */ function initialize(address governor_) virtual public initializer { } modifier governance() { } /** * @dev Allows the current governor to relinquish control of the contract. * @notice Renouncing to governorship will leave the contract without an governor. * It will not be possible to call the functions with the `governance` * modifier anymore. */ function renounceGovernorship() public governance { } /** * @dev Allows the current governor to transfer control of the contract to a newGovernor. * @param newGovernor The address to transfer governorship to. */ function transferGovernorship(address newGovernor) public governance { } /** * @dev Transfers control of the contract to a newGovernor. * @param newGovernor The address to transfer governorship to. */ function _transferGovernorship(address newGovernor) internal { } } contract Configurable is Governable { mapping (bytes32 => uint) internal config; function getConfig(bytes32 key) public view returns (uint) { } function getConfig(bytes32 key, uint index) public view returns (uint) { } function getConfig(bytes32 key, address addr) public view returns (uint) { } function _setConfig(bytes32 key, uint value) internal { } function _setConfig(bytes32 key, uint index, uint value) internal { } function _setConfig(bytes32 key, address addr, uint value) internal { } function setConfig(bytes32 key, uint value) external governance { } function setConfig(bytes32 key, uint index, uint value) external governance { } function setConfig(bytes32 key, address addr, uint value) external governance { } }
initializing||isConstructor()||initialized,"Contract instance has already been initialized EVEN times"
52,827
initializing||isConstructor()||initialized
"That escrow ID is no longer valid."
/** * @title Interface for contracts conforming to ERC-20 */ contract ERC20Interface { function transferFrom(address from, address to, uint tokens) public returns (bool success); } /** * @title Interface for contracts conforming to ERC-721 */ contract ERC721Interface { function ownerOf(uint256 assetId) public view returns (address); function safeTransferFrom(address from, address to, uint256 assetId) public; function isAuthorized(address operator, uint256 assetId) public view returns (bool); function exists(uint256 assetId) public view returns (bool); } contract DCLEscrow is Ownable, Pausable, Destructible { using SafeMath for uint256; ERC20Interface public acceptedToken; ERC721Interface public nonFungibleRegistry; struct Escrow { bytes32 id; address seller; address buyer; uint256 price; uint256 offer; bool acceptsOffers; bool publicE; uint256 escrowByOwnerIdPos; uint256 parcelCount; address highestBidder; uint256 lastOfferPrice; } struct Offer { address highestOffer; uint256 highestOfferPrice; address previousOffer; } mapping (uint256 => Escrow) public escrowByAssetId; mapping (bytes32 => Escrow) public escrowByEscrowId; mapping (bytes32 => Offer) public offersByEscrowId; mapping (address => Escrow[]) public escrowByOwnerId; mapping(address => uint256) public openedEscrowsByOwnerId; mapping(address => uint256) public ownerEscrowsCounter; mapping(address => uint256[]) public allOwnerParcelsOnEscrow; mapping(bytes32 => uint256[]) public assetIdByEscrowId; mapping(address => bool) public whitelistAddresses; uint256 public whitelistCounter; uint256 public publicationFeeInWei; //15000000000000000000 uint256 private publicationFeeTotal; bytes32[] public allEscrowIds; //address[] public whitelistAddressGetter; /* EVENTS */ event EscrowCreated( bytes32 id, address indexed seller, address indexed buyer, uint256 priceInWei, bool acceptsOffers, bool publicE, uint256 parcels ); event EscrowSuccessful( bytes32 id, address indexed seller, uint256 totalPrice, address indexed winner ); event EscrowCancelled( bytes32 id, address indexed seller ); function addAddressWhitelist(address toWhitelist) public onlyOwner { } /* function getwhitelistCounter() public onlyOwner view returns(uint256) { return whitelistCounter; } function getwhitelistAddress(uint256 index) public onlyOwner view returns(address) { return whitelistAddressGetter[index]; } function deleteWhitelistAddress(address toDelete, uint256 index) public onlyOwner { require(toDelete != address(0), "Address cannot be blank."); require(index > 0, "index needs to be greater than zero."); delete whitelistAddresses[toDelete]; delete whitelistAddressGetter[index]; } */ function updateEscrow(address _acceptedToken, address _nonFungibleRegistry) public onlyOwner { } constructor (address _acceptedToken, address _nonFungibleRegistry) public { } function setPublicationFee(uint256 publicationFee) onlyOwner public { } function getPublicationFeeTotal() public onlyOwner view returns(uint256) { } function getTotalEscrowCount() public view returns(uint256) { } function getSingleEscrowAdmin(bytes32 index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function getAssetByEscrowIdLength(bytes32 escrowId) public view returns (uint256) { } function getSingleAssetByEscrowIdLength(bytes32 escrowId, uint index) public view returns (uint256) { } function getEscrowCountByAssetIdArray(address ownerAddress) public view returns (uint256) { } function getAllOwnedParcelsOnEscrow(address ownerAddress) public view returns (uint256) { } function getParcelAssetIdOnEscrow(address ownerAddress,uint index) public view returns (uint256) { } function getEscrowCountById(address ownerAddress) public view returns (uint) { } function getEscrowInfo(address ownerAddress, uint index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function placeOffer(bytes32 escrowId, uint256 offerPrice) public whenNotPaused { address seller = escrowByEscrowId[escrowId].seller; require(seller != msg.sender, "You are the owner of this escrow."); require(seller != address(0)); require(offerPrice > 0, "Offer Price needs to be greater than zero"); require(<FILL_ME>) bool acceptsOffers = escrowByEscrowId[escrowId].acceptsOffers; require(acceptsOffers, "This escrow does not accept offers."); //address buyer = escrowByEscrowId[escrowId].buyer; bool isPublic = escrowByEscrowId[escrowId].publicE; if(!isPublic) { require(msg.sender == escrowByEscrowId[escrowId].buyer, "You are not authorized for this escrow."); } Escrow memory tempEscrow = escrowByEscrowId[escrowId]; tempEscrow.lastOfferPrice = tempEscrow.offer; tempEscrow.offer = offerPrice; tempEscrow.highestBidder = msg.sender; escrowByEscrowId[escrowId] = tempEscrow; } function createNewEscrow(uint256[] memory assedIds, uint256 escrowPrice, bool doesAcceptOffers, bool isPublic, address buyer) public whenNotPaused{ } function cancelAllEscrows() public onlyOwner { } function adminRemoveEscrow(bytes32 escrowId) public onlyOwner { } function removeEscrow(bytes32 escrowId) public whenNotPaused { } function acceptEscrow(bytes32 escrowId) public whenNotPaused { } }
escrowByEscrowId[escrowId].id!='0x0',"That escrow ID is no longer valid."
52,883
escrowByEscrowId[escrowId].id!='0x0'
"This parcel does not exist."
/** * @title Interface for contracts conforming to ERC-20 */ contract ERC20Interface { function transferFrom(address from, address to, uint tokens) public returns (bool success); } /** * @title Interface for contracts conforming to ERC-721 */ contract ERC721Interface { function ownerOf(uint256 assetId) public view returns (address); function safeTransferFrom(address from, address to, uint256 assetId) public; function isAuthorized(address operator, uint256 assetId) public view returns (bool); function exists(uint256 assetId) public view returns (bool); } contract DCLEscrow is Ownable, Pausable, Destructible { using SafeMath for uint256; ERC20Interface public acceptedToken; ERC721Interface public nonFungibleRegistry; struct Escrow { bytes32 id; address seller; address buyer; uint256 price; uint256 offer; bool acceptsOffers; bool publicE; uint256 escrowByOwnerIdPos; uint256 parcelCount; address highestBidder; uint256 lastOfferPrice; } struct Offer { address highestOffer; uint256 highestOfferPrice; address previousOffer; } mapping (uint256 => Escrow) public escrowByAssetId; mapping (bytes32 => Escrow) public escrowByEscrowId; mapping (bytes32 => Offer) public offersByEscrowId; mapping (address => Escrow[]) public escrowByOwnerId; mapping(address => uint256) public openedEscrowsByOwnerId; mapping(address => uint256) public ownerEscrowsCounter; mapping(address => uint256[]) public allOwnerParcelsOnEscrow; mapping(bytes32 => uint256[]) public assetIdByEscrowId; mapping(address => bool) public whitelistAddresses; uint256 public whitelistCounter; uint256 public publicationFeeInWei; //15000000000000000000 uint256 private publicationFeeTotal; bytes32[] public allEscrowIds; //address[] public whitelistAddressGetter; /* EVENTS */ event EscrowCreated( bytes32 id, address indexed seller, address indexed buyer, uint256 priceInWei, bool acceptsOffers, bool publicE, uint256 parcels ); event EscrowSuccessful( bytes32 id, address indexed seller, uint256 totalPrice, address indexed winner ); event EscrowCancelled( bytes32 id, address indexed seller ); function addAddressWhitelist(address toWhitelist) public onlyOwner { } /* function getwhitelistCounter() public onlyOwner view returns(uint256) { return whitelistCounter; } function getwhitelistAddress(uint256 index) public onlyOwner view returns(address) { return whitelistAddressGetter[index]; } function deleteWhitelistAddress(address toDelete, uint256 index) public onlyOwner { require(toDelete != address(0), "Address cannot be blank."); require(index > 0, "index needs to be greater than zero."); delete whitelistAddresses[toDelete]; delete whitelistAddressGetter[index]; } */ function updateEscrow(address _acceptedToken, address _nonFungibleRegistry) public onlyOwner { } constructor (address _acceptedToken, address _nonFungibleRegistry) public { } function setPublicationFee(uint256 publicationFee) onlyOwner public { } function getPublicationFeeTotal() public onlyOwner view returns(uint256) { } function getTotalEscrowCount() public view returns(uint256) { } function getSingleEscrowAdmin(bytes32 index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function getAssetByEscrowIdLength(bytes32 escrowId) public view returns (uint256) { } function getSingleAssetByEscrowIdLength(bytes32 escrowId, uint index) public view returns (uint256) { } function getEscrowCountByAssetIdArray(address ownerAddress) public view returns (uint256) { } function getAllOwnedParcelsOnEscrow(address ownerAddress) public view returns (uint256) { } function getParcelAssetIdOnEscrow(address ownerAddress,uint index) public view returns (uint256) { } function getEscrowCountById(address ownerAddress) public view returns (uint) { } function getEscrowInfo(address ownerAddress, uint index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function placeOffer(bytes32 escrowId, uint256 offerPrice) public whenNotPaused { } function createNewEscrow(uint256[] memory assedIds, uint256 escrowPrice, bool doesAcceptOffers, bool isPublic, address buyer) public whenNotPaused{ //address tempAssetOwner = msg.sender; uint256 tempParcelCount = assedIds.length; for(uint i = 0; i < tempParcelCount; i++) { address assetOwner = nonFungibleRegistry.ownerOf(assedIds[i]); require(msg.sender == assetOwner, "You are not the owner of this parcel."); require(<FILL_ME>) require(nonFungibleRegistry.isAuthorized(address(this), assedIds[i]), "You have not authorized DCL Escrow to manage your LAND tokens."); allOwnerParcelsOnEscrow[assetOwner].push(assedIds[i]); } require(escrowPrice > 0, "Please pass a price greater than zero."); bytes32 escrowId = keccak256(abi.encodePacked( block.timestamp, msg.sender, assedIds[0], escrowPrice )); assetIdByEscrowId[escrowId] = assedIds; //uint256 memEscrowByOwnerIdPos = openedEscrowsByOwnerId[assetOwner]; Escrow memory memEscrow = Escrow({ id: escrowId, seller: msg.sender, buyer: buyer, price: escrowPrice, offer:0, publicE:isPublic, acceptsOffers: doesAcceptOffers, escrowByOwnerIdPos: 0, parcelCount: tempParcelCount, highestBidder: address(0), lastOfferPrice: 0 }); escrowByEscrowId[escrowId] = memEscrow; escrowByOwnerId[msg.sender].push(memEscrow); //ownerEscrowsCounter[msg.sender] = getEscrowCountByAssetIdArray(msg.sender) + 1; allEscrowIds.push(escrowId); emit EscrowCreated( escrowId, msg.sender, buyer, escrowPrice, doesAcceptOffers, isPublic, tempParcelCount ); } function cancelAllEscrows() public onlyOwner { } function adminRemoveEscrow(bytes32 escrowId) public onlyOwner { } function removeEscrow(bytes32 escrowId) public whenNotPaused { } function acceptEscrow(bytes32 escrowId) public whenNotPaused { } }
nonFungibleRegistry.exists(assedIds[i]),"This parcel does not exist."
52,883
nonFungibleRegistry.exists(assedIds[i])
"You have not authorized DCL Escrow to manage your LAND tokens."
/** * @title Interface for contracts conforming to ERC-20 */ contract ERC20Interface { function transferFrom(address from, address to, uint tokens) public returns (bool success); } /** * @title Interface for contracts conforming to ERC-721 */ contract ERC721Interface { function ownerOf(uint256 assetId) public view returns (address); function safeTransferFrom(address from, address to, uint256 assetId) public; function isAuthorized(address operator, uint256 assetId) public view returns (bool); function exists(uint256 assetId) public view returns (bool); } contract DCLEscrow is Ownable, Pausable, Destructible { using SafeMath for uint256; ERC20Interface public acceptedToken; ERC721Interface public nonFungibleRegistry; struct Escrow { bytes32 id; address seller; address buyer; uint256 price; uint256 offer; bool acceptsOffers; bool publicE; uint256 escrowByOwnerIdPos; uint256 parcelCount; address highestBidder; uint256 lastOfferPrice; } struct Offer { address highestOffer; uint256 highestOfferPrice; address previousOffer; } mapping (uint256 => Escrow) public escrowByAssetId; mapping (bytes32 => Escrow) public escrowByEscrowId; mapping (bytes32 => Offer) public offersByEscrowId; mapping (address => Escrow[]) public escrowByOwnerId; mapping(address => uint256) public openedEscrowsByOwnerId; mapping(address => uint256) public ownerEscrowsCounter; mapping(address => uint256[]) public allOwnerParcelsOnEscrow; mapping(bytes32 => uint256[]) public assetIdByEscrowId; mapping(address => bool) public whitelistAddresses; uint256 public whitelistCounter; uint256 public publicationFeeInWei; //15000000000000000000 uint256 private publicationFeeTotal; bytes32[] public allEscrowIds; //address[] public whitelistAddressGetter; /* EVENTS */ event EscrowCreated( bytes32 id, address indexed seller, address indexed buyer, uint256 priceInWei, bool acceptsOffers, bool publicE, uint256 parcels ); event EscrowSuccessful( bytes32 id, address indexed seller, uint256 totalPrice, address indexed winner ); event EscrowCancelled( bytes32 id, address indexed seller ); function addAddressWhitelist(address toWhitelist) public onlyOwner { } /* function getwhitelistCounter() public onlyOwner view returns(uint256) { return whitelistCounter; } function getwhitelistAddress(uint256 index) public onlyOwner view returns(address) { return whitelistAddressGetter[index]; } function deleteWhitelistAddress(address toDelete, uint256 index) public onlyOwner { require(toDelete != address(0), "Address cannot be blank."); require(index > 0, "index needs to be greater than zero."); delete whitelistAddresses[toDelete]; delete whitelistAddressGetter[index]; } */ function updateEscrow(address _acceptedToken, address _nonFungibleRegistry) public onlyOwner { } constructor (address _acceptedToken, address _nonFungibleRegistry) public { } function setPublicationFee(uint256 publicationFee) onlyOwner public { } function getPublicationFeeTotal() public onlyOwner view returns(uint256) { } function getTotalEscrowCount() public view returns(uint256) { } function getSingleEscrowAdmin(bytes32 index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function getAssetByEscrowIdLength(bytes32 escrowId) public view returns (uint256) { } function getSingleAssetByEscrowIdLength(bytes32 escrowId, uint index) public view returns (uint256) { } function getEscrowCountByAssetIdArray(address ownerAddress) public view returns (uint256) { } function getAllOwnedParcelsOnEscrow(address ownerAddress) public view returns (uint256) { } function getParcelAssetIdOnEscrow(address ownerAddress,uint index) public view returns (uint256) { } function getEscrowCountById(address ownerAddress) public view returns (uint) { } function getEscrowInfo(address ownerAddress, uint index) public view returns (bytes32, address, address,uint256, uint256, bool, bool, uint256, uint256, address, uint256) { } function placeOffer(bytes32 escrowId, uint256 offerPrice) public whenNotPaused { } function createNewEscrow(uint256[] memory assedIds, uint256 escrowPrice, bool doesAcceptOffers, bool isPublic, address buyer) public whenNotPaused{ //address tempAssetOwner = msg.sender; uint256 tempParcelCount = assedIds.length; for(uint i = 0; i < tempParcelCount; i++) { address assetOwner = nonFungibleRegistry.ownerOf(assedIds[i]); require(msg.sender == assetOwner, "You are not the owner of this parcel."); require(nonFungibleRegistry.exists(assedIds[i]), "This parcel does not exist."); require(<FILL_ME>) allOwnerParcelsOnEscrow[assetOwner].push(assedIds[i]); } require(escrowPrice > 0, "Please pass a price greater than zero."); bytes32 escrowId = keccak256(abi.encodePacked( block.timestamp, msg.sender, assedIds[0], escrowPrice )); assetIdByEscrowId[escrowId] = assedIds; //uint256 memEscrowByOwnerIdPos = openedEscrowsByOwnerId[assetOwner]; Escrow memory memEscrow = Escrow({ id: escrowId, seller: msg.sender, buyer: buyer, price: escrowPrice, offer:0, publicE:isPublic, acceptsOffers: doesAcceptOffers, escrowByOwnerIdPos: 0, parcelCount: tempParcelCount, highestBidder: address(0), lastOfferPrice: 0 }); escrowByEscrowId[escrowId] = memEscrow; escrowByOwnerId[msg.sender].push(memEscrow); //ownerEscrowsCounter[msg.sender] = getEscrowCountByAssetIdArray(msg.sender) + 1; allEscrowIds.push(escrowId); emit EscrowCreated( escrowId, msg.sender, buyer, escrowPrice, doesAcceptOffers, isPublic, tempParcelCount ); } function cancelAllEscrows() public onlyOwner { } function adminRemoveEscrow(bytes32 escrowId) public onlyOwner { } function removeEscrow(bytes32 escrowId) public whenNotPaused { } function acceptEscrow(bytes32 escrowId) public whenNotPaused { } }
nonFungibleRegistry.isAuthorized(address(this),assedIds[i]),"You have not authorized DCL Escrow to manage your LAND tokens."
52,883
nonFungibleRegistry.isAuthorized(address(this),assedIds[i])
"Caller not contract"
pragma solidity 0.8.4; /// @notice Core logic and state shared between both marketplaces abstract contract BaseMarketplace is ReentrancyGuard, Pausable { event AdminUpdateModulo(uint256 _modulo); event AdminUpdateMinBidAmount(uint256 _minBidAmount); event AdminUpdateAccessControls(IKOAccessControlsLookup indexed _oldAddress, IKOAccessControlsLookup indexed _newAddress); event AdminUpdatePlatformPrimarySaleCommission(uint256 _platformPrimarySaleCommission); event AdminUpdateBidLockupPeriod(uint256 _bidLockupPeriod); event AdminUpdatePlatformAccount(address indexed _oldAddress, address indexed _newAddress); event AdminRecoverERC20(IERC20 indexed _token, address indexed _recipient, uint256 _amount); event AdminRecoverETH(address payable indexed _recipient, uint256 _amount); event BidderRefunded(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); event BidderRefundedFailed(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); // Only a whitelisted smart contract in the access controls contract modifier onlyContract() { } function _onlyContract() private view { require(<FILL_ME>) } // Only admin defined in the access controls contract modifier onlyAdmin() { } function _onlyAdmin() private view { } /// @notice Address of the access control contract IKOAccessControlsLookup public accessControls; /// @notice KODA V3 token IKODAV3 public koda; /// @notice platform funds collector address public platformAccount; /// @notice precision 100.00000% uint256 public modulo = 100_00000; /// @notice Minimum bid / minimum list amount uint256 public minBidAmount = 0.01 ether; /// @notice Bid lockup period uint256 public bidLockupPeriod = 6 hours; constructor(IKOAccessControlsLookup _accessControls, IKODAV3 _koda, address _platformAccount) { } function recoverERC20(IERC20 _token, address _recipient, uint256 _amount) public onlyAdmin { } function recoverStuckETH(address payable _recipient, uint256 _amount) public onlyAdmin { } function updateAccessControls(IKOAccessControlsLookup _accessControls) public onlyAdmin { } function updateModulo(uint256 _modulo) public onlyAdmin { } function updateMinBidAmount(uint256 _minBidAmount) public onlyAdmin { } function updateBidLockupPeriod(uint256 _bidLockupPeriod) public onlyAdmin { } function updatePlatformAccount(address _newPlatformAccount) public onlyAdmin { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _getLockupTime() internal view returns (uint256 lockupUntil) { } function _refundBidder(uint256 _id, address _receiver, uint256 _paymentAmount, address _newBidder, uint256 _newOffer) internal { } /// @dev This allows the processing of a marketplace sale to be delegated higher up the inheritance hierarchy function _processSale( uint256 _id, uint256 _paymentAmount, address _buyer, address _seller ) internal virtual returns (uint256); /// @dev This allows an auction mechanic to ask a marketplace if a new listing is permitted i.e. this could be false if the edition or token is already listed under a different mechanic function _isListingPermitted(uint256 _id) internal virtual returns (bool); }
accessControls.hasContractRole(_msgSender()),"Caller not contract"
52,898
accessControls.hasContractRole(_msgSender())
"Caller not admin"
pragma solidity 0.8.4; /// @notice Core logic and state shared between both marketplaces abstract contract BaseMarketplace is ReentrancyGuard, Pausable { event AdminUpdateModulo(uint256 _modulo); event AdminUpdateMinBidAmount(uint256 _minBidAmount); event AdminUpdateAccessControls(IKOAccessControlsLookup indexed _oldAddress, IKOAccessControlsLookup indexed _newAddress); event AdminUpdatePlatformPrimarySaleCommission(uint256 _platformPrimarySaleCommission); event AdminUpdateBidLockupPeriod(uint256 _bidLockupPeriod); event AdminUpdatePlatformAccount(address indexed _oldAddress, address indexed _newAddress); event AdminRecoverERC20(IERC20 indexed _token, address indexed _recipient, uint256 _amount); event AdminRecoverETH(address payable indexed _recipient, uint256 _amount); event BidderRefunded(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); event BidderRefundedFailed(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); // Only a whitelisted smart contract in the access controls contract modifier onlyContract() { } function _onlyContract() private view { } // Only admin defined in the access controls contract modifier onlyAdmin() { } function _onlyAdmin() private view { require(<FILL_ME>) } /// @notice Address of the access control contract IKOAccessControlsLookup public accessControls; /// @notice KODA V3 token IKODAV3 public koda; /// @notice platform funds collector address public platformAccount; /// @notice precision 100.00000% uint256 public modulo = 100_00000; /// @notice Minimum bid / minimum list amount uint256 public minBidAmount = 0.01 ether; /// @notice Bid lockup period uint256 public bidLockupPeriod = 6 hours; constructor(IKOAccessControlsLookup _accessControls, IKODAV3 _koda, address _platformAccount) { } function recoverERC20(IERC20 _token, address _recipient, uint256 _amount) public onlyAdmin { } function recoverStuckETH(address payable _recipient, uint256 _amount) public onlyAdmin { } function updateAccessControls(IKOAccessControlsLookup _accessControls) public onlyAdmin { } function updateModulo(uint256 _modulo) public onlyAdmin { } function updateMinBidAmount(uint256 _minBidAmount) public onlyAdmin { } function updateBidLockupPeriod(uint256 _bidLockupPeriod) public onlyAdmin { } function updatePlatformAccount(address _newPlatformAccount) public onlyAdmin { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _getLockupTime() internal view returns (uint256 lockupUntil) { } function _refundBidder(uint256 _id, address _receiver, uint256 _paymentAmount, address _newBidder, uint256 _newOffer) internal { } /// @dev This allows the processing of a marketplace sale to be delegated higher up the inheritance hierarchy function _processSale( uint256 _id, uint256 _paymentAmount, address _buyer, address _seller ) internal virtual returns (uint256); /// @dev This allows an auction mechanic to ask a marketplace if a new listing is permitted i.e. this could be false if the edition or token is already listed under a different mechanic function _isListingPermitted(uint256 _id) internal virtual returns (bool); }
accessControls.hasAdminRole(_msgSender()),"Caller not admin"
52,898
accessControls.hasAdminRole(_msgSender())
"Sender must have admin role in new contract"
pragma solidity 0.8.4; /// @notice Core logic and state shared between both marketplaces abstract contract BaseMarketplace is ReentrancyGuard, Pausable { event AdminUpdateModulo(uint256 _modulo); event AdminUpdateMinBidAmount(uint256 _minBidAmount); event AdminUpdateAccessControls(IKOAccessControlsLookup indexed _oldAddress, IKOAccessControlsLookup indexed _newAddress); event AdminUpdatePlatformPrimarySaleCommission(uint256 _platformPrimarySaleCommission); event AdminUpdateBidLockupPeriod(uint256 _bidLockupPeriod); event AdminUpdatePlatformAccount(address indexed _oldAddress, address indexed _newAddress); event AdminRecoverERC20(IERC20 indexed _token, address indexed _recipient, uint256 _amount); event AdminRecoverETH(address payable indexed _recipient, uint256 _amount); event BidderRefunded(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); event BidderRefundedFailed(uint256 indexed _id, address _bidder, uint256 _bid, address _newBidder, uint256 _newOffer); // Only a whitelisted smart contract in the access controls contract modifier onlyContract() { } function _onlyContract() private view { } // Only admin defined in the access controls contract modifier onlyAdmin() { } function _onlyAdmin() private view { } /// @notice Address of the access control contract IKOAccessControlsLookup public accessControls; /// @notice KODA V3 token IKODAV3 public koda; /// @notice platform funds collector address public platformAccount; /// @notice precision 100.00000% uint256 public modulo = 100_00000; /// @notice Minimum bid / minimum list amount uint256 public minBidAmount = 0.01 ether; /// @notice Bid lockup period uint256 public bidLockupPeriod = 6 hours; constructor(IKOAccessControlsLookup _accessControls, IKODAV3 _koda, address _platformAccount) { } function recoverERC20(IERC20 _token, address _recipient, uint256 _amount) public onlyAdmin { } function recoverStuckETH(address payable _recipient, uint256 _amount) public onlyAdmin { } function updateAccessControls(IKOAccessControlsLookup _accessControls) public onlyAdmin { require(<FILL_ME>) emit AdminUpdateAccessControls(accessControls, _accessControls); accessControls = _accessControls; } function updateModulo(uint256 _modulo) public onlyAdmin { } function updateMinBidAmount(uint256 _minBidAmount) public onlyAdmin { } function updateBidLockupPeriod(uint256 _bidLockupPeriod) public onlyAdmin { } function updatePlatformAccount(address _newPlatformAccount) public onlyAdmin { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _getLockupTime() internal view returns (uint256 lockupUntil) { } function _refundBidder(uint256 _id, address _receiver, uint256 _paymentAmount, address _newBidder, uint256 _newOffer) internal { } /// @dev This allows the processing of a marketplace sale to be delegated higher up the inheritance hierarchy function _processSale( uint256 _id, uint256 _paymentAmount, address _buyer, address _seller ) internal virtual returns (uint256); /// @dev This allows an auction mechanic to ask a marketplace if a new listing is permitted i.e. this could be false if the edition or token is already listed under a different mechanic function _isListingPermitted(uint256 _id) internal virtual returns (bool); }
_accessControls.hasAdminRole(_msgSender()),"Sender must have admin role in new contract"
52,898
_accessControls.hasAdminRole(_msgSender())
"Only seller can convert"
pragma solidity 0.8.4; /// @title KnownOrigin Primary Marketplace for all V3 tokens /// @notice The following listing types are supported: Buy now, Stepped, Reserve and Offers /// @dev The contract is pausable and has reentrancy guards /// @author KnownOrigin Labs contract KODAV3PrimaryMarketplace is IKODAV3PrimarySaleMarketplace, BaseMarketplace, ReserveAuctionMarketplace, BuyNowMarketplace { event PrimaryMarketplaceDeployed(); event AdminSetKoCommissionOverrideForCreator(address indexed _creator, uint256 _koCommission); event AdminSetKoCommissionOverrideForEdition(uint256 indexed _editionId, uint256 _koCommission); event ConvertFromBuyNowToOffers(uint256 indexed _editionId, uint128 _startDate); event ConvertSteppedAuctionToBuyNow(uint256 indexed _editionId, uint128 _listingPrice, uint128 _startDate); event ReserveAuctionConvertedToOffers(uint256 indexed _editionId, uint128 _startDate); // KO Commission override definition for a given creator struct KOCommissionOverride { bool active; uint256 koCommission; } // Offer / Bid definition placed on an edition struct Offer { uint256 offer; address bidder; uint256 lockupUntil; } // Stepped auction definition struct Stepped { uint128 basePrice; uint128 stepPrice; uint128 startDate; address seller; uint16 currentStep; } /// @notice Edition ID -> KO commission override set by admin mapping(uint256 => KOCommissionOverride) public koCommissionOverrideForEditions; /// @notice primary sale creator -> KO commission override set by admin mapping(address => KOCommissionOverride) public koCommissionOverrideForCreators; /// @notice Edition ID to Offer mapping mapping(uint256 => Offer) public editionOffers; /// @notice Edition ID to StartDate mapping(uint256 => uint256) public editionOffersStartDate; /// @notice Edition ID to stepped auction mapping(uint256 => Stepped) public editionStep; /// @notice KO commission on every sale uint256 public platformPrimarySaleCommission = 15_00000; // 15.00000% constructor(IKOAccessControlsLookup _accessControls, IKODAV3 _koda, address _platformAccount) BaseMarketplace(_accessControls, _koda, _platformAccount) { } // convert from a "buy now" listing and converting to "accepting offers" with an optional start date function convertFromBuyNowToOffers(uint256 _editionId, uint128 _startDate) public whenNotPaused { require(<FILL_ME>) // clear listing delete editionOrTokenListings[_editionId]; // set the start date for the offer (optional) editionOffersStartDate[_editionId] = _startDate; // Emit event emit ConvertFromBuyNowToOffers(_editionId, _startDate); } // Primary "offers" sale flow function enableEditionOffers(uint256 _editionId, uint128 _startDate) external override whenNotPaused onlyContract { } function placeEditionBid(uint256 _editionId) public override payable whenNotPaused nonReentrant { } function placeEditionBidFor(uint256 _editionId, address _bidder) public override payable whenNotPaused nonReentrant { } function withdrawEditionBid(uint256 _editionId) public override whenNotPaused nonReentrant { } function rejectEditionBid(uint256 _editionId) public override whenNotPaused nonReentrant { } function acceptEditionBid(uint256 _editionId, uint256 _offerPrice) public override whenNotPaused nonReentrant { } // emergency admin "reject" button for stuck bids function adminRejectEditionBid(uint256 _editionId) public onlyAdmin nonReentrant { } function convertOffersToBuyItNow(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override whenNotPaused nonReentrant { } // Primary sale "stepped pricing" flow function listSteppedEditionAuction(address _creator, uint256 _editionId, uint128 _basePrice, uint128 _stepPrice, uint128 _startDate) public override whenNotPaused onlyContract { } function updateSteppedAuction(uint256 _editionId, uint128 _basePrice, uint128 _stepPrice) public override whenNotPaused { } function buyNextStep(uint256 _editionId) public override payable whenNotPaused nonReentrant { } function buyNextStepFor(uint256 _editionId, address _buyer) public override payable whenNotPaused nonReentrant { } function _buyNextStep(uint256 _editionId, address _buyer) internal { } // creates an exit from a step if required but forces a buy now price function convertSteppedAuctionToListing(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override nonReentrant whenNotPaused { } function convertSteppedAuctionToOffers(uint256 _editionId, uint128 _startDate) public override whenNotPaused { } // Get the next function getNextEditionSteppedPrice(uint256 _editionId) public view returns (uint256 price) { } function _getNextEditionSteppedPrice(uint256 _editionId) internal view returns (uint256 price) { } function convertReserveAuctionToBuyItNow(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override whenNotPaused nonReentrant { } function convertReserveAuctionToOffers(uint256 _editionId, uint128 _startDate) public override whenNotPaused nonReentrant { } // admin function updatePlatformPrimarySaleCommission(uint256 _platformPrimarySaleCommission) public onlyAdmin { } function setKoCommissionOverrideForCreator(address _creator, bool _active, uint256 _koCommission) public onlyAdmin { } function setKoCommissionOverrideForEdition(uint256 _editionId, bool _active, uint256 _koCommission) public onlyAdmin { } // internal function _isListingPermitted(uint256 _editionId) internal view override returns (bool) { } function _isReserveListingPermitted(uint256 _editionId) internal view override returns (bool) { } function _hasReserveListingBeenInvalidated(uint256 _id) internal view override returns (bool) { } function _isBuyNowListingPermitted(uint256) internal view override returns (bool) { } function _processSale(uint256 _id, uint256 _paymentAmount, address _buyer, address) internal override returns (uint256) { } function _facilitateNextPrimarySale(uint256 _editionId, uint256 _paymentAmount, address _buyer, bool _reverse) internal returns (uint256) { } function _handleEditionSaleFunds(uint256 _editionId, address _creator, address _receiver, uint256 _paymentAmount) internal { } // as offers are always possible, we wont count it as a listing function _isEditionListed(uint256 _editionId) internal view returns (bool) { } function _placeEditionBid(uint256 _editionId, address _bidder) internal { } }
editionOrTokenListings[_editionId].seller==_msgSender()||accessControls.isVerifiedArtistProxy(editionOrTokenListings[_editionId].seller,_msgSender()),"Only seller can convert"
52,901
editionOrTokenListings[_editionId].seller==_msgSender()||accessControls.isVerifiedArtistProxy(editionOrTokenListings[_editionId].seller,_msgSender())
"Edition is listed"
pragma solidity 0.8.4; /// @title KnownOrigin Primary Marketplace for all V3 tokens /// @notice The following listing types are supported: Buy now, Stepped, Reserve and Offers /// @dev The contract is pausable and has reentrancy guards /// @author KnownOrigin Labs contract KODAV3PrimaryMarketplace is IKODAV3PrimarySaleMarketplace, BaseMarketplace, ReserveAuctionMarketplace, BuyNowMarketplace { event PrimaryMarketplaceDeployed(); event AdminSetKoCommissionOverrideForCreator(address indexed _creator, uint256 _koCommission); event AdminSetKoCommissionOverrideForEdition(uint256 indexed _editionId, uint256 _koCommission); event ConvertFromBuyNowToOffers(uint256 indexed _editionId, uint128 _startDate); event ConvertSteppedAuctionToBuyNow(uint256 indexed _editionId, uint128 _listingPrice, uint128 _startDate); event ReserveAuctionConvertedToOffers(uint256 indexed _editionId, uint128 _startDate); // KO Commission override definition for a given creator struct KOCommissionOverride { bool active; uint256 koCommission; } // Offer / Bid definition placed on an edition struct Offer { uint256 offer; address bidder; uint256 lockupUntil; } // Stepped auction definition struct Stepped { uint128 basePrice; uint128 stepPrice; uint128 startDate; address seller; uint16 currentStep; } /// @notice Edition ID -> KO commission override set by admin mapping(uint256 => KOCommissionOverride) public koCommissionOverrideForEditions; /// @notice primary sale creator -> KO commission override set by admin mapping(address => KOCommissionOverride) public koCommissionOverrideForCreators; /// @notice Edition ID to Offer mapping mapping(uint256 => Offer) public editionOffers; /// @notice Edition ID to StartDate mapping(uint256 => uint256) public editionOffersStartDate; /// @notice Edition ID to stepped auction mapping(uint256 => Stepped) public editionStep; /// @notice KO commission on every sale uint256 public platformPrimarySaleCommission = 15_00000; // 15.00000% constructor(IKOAccessControlsLookup _accessControls, IKODAV3 _koda, address _platformAccount) BaseMarketplace(_accessControls, _koda, _platformAccount) { } // convert from a "buy now" listing and converting to "accepting offers" with an optional start date function convertFromBuyNowToOffers(uint256 _editionId, uint128 _startDate) public whenNotPaused { } // Primary "offers" sale flow function enableEditionOffers(uint256 _editionId, uint128 _startDate) external override whenNotPaused onlyContract { } function placeEditionBid(uint256 _editionId) public override payable whenNotPaused nonReentrant { } function placeEditionBidFor(uint256 _editionId, address _bidder) public override payable whenNotPaused nonReentrant { } function withdrawEditionBid(uint256 _editionId) public override whenNotPaused nonReentrant { } function rejectEditionBid(uint256 _editionId) public override whenNotPaused nonReentrant { } function acceptEditionBid(uint256 _editionId, uint256 _offerPrice) public override whenNotPaused nonReentrant { } // emergency admin "reject" button for stuck bids function adminRejectEditionBid(uint256 _editionId) public onlyAdmin nonReentrant { } function convertOffersToBuyItNow(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override whenNotPaused nonReentrant { require(<FILL_ME>) address creatorOfEdition = koda.getCreatorOfEdition(_editionId); require( creatorOfEdition == _msgSender() || accessControls.isVerifiedArtistProxy(creatorOfEdition, _msgSender()), "Not creator" ); require(_listingPrice >= minBidAmount, "Listing price not enough"); // send money back to top bidder if existing offer found Offer storage offer = editionOffers[_editionId]; if (offer.offer > 0) { _refundBidder(_editionId, offer.bidder, offer.offer, address(0), 0); } // delete offer delete editionOffers[_editionId]; // delete rest of offer information delete editionOffersStartDate[_editionId]; // Store listing data editionOrTokenListings[_editionId] = Listing(_listingPrice, _startDate, _msgSender()); emit EditionConvertedFromOffersToBuyItNow(_editionId, _listingPrice, _startDate); } // Primary sale "stepped pricing" flow function listSteppedEditionAuction(address _creator, uint256 _editionId, uint128 _basePrice, uint128 _stepPrice, uint128 _startDate) public override whenNotPaused onlyContract { } function updateSteppedAuction(uint256 _editionId, uint128 _basePrice, uint128 _stepPrice) public override whenNotPaused { } function buyNextStep(uint256 _editionId) public override payable whenNotPaused nonReentrant { } function buyNextStepFor(uint256 _editionId, address _buyer) public override payable whenNotPaused nonReentrant { } function _buyNextStep(uint256 _editionId, address _buyer) internal { } // creates an exit from a step if required but forces a buy now price function convertSteppedAuctionToListing(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override nonReentrant whenNotPaused { } function convertSteppedAuctionToOffers(uint256 _editionId, uint128 _startDate) public override whenNotPaused { } // Get the next function getNextEditionSteppedPrice(uint256 _editionId) public view returns (uint256 price) { } function _getNextEditionSteppedPrice(uint256 _editionId) internal view returns (uint256 price) { } function convertReserveAuctionToBuyItNow(uint256 _editionId, uint128 _listingPrice, uint128 _startDate) public override whenNotPaused nonReentrant { } function convertReserveAuctionToOffers(uint256 _editionId, uint128 _startDate) public override whenNotPaused nonReentrant { } // admin function updatePlatformPrimarySaleCommission(uint256 _platformPrimarySaleCommission) public onlyAdmin { } function setKoCommissionOverrideForCreator(address _creator, bool _active, uint256 _koCommission) public onlyAdmin { } function setKoCommissionOverrideForEdition(uint256 _editionId, bool _active, uint256 _koCommission) public onlyAdmin { } // internal function _isListingPermitted(uint256 _editionId) internal view override returns (bool) { } function _isReserveListingPermitted(uint256 _editionId) internal view override returns (bool) { } function _hasReserveListingBeenInvalidated(uint256 _id) internal view override returns (bool) { } function _isBuyNowListingPermitted(uint256) internal view override returns (bool) { } function _processSale(uint256 _id, uint256 _paymentAmount, address _buyer, address) internal override returns (uint256) { } function _facilitateNextPrimarySale(uint256 _editionId, uint256 _paymentAmount, address _buyer, bool _reverse) internal returns (uint256) { } function _handleEditionSaleFunds(uint256 _editionId, address _creator, address _receiver, uint256 _paymentAmount) internal { } // as offers are always possible, we wont count it as a listing function _isEditionListed(uint256 _editionId) internal view returns (bool) { } function _placeEditionBid(uint256 _editionId, address _bidder) internal { } }
!_isEditionListed(_editionId),"Edition is listed"
52,901
!_isEditionListed(_editionId)
"ROUNDING_ERROR"
/* Copyright 2019 The Hydro Protocol Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.5.8; pragma experimental ABIEncoderV2; interface IEth2Dai{ function isClosed() external view returns (bool); function buyEnabled() external view returns (bool); function matchingEnabled() external view returns (bool); function getBuyAmount( address buy_gem, address pay_gem, uint256 pay_amt ) external view returns (uint256); function getPayAmount( address pay_gem, address buy_gem, uint256 buy_amt ) external view returns (uint256); } interface IMakerDaoOracle{ function peek() external view returns (bytes32, bool); } interface IStandardToken { function transfer( address _to, uint256 _amount ) external returns (bool); function balanceOf( address _owner) external view returns (uint256 balance); function transferFrom( address _from, address _to, uint256 _amount ) external returns (bool); function approve( address _spender, uint256 _amount ) external returns (bool); function allowance( address _owner, address _spender ) external view returns (uint256); } contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** @dev The Ownable constructor sets the original `owner` of the contract to the sender account. */ constructor() internal { } /** @return the address of the owner. */ function owner() public view returns(address) { } /** @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns(bool) { } /** @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { } /** @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership( address newOwner ) public onlyOwner { } } library SafeMath { // Multiplies two numbers, reverts on overflow. function mul( uint256 a, uint256 b ) internal pure returns (uint256) { } // Integer division of two numbers truncating the quotient, reverts on division by zero. function div( uint256 a, uint256 b ) internal pure returns (uint256) { } function divCeil( uint256 a, uint256 b ) internal pure returns (uint256) { } // Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). function sub( uint256 a, uint256 b ) internal pure returns (uint256) { } function sub( int256 a, uint256 b ) internal pure returns (int256) { } // Adds two numbers, reverts on overflow. function add( uint256 a, uint256 b ) internal pure returns (uint256) { } function add( int256 a, uint256 b ) internal pure returns (int256) { } // Divides two numbers and returns the remainder (unsigned integer modulo), reverts when dividing by zero. function mod( uint256 a, uint256 b ) internal pure returns (uint256) { } /** * Check the amount of precision lost by calculating multiple * (numerator / denominator). To * do this, we check the remainder and make sure it's proportionally less than 0.1%. So we have: * * ((numerator * multiple) % denominator) 1 * -------------------------------------- < ---- * numerator * multiple 1000 * * To avoid further division, we can move the denominators to the other sides and we get: * * ((numerator * multiple) % denominator) * 1000 < numerator * multiple * * Since we want to return true if there IS a rounding error, we simply flip the sign and our * final equation becomes: * * ((numerator * multiple) % denominator) * 1000 >= numerator * multiple * * @param numerator The numerator of the proportion * @param denominator The denominator of the proportion * @param multiple The amount we want a proportion of * @return Boolean indicating if there is a rounding error when calculating the proportion */ function isRoundingError( uint256 numerator, uint256 denominator, uint256 multiple ) internal pure returns (bool) { } /** * Takes an amount (multiple) and calculates a proportion of it given a numerator/denominator * pair of values. The final value will be rounded down to the nearest integer value. * * This function will revert the transaction if rounding the final value down would lose more * than 0.1% precision. * * @param numerator The numerator of the proportion * @param denominator The denominator of the proportion * @param multiple The amount we want a proportion of * @return The final proportion of multiple rounded down */ function getPartialAmountFloor( uint256 numerator, uint256 denominator, uint256 multiple ) internal pure returns (uint256) { require(<FILL_ME>) // numerator.mul(multiple).div(denominator) return div(mul(numerator, multiple), denominator); } /** * Returns the smaller integer of the two passed in. * * @param a Unsigned integer * @param b Unsigned integer * @return The smaller of the two integers */ function min( uint256 a, uint256 b ) internal pure returns (uint256) { } } contract DaiPriceOracle is Ownable{ using SafeMath for uint256; uint256 public price; uint256 constant ONE = 10**18; IMakerDaoOracle public constant makerDaoOracle = IMakerDaoOracle(0x729D19f657BD0614b4985Cf1D82531c67569197B); IStandardToken public constant DAI = IStandardToken(0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359); IEth2Dai public constant Eth2Dai = IEth2Dai(0x39755357759cE0d7f32dC8dC45414CCa409AE24e); address public constant UNISWAP = 0x09cabEC1eAd1c0Ba254B09efb3EE13841712bE14; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 public constant eth2daiETHAmount = 10 ether; uint256 public constant eth2daiMaxSpread = 2 * ONE / 100; // 2.00% uint256 public constant uniswapMinETHAmount = 2000 ether; event UpdatePrice(uint256 newPrice); uint256 public minPrice; uint256 public maxPrice; constructor ( uint256 _minPrice, uint256 _maxPrice ) public { } function getPrice( address asset ) external view returns (uint256) { } function adminSetPrice( uint256 _price ) external onlyOwner { } function adminSetParams( uint256 _minPrice, uint256 _maxPrice ) external onlyOwner { } function updatePrice() public returns (bool) { } function peek() public view returns (uint256 _price) { } function getEth2DaiPrice() public view returns (uint256) { } function getUniswapPrice() public view returns (uint256) { } function getMakerDaoPrice() public view returns (uint256) { } }
!isRoundingError(numerator,denominator,multiple),"ROUNDING_ERROR"
52,921
!isRoundingError(numerator,denominator,multiple)
null
pragma solidity ^0.4.18; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract MultiSend { function multiSend(address _token, address[] addresses, uint amount) public { ERC20 token = ERC20(_token); for(uint i = 0; i < addresses.length; i++) { require(<FILL_ME>) } } function multiSendEth(address[] addresses) public payable { } }
token.transferFrom(msg.sender,addresses[i],amount)
52,973
token.transferFrom(msg.sender,addresses[i],amount)
null
pragma solidity ^0.4.15; contract ETHLotteryManagerInterface { function register(); } contract ETHLotteryInterface { function accumulate(); } contract ETHLottery { bytes32 public name = 'ETHLottery - Last 1 Byte Lottery'; address public manager_address; address public owner; bool public open; uint256 public jackpot; uint256 public fee; uint256 public owner_fee; uint256 public create_block; uint256 public result_block; uint256 public winners_count; bytes32 public result_hash; bytes1 public result; address public accumulated_from; address public accumulate_to; mapping (bytes1 => address[]) bettings; mapping (address => uint256) credits; event Balance(uint256 _balance); event Result(bytes1 _result); event Open(bool _open); event Play(address indexed _sender, bytes1 _byte, uint256 _time); event Withdraw(address indexed _sender, uint256 _amount, uint256 _time); event Destroy(); event Accumulate(address _accumulate_to, uint256 _amount); function ETHLottery(address _manager, uint256 _fee, uint256 _jackpot, uint256 _owner_fee, address _accumulated_from) { } modifier isOwner() { } modifier isOriginalOwner() { } modifier isOpen() { } modifier isClosed() { } modifier isPaid() { } modifier hasPrize() { require(<FILL_ME>) _; } modifier isAccumulated() { } modifier hasResultHash() { } function play(bytes1 _byte) payable isOpen isPaid returns (bool) { } // This method is only used if we miss the 256th block // containing the result hash, lottery() should be used instead // this method as this is duplicated from lottery() function manual_lottery(bytes32 _result_hash) isClosed isOwner { } function lottery() isClosed hasResultHash isOwner { } function withdraw() isClosed hasPrize returns (bool) { } function accumulate() isOriginalOwner isClosed isAccumulated { } function destruct() isClosed isOwner { } }
credits[msg.sender]>0
53,013
credits[msg.sender]>0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(<FILL_ME>) require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[0]>=100
53,027
values[0]>=100
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(<FILL_ME>) require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[1]>=values[0]
53,027
values[1]>=values[0]
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(<FILL_ME>) require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[2]>=values[1]
53,027
values[2]>=values[1]
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(<FILL_ME>) require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[3]>=values[2]
53,027
values[3]>=values[2]
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(<FILL_ME>) require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[4]>=values[3]
53,027
values[4]>=values[3]
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(<FILL_ME>) require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[4]<=600000
53,027
values[4]<=600000
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(<FILL_ME>) require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[0]%100==0
53,027
values[0]%100==0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(<FILL_ME>) require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[1]%100==0
53,027
values[1]%100==0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(<FILL_ME>) require(values[3] % 100 == 0); require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[2]%100==0
53,027
values[2]%100==0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(<FILL_ME>) require(values[4] % 100 == 0); agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[3]%100==0
53,027
values[3]%100==0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { require(values[0] >= 100); require(values[1] >= values[0]); require(values[2] >= values[1]); require(values[3] >= values[2]); require(values[4] >= values[3]); require(values[4] <= 600000); require(values[0] % 100 == 0); require(values[1] % 100 == 0); require(values[2] % 100 == 0); require(values[3] % 100 == 0); require(<FILL_ME>) agonValues[0] = values[0].mul(1000000000000000000); agonValues[1] = values[1].mul(1000000000000000000); agonValues[2] = values[2].mul(1000000000000000000); agonValues[3] = values[3].mul(1000000000000000000); agonValues[4] = values[4].mul(1000000000000000000); } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
values[4]%100==0
53,027
values[4]%100==0
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { require(<FILL_ME>) require(_valId >= 0 && _valId <= 4); require(_value == agonValues[_valId]); require(bitGuildContract.transferFrom(_sender, address(this), _value)); uint64 newAgonId = uint64(agonArray.length); agonArray.length += 1; Agon storage agon = agonArray[newAgonId]; agon.master = _sender; agon.agonPrice = uint64(_value.div(1000000000000000000)); agon.outFlag = _outFlag; ownerToAgonIdArray[_sender].push(newAgonId); CreateAgonPlat(uint64(newAgonId), _sender, _outFlag); } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
ownerToAgonIdArray[_sender].length<maxAgonCount
53,027
ownerToAgonIdArray[_sender].length<maxAgonCount
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { require(ownerToAgonIdArray[_sender].length < maxAgonCount); require(_valId >= 0 && _valId <= 4); require(_value == agonValues[_valId]); require(<FILL_ME>) uint64 newAgonId = uint64(agonArray.length); agonArray.length += 1; Agon storage agon = agonArray[newAgonId]; agon.master = _sender; agon.agonPrice = uint64(_value.div(1000000000000000000)); agon.outFlag = _outFlag; ownerToAgonIdArray[_sender].push(newAgonId); CreateAgonPlat(uint64(newAgonId), _sender, _outFlag); } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
bitGuildContract.transferFrom(_sender,address(this),_value)
53,027
bitGuildContract.transferFrom(_sender,address(this),_value)
null
/* ==================================================================== */ /* Copyright (c) 2018 The ether.online Project. All rights reserved. /* /* https://ether.online The first RPG game of blockchain /* /* authors [email protected] /* [email protected] /* ==================================================================== */ pragma solidity ^0.4.20; contract AccessAdmin { bool public isPaused = false; address public addrAdmin; event AdminTransferred(address indexed preAdmin, address indexed newAdmin); function AccessAdmin() public { } modifier onlyAdmin() { } modifier whenNotPaused() { } modifier whenPaused { } function setAdmin(address _newAdmin) external onlyAdmin { } function doPause() external onlyAdmin whenNotPaused { } function doUnpause() external onlyAdmin whenPaused { } } contract AccessService is AccessAdmin { address public addrService; address public addrFinance; modifier onlyService() { } modifier onlyFinance() { } function setService(address _newService) external { } function setFinance(address _newFinance) external { } function withdraw(address _target, uint256 _amount) external { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IBitGuildToken { function transfer(address _to, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external; function approveAndCall(address _spender, uint256 _value, bytes _extraData) external returns (bool); function balanceOf(address _from) external view returns(uint256); } interface IAgonFight { function calcFight(uint64 _mFlag, uint64 _cFlag, uint256 _aSeed, uint256 _fSeed) external pure returns(uint64); } contract ActionAgonPlat is AccessService { using SafeMath for uint256; event CreateAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event CancelAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag); event ChallengeAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); event ResolveAgonPlat(uint64 indexed agonId, address indexed master, uint64 indexed outFlag, address challenger); struct Agon { address master; address challenger; uint64 agonPrice; uint64 outFlag; uint64 agonFlag; uint64 result; // 1-win, 2-lose, 99-cancel } Agon[] agonArray; IAgonFight fightContract; IBitGuildToken public bitGuildContract; mapping (address => uint64[]) public ownerToAgonIdArray; uint256 public maxAgonCount = 6; uint256 public maxResolvedAgonId = 0; uint256[5] public agonValues; function ActionAgonPlat(address _platAddr) public { } function() external {} function setMaxAgonCount(uint256 _count) external onlyAdmin { } function setAgonFight(address _addr) external onlyAdmin { } function setMaxResolvedAgonId() external { } function setAgonValues(uint256[5] values) external onlyAdmin { } function _getExtraParam(bytes _extraData) internal pure returns(uint64 p1, uint64 p2, uint64 p3) { } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) external whenNotPaused { } function _newAgon(uint64 _outFlag, uint64 _valId, address _sender, uint256 _value) internal { } function _removeAgonIdByOwner(address _owner, uint64 _agonId) internal { } function cancelAgon(uint64 _agonId) external { } function cancelAgonForce(uint64 _agonId) external onlyService { } function _newChallenge(uint64 _agonId, uint64 _flag, address _sender, uint256 _value) internal { require(_agonId < agonArray.length); Agon storage agon = agonArray[_agonId]; require(agon.result == 0); require(agon.master != _sender); require(<FILL_ME>) require(agon.challenger == address(0)); require(bitGuildContract.transferFrom(_sender, address(this), _value)); agon.challenger = _sender; agon.agonFlag = _flag; ChallengeAgonPlat(_agonId, agon.master, agon.outFlag, _sender); } function fightAgon(uint64 _agonId, uint64 _mFlag, uint256 _aSeed, uint256 _fSeed) external onlyService { } function getPlatBalance() external view returns(uint256) { } function withdrawPlat() external { } function getAgon(uint256 _agonId) external view returns( address master, address challenger, uint64 agonPrice, uint64 outFlag, uint64 agonFlag, uint64 result ) { } function getAgonArray(uint64 _startAgonId, uint64 _count) external view returns( uint64[] agonIds, address[] masters, address[] challengers, uint64[] agonPrices, uint64[] agonOutFlags, uint64[] agonFlags, uint64[] results ) { } function getMaxAgonId() external view returns(uint256) { } function getAgonIdArray(address _owner) external view returns(uint64[]) { } }
uint256(agon.agonPrice).mul(1000000000000000000)==_value
53,027
uint256(agon.agonPrice).mul(1000000000000000000)==_value
"Hedera Public Key cannot be empty"
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; contract AccountCreator { using StringUtil for string; enum RequestStatus { Nonexistent, Requested, Confirmed, Failed, Refunded } struct AccountRequest { string hederaPublicKey; address payable requestor; uint256 paid; RequestStatus status; } mapping(bytes32 => AccountRequest) private requests; address public accountCreator; uint256 private fee; constructor( address creator, uint256 accountCreationFee ) public { } function getAccountCreator() public view returns (address) { } function getAccountCreationFee() external view returns (uint256) { } function setAccountCreationFee(uint256 feeInWei) external returns (bool) { } // User calls createAccount function _createAccount( string memory operationId, string memory hederaPublicKey ) internal returns (bool) { bytes32 operationIdHash = operationId.toHash(); AccountRequest storage request = requests[operationIdHash]; require(<FILL_ME>) require(request.paid == 0, "A request with this id already exists"); request.requestor = msg.sender; request.hederaPublicKey = hederaPublicKey; request.status = RequestStatus.Requested; request.paid = msg.value; emit CreateAccountRequest( operationId, msg.sender, hederaPublicKey ); return true; } function createAccount( string calldata operationId, string calldata hederaPublicKey ) external payable returns (bool) { } // contract creates record and emits event CreateAccountRequest( string operationId, address requestor, string hederaPublicKey ); // request is created with status Requested // Bridge program sees HederaAccountRequest // Tries to create a hedera account using the oracle, // and if successful, should call function createAccountSuccess( string calldata operationId, string calldata hederaAccountId ) external returns (bool) { } //which emits event CreateAccountSuccess( string operationId, address requestor, string hederaPublicKey, string hederaAccountId ); // request has status Confirmed // if Hedera account creation fails, bridge program should call function createAccountFail( string calldata operationId, string calldata reason ) external returns (bool) { } // which emits event CreateAccountFail( string operationId, address requestor, string hederaPublicKey, uint256 amount, string reason ); // request has status Failed // Set to Refunded for confirmation function createAccountRefund( string calldata operationId ) external returns (bool) { } // emits event CreateAccountRefund( string id, address requestor, uint256 refundAmountWei ); }
!hederaPublicKey.isEmpty(),"Hedera Public Key cannot be empty"
53,051
!hederaPublicKey.isEmpty()
null
/* Requirements: Β·No fixed amount Β·Cannot be transferred Β·admin functions: move token, mint token, burn token .*/ pragma solidity >=0.4.22 <0.6.0; // Abstract contract for the full ERC 20 Token standard // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md contract EIP20Interface { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); // solhint-disable-next-line no-simple-event-func-name event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract GFO is EIP20Interface { uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ string public name; //fancy name: eg Simon Bucks uint8 public decimals; //How many decimals to show. string public symbol; //An identifier: eg SBX address public admin; modifier adminOnly() { } event Mint(address indexed to, uint indexed amount); event Burn(address indexed from, uint indexed amount); constructor( uint256 _initialAmount, string memory _tokenName, uint8 _decimalUnits, string memory _tokenSymbol, address _admin ) public { } function mint(address to, uint amountToMint) public adminOnly returns (bool success) { } function burn(address from, uint amountToBurn) public adminOnly returns (bool success) { require(<FILL_ME>) balances[from] -= amountToBurn; emit Burn(from, amountToBurn); return true; } function transfer(address _to, uint256 _value) public adminOnly returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public adminOnly returns (bool success) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } }
balances[from]>=amountToBurn
53,081
balances[from]>=amountToBurn
"slice_overflow"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.6.12; contract ProxyFactoryInitializable { event ProxyCreated(address indexed proxy, bytes returnData); function deployMinimal(address _logic, bytes memory _data) external returns (address proxy, bytes memory returnData) { } /// @dev Get the revert message from a call /// @notice This is needed in order to get the human-readable revert message from a call /// @param _res Response of the call /// @return Revert message string function _getRevertMsg(bytes memory _res) internal pure returns (string memory) { } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(<FILL_ME>) require(_start + _length >= _start, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } }
_length+31>=_length,"slice_overflow"
53,098
_length+31>=_length
"slice_overflow"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.6.12; contract ProxyFactoryInitializable { event ProxyCreated(address indexed proxy, bytes returnData); function deployMinimal(address _logic, bytes memory _data) external returns (address proxy, bytes memory returnData) { } /// @dev Get the revert message from a call /// @notice This is needed in order to get the human-readable revert message from a call /// @param _res Response of the call /// @return Revert message string function _getRevertMsg(bytes memory _res) internal pure returns (string memory) { } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(<FILL_ME>) require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } }
_start+_length>=_start,"slice_overflow"
53,098
_start+_length>=_start
null
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); } contract CryptoCupToken is ERC721 { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event TeamSold(uint256 indexed team, address indexed from, uint256 oldPrice, address indexed to, uint256 newPrice, uint256 tradingTime, uint256 balance, uint256 lastSixteenPrize, uint256 quarterFinalPrize, uint256 semiFinalPrize, uint256 winnerPrize); event PrizePaid(string tournamentStage, uint256 indexed team, address indexed to, uint256 prize, uint256 time); event Transfer(address from, address to, uint256 tokenId); /*****------- CONSTANTS -------******/ uint256 private startingPrice = 0.001 ether; uint256 private doublePriceUntil = 0.1 ether; uint256 private lastSixteenWinnerPayments = 0; uint256 private quarterFinalWinnerPayments = 0; uint256 private semiFinalWinnerPayments = 0; bool private tournamentComplete = false; /*****------- STORAGE -------******/ mapping (uint256 => address) public teamOwners; mapping (address => uint256) private ownerTeamCount; mapping (uint256 => address) public teamToApproved; mapping (uint256 => uint256) private teamPrices; address public contractModifierAddress; address public developerAddress; /*****------- DATATYPES -------******/ struct Team { string name; string code; uint256 cost; uint256 price; address owner; uint256 numPayouts; mapping (uint256 => Payout) payouts; } struct Payout { string stage; uint256 amount; address to; uint256 when; } Team[] private teams; struct PayoutPrizes { uint256 LastSixteenWinner; bool LastSixteenTotalFixed; uint256 QuarterFinalWinner; bool QuarterFinalTotalFixed; uint256 SemiFinalWinner; bool SemiFinalTotalFixed; uint256 TournamentWinner; } PayoutPrizes private prizes; /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { } /*****------- CONSTRUCTOR -------******/ function CryptoCupToken() public { } /*****------- PUBLIC FUNCTIONS -------******/ function name() public pure returns (string) { } function symbol() public pure returns (string) { } function implementsERC721() public pure returns (bool) { } function ownerOf(uint256 _tokenId) public view returns (address owner) { } function takeOwnership(uint256 _tokenId) public { address to = msg.sender; address from = teamOwners[_tokenId]; require(<FILL_ME>) require(_approved(to, _tokenId)); _transfer(from, to, _tokenId); } function approve(address _to, uint256 _tokenId) public { } function balanceOf(address _owner) public view returns (uint256 balance) { } function totalSupply() public view returns (uint256 total) { } function transfer(address _to, uint256 _tokenId) public { } function transferFrom(address _from, address _to, uint256 _tokenId) public { } function destroy() public onlyContractModifier { } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { } function createTeam(string name, string code) public onlyContractModifier { } function lockInLastSixteenPrize() public onlyContractModifier { } function payLastSixteenWinner(uint256 _tokenId) public onlyContractModifier { } function lockInQuarterFinalPrize() public onlyContractModifier { } function payQuarterFinalWinner(uint256 _tokenId) public onlyContractModifier { } function lockInSemiFinalPrize() public onlyContractModifier { } function paySemiFinalWinner(uint256 _tokenId) public onlyContractModifier { } function payTournamentWinner(uint256 _tokenId) public onlyContractModifier { } function payExcess() public onlyContractModifier { } function getTeam(uint256 _tokenId) public view returns (uint256 id, string name, string code, uint256 cost, uint256 price, address owner, uint256 numPayouts) { } function getTeamPayouts(uint256 _tokenId, uint256 _payoutId) public view returns (uint256 id, string stage, uint256 amount, address to, uint256 when) { } // Allows someone to send ether and obtain the token function buyTeam(uint256 _tokenId) public payable { } function getPrizeFund() public view returns (bool lastSixteenTotalFixed, uint256 lastSixteenWinner, bool quarterFinalTotalFixed, uint256 quarterFinalWinner, bool semiFinalTotalFixed, uint256 semiFinalWinner, uint256 tournamentWinner, uint256 total) { } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { } function _createTeam(string _name, string _code, uint256 _price, address _owner) private { } function _approved(address _to, uint256 _tokenId) private view returns (bool) { } function _transfer(address _from, address _to, uint256 _tokenId) private { } function _owns(address _claimant, uint256 _tokenId) private view returns (bool) { } function _compareStrings (string a, string b) private pure returns (bool){ } }
_addressNotNull(to)
53,104
_addressNotNull(to)
null
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); } contract CryptoCupToken is ERC721 { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event TeamSold(uint256 indexed team, address indexed from, uint256 oldPrice, address indexed to, uint256 newPrice, uint256 tradingTime, uint256 balance, uint256 lastSixteenPrize, uint256 quarterFinalPrize, uint256 semiFinalPrize, uint256 winnerPrize); event PrizePaid(string tournamentStage, uint256 indexed team, address indexed to, uint256 prize, uint256 time); event Transfer(address from, address to, uint256 tokenId); /*****------- CONSTANTS -------******/ uint256 private startingPrice = 0.001 ether; uint256 private doublePriceUntil = 0.1 ether; uint256 private lastSixteenWinnerPayments = 0; uint256 private quarterFinalWinnerPayments = 0; uint256 private semiFinalWinnerPayments = 0; bool private tournamentComplete = false; /*****------- STORAGE -------******/ mapping (uint256 => address) public teamOwners; mapping (address => uint256) private ownerTeamCount; mapping (uint256 => address) public teamToApproved; mapping (uint256 => uint256) private teamPrices; address public contractModifierAddress; address public developerAddress; /*****------- DATATYPES -------******/ struct Team { string name; string code; uint256 cost; uint256 price; address owner; uint256 numPayouts; mapping (uint256 => Payout) payouts; } struct Payout { string stage; uint256 amount; address to; uint256 when; } Team[] private teams; struct PayoutPrizes { uint256 LastSixteenWinner; bool LastSixteenTotalFixed; uint256 QuarterFinalWinner; bool QuarterFinalTotalFixed; uint256 SemiFinalWinner; bool SemiFinalTotalFixed; uint256 TournamentWinner; } PayoutPrizes private prizes; /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { } /*****------- CONSTRUCTOR -------******/ function CryptoCupToken() public { } /*****------- PUBLIC FUNCTIONS -------******/ function name() public pure returns (string) { } function symbol() public pure returns (string) { } function implementsERC721() public pure returns (bool) { } function ownerOf(uint256 _tokenId) public view returns (address owner) { } function takeOwnership(uint256 _tokenId) public { address to = msg.sender; address from = teamOwners[_tokenId]; require(_addressNotNull(to)); require(<FILL_ME>) _transfer(from, to, _tokenId); } function approve(address _to, uint256 _tokenId) public { } function balanceOf(address _owner) public view returns (uint256 balance) { } function totalSupply() public view returns (uint256 total) { } function transfer(address _to, uint256 _tokenId) public { } function transferFrom(address _from, address _to, uint256 _tokenId) public { } function destroy() public onlyContractModifier { } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { } function createTeam(string name, string code) public onlyContractModifier { } function lockInLastSixteenPrize() public onlyContractModifier { } function payLastSixteenWinner(uint256 _tokenId) public onlyContractModifier { } function lockInQuarterFinalPrize() public onlyContractModifier { } function payQuarterFinalWinner(uint256 _tokenId) public onlyContractModifier { } function lockInSemiFinalPrize() public onlyContractModifier { } function paySemiFinalWinner(uint256 _tokenId) public onlyContractModifier { } function payTournamentWinner(uint256 _tokenId) public onlyContractModifier { } function payExcess() public onlyContractModifier { } function getTeam(uint256 _tokenId) public view returns (uint256 id, string name, string code, uint256 cost, uint256 price, address owner, uint256 numPayouts) { } function getTeamPayouts(uint256 _tokenId, uint256 _payoutId) public view returns (uint256 id, string stage, uint256 amount, address to, uint256 when) { } // Allows someone to send ether and obtain the token function buyTeam(uint256 _tokenId) public payable { } function getPrizeFund() public view returns (bool lastSixteenTotalFixed, uint256 lastSixteenWinner, bool quarterFinalTotalFixed, uint256 quarterFinalWinner, bool semiFinalTotalFixed, uint256 semiFinalWinner, uint256 tournamentWinner, uint256 total) { } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { } function _createTeam(string _name, string _code, uint256 _price, address _owner) private { } function _approved(address _to, uint256 _tokenId) private view returns (bool) { } function _transfer(address _from, address _to, uint256 _tokenId) private { } function _owns(address _claimant, uint256 _tokenId) private view returns (bool) { } function _compareStrings (string a, string b) private pure returns (bool){ } }
_approved(to,_tokenId)
53,104
_approved(to,_tokenId)
null
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); } contract CryptoCupToken is ERC721 { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event TeamSold(uint256 indexed team, address indexed from, uint256 oldPrice, address indexed to, uint256 newPrice, uint256 tradingTime, uint256 balance, uint256 lastSixteenPrize, uint256 quarterFinalPrize, uint256 semiFinalPrize, uint256 winnerPrize); event PrizePaid(string tournamentStage, uint256 indexed team, address indexed to, uint256 prize, uint256 time); event Transfer(address from, address to, uint256 tokenId); /*****------- CONSTANTS -------******/ uint256 private startingPrice = 0.001 ether; uint256 private doublePriceUntil = 0.1 ether; uint256 private lastSixteenWinnerPayments = 0; uint256 private quarterFinalWinnerPayments = 0; uint256 private semiFinalWinnerPayments = 0; bool private tournamentComplete = false; /*****------- STORAGE -------******/ mapping (uint256 => address) public teamOwners; mapping (address => uint256) private ownerTeamCount; mapping (uint256 => address) public teamToApproved; mapping (uint256 => uint256) private teamPrices; address public contractModifierAddress; address public developerAddress; /*****------- DATATYPES -------******/ struct Team { string name; string code; uint256 cost; uint256 price; address owner; uint256 numPayouts; mapping (uint256 => Payout) payouts; } struct Payout { string stage; uint256 amount; address to; uint256 when; } Team[] private teams; struct PayoutPrizes { uint256 LastSixteenWinner; bool LastSixteenTotalFixed; uint256 QuarterFinalWinner; bool QuarterFinalTotalFixed; uint256 SemiFinalWinner; bool SemiFinalTotalFixed; uint256 TournamentWinner; } PayoutPrizes private prizes; /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { } /*****------- CONSTRUCTOR -------******/ function CryptoCupToken() public { } /*****------- PUBLIC FUNCTIONS -------******/ function name() public pure returns (string) { } function symbol() public pure returns (string) { } function implementsERC721() public pure returns (bool) { } function ownerOf(uint256 _tokenId) public view returns (address owner) { } function takeOwnership(uint256 _tokenId) public { } function approve(address _to, uint256 _tokenId) public { } function balanceOf(address _owner) public view returns (uint256 balance) { } function totalSupply() public view returns (uint256 total) { } function transfer(address _to, uint256 _tokenId) public { } function transferFrom(address _from, address _to, uint256 _tokenId) public { } function destroy() public onlyContractModifier { } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { } function createTeam(string name, string code) public onlyContractModifier { } function lockInLastSixteenPrize() public onlyContractModifier { } function payLastSixteenWinner(uint256 _tokenId) public onlyContractModifier { } function lockInQuarterFinalPrize() public onlyContractModifier { } function payQuarterFinalWinner(uint256 _tokenId) public onlyContractModifier { require(prizes.QuarterFinalTotalFixed != false); require(quarterFinalWinnerPayments < 4); require(tournamentComplete != true); Team storage team = teams[_tokenId]; require(team.numPayouts == 1); Payout storage payout = team.payouts[0]; require(<FILL_ME>) team.owner.transfer(prizes.QuarterFinalWinner); emit PrizePaid("Quarter Final", _tokenId, team.owner, prizes.QuarterFinalWinner, uint256(now)); team.payouts[team.numPayouts++] = Payout({ stage: "Quarter Final", amount: prizes.QuarterFinalWinner, to: team.owner, when: uint256(now) }); quarterFinalWinnerPayments++; } function lockInSemiFinalPrize() public onlyContractModifier { } function paySemiFinalWinner(uint256 _tokenId) public onlyContractModifier { } function payTournamentWinner(uint256 _tokenId) public onlyContractModifier { } function payExcess() public onlyContractModifier { } function getTeam(uint256 _tokenId) public view returns (uint256 id, string name, string code, uint256 cost, uint256 price, address owner, uint256 numPayouts) { } function getTeamPayouts(uint256 _tokenId, uint256 _payoutId) public view returns (uint256 id, string stage, uint256 amount, address to, uint256 when) { } // Allows someone to send ether and obtain the token function buyTeam(uint256 _tokenId) public payable { } function getPrizeFund() public view returns (bool lastSixteenTotalFixed, uint256 lastSixteenWinner, bool quarterFinalTotalFixed, uint256 quarterFinalWinner, bool semiFinalTotalFixed, uint256 semiFinalWinner, uint256 tournamentWinner, uint256 total) { } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { } function _createTeam(string _name, string _code, uint256 _price, address _owner) private { } function _approved(address _to, uint256 _tokenId) private view returns (bool) { } function _transfer(address _from, address _to, uint256 _tokenId) private { } function _owns(address _claimant, uint256 _tokenId) private view returns (bool) { } function _compareStrings (string a, string b) private pure returns (bool){ } }
_compareStrings(payout.stage,"Last Sixteen")
53,104
_compareStrings(payout.stage,"Last Sixteen")
null
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); } contract CryptoCupToken is ERC721 { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event TeamSold(uint256 indexed team, address indexed from, uint256 oldPrice, address indexed to, uint256 newPrice, uint256 tradingTime, uint256 balance, uint256 lastSixteenPrize, uint256 quarterFinalPrize, uint256 semiFinalPrize, uint256 winnerPrize); event PrizePaid(string tournamentStage, uint256 indexed team, address indexed to, uint256 prize, uint256 time); event Transfer(address from, address to, uint256 tokenId); /*****------- CONSTANTS -------******/ uint256 private startingPrice = 0.001 ether; uint256 private doublePriceUntil = 0.1 ether; uint256 private lastSixteenWinnerPayments = 0; uint256 private quarterFinalWinnerPayments = 0; uint256 private semiFinalWinnerPayments = 0; bool private tournamentComplete = false; /*****------- STORAGE -------******/ mapping (uint256 => address) public teamOwners; mapping (address => uint256) private ownerTeamCount; mapping (uint256 => address) public teamToApproved; mapping (uint256 => uint256) private teamPrices; address public contractModifierAddress; address public developerAddress; /*****------- DATATYPES -------******/ struct Team { string name; string code; uint256 cost; uint256 price; address owner; uint256 numPayouts; mapping (uint256 => Payout) payouts; } struct Payout { string stage; uint256 amount; address to; uint256 when; } Team[] private teams; struct PayoutPrizes { uint256 LastSixteenWinner; bool LastSixteenTotalFixed; uint256 QuarterFinalWinner; bool QuarterFinalTotalFixed; uint256 SemiFinalWinner; bool SemiFinalTotalFixed; uint256 TournamentWinner; } PayoutPrizes private prizes; /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { } /*****------- CONSTRUCTOR -------******/ function CryptoCupToken() public { } /*****------- PUBLIC FUNCTIONS -------******/ function name() public pure returns (string) { } function symbol() public pure returns (string) { } function implementsERC721() public pure returns (bool) { } function ownerOf(uint256 _tokenId) public view returns (address owner) { } function takeOwnership(uint256 _tokenId) public { } function approve(address _to, uint256 _tokenId) public { } function balanceOf(address _owner) public view returns (uint256 balance) { } function totalSupply() public view returns (uint256 total) { } function transfer(address _to, uint256 _tokenId) public { } function transferFrom(address _from, address _to, uint256 _tokenId) public { } function destroy() public onlyContractModifier { } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { } function createTeam(string name, string code) public onlyContractModifier { } function lockInLastSixteenPrize() public onlyContractModifier { } function payLastSixteenWinner(uint256 _tokenId) public onlyContractModifier { } function lockInQuarterFinalPrize() public onlyContractModifier { } function payQuarterFinalWinner(uint256 _tokenId) public onlyContractModifier { } function lockInSemiFinalPrize() public onlyContractModifier { } function paySemiFinalWinner(uint256 _tokenId) public onlyContractModifier { require(prizes.SemiFinalTotalFixed != false); require(semiFinalWinnerPayments < 2); require(tournamentComplete != true); Team storage team = teams[_tokenId]; require(team.numPayouts == 2); Payout storage payout = team.payouts[1]; require(<FILL_ME>) team.owner.transfer(prizes.SemiFinalWinner); emit PrizePaid("Semi Final", _tokenId, team.owner, prizes.SemiFinalWinner, uint256(now)); team.payouts[team.numPayouts++] = Payout({ stage: "Semi Final", amount: prizes.SemiFinalWinner, to: team.owner, when: uint256(now) }); semiFinalWinnerPayments++; } function payTournamentWinner(uint256 _tokenId) public onlyContractModifier { } function payExcess() public onlyContractModifier { } function getTeam(uint256 _tokenId) public view returns (uint256 id, string name, string code, uint256 cost, uint256 price, address owner, uint256 numPayouts) { } function getTeamPayouts(uint256 _tokenId, uint256 _payoutId) public view returns (uint256 id, string stage, uint256 amount, address to, uint256 when) { } // Allows someone to send ether and obtain the token function buyTeam(uint256 _tokenId) public payable { } function getPrizeFund() public view returns (bool lastSixteenTotalFixed, uint256 lastSixteenWinner, bool quarterFinalTotalFixed, uint256 quarterFinalWinner, bool semiFinalTotalFixed, uint256 semiFinalWinner, uint256 tournamentWinner, uint256 total) { } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { } function _createTeam(string _name, string _code, uint256 _price, address _owner) private { } function _approved(address _to, uint256 _tokenId) private view returns (bool) { } function _transfer(address _from, address _to, uint256 _tokenId) private { } function _owns(address _claimant, uint256 _tokenId) private view returns (bool) { } function _compareStrings (string a, string b) private pure returns (bool){ } }
_compareStrings(payout.stage,"Quarter Final")
53,104
_compareStrings(payout.stage,"Quarter Final")
null
pragma solidity ^0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { // Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); } contract CryptoCupToken is ERC721 { // evsoftware.co.uk // cryptocup.online /*****------ EVENTS -----*****/ event TeamSold(uint256 indexed team, address indexed from, uint256 oldPrice, address indexed to, uint256 newPrice, uint256 tradingTime, uint256 balance, uint256 lastSixteenPrize, uint256 quarterFinalPrize, uint256 semiFinalPrize, uint256 winnerPrize); event PrizePaid(string tournamentStage, uint256 indexed team, address indexed to, uint256 prize, uint256 time); event Transfer(address from, address to, uint256 tokenId); /*****------- CONSTANTS -------******/ uint256 private startingPrice = 0.001 ether; uint256 private doublePriceUntil = 0.1 ether; uint256 private lastSixteenWinnerPayments = 0; uint256 private quarterFinalWinnerPayments = 0; uint256 private semiFinalWinnerPayments = 0; bool private tournamentComplete = false; /*****------- STORAGE -------******/ mapping (uint256 => address) public teamOwners; mapping (address => uint256) private ownerTeamCount; mapping (uint256 => address) public teamToApproved; mapping (uint256 => uint256) private teamPrices; address public contractModifierAddress; address public developerAddress; /*****------- DATATYPES -------******/ struct Team { string name; string code; uint256 cost; uint256 price; address owner; uint256 numPayouts; mapping (uint256 => Payout) payouts; } struct Payout { string stage; uint256 amount; address to; uint256 when; } Team[] private teams; struct PayoutPrizes { uint256 LastSixteenWinner; bool LastSixteenTotalFixed; uint256 QuarterFinalWinner; bool QuarterFinalTotalFixed; uint256 SemiFinalWinner; bool SemiFinalTotalFixed; uint256 TournamentWinner; } PayoutPrizes private prizes; /*****------- MODIFIERS -------******/ modifier onlyContractModifier() { } /*****------- CONSTRUCTOR -------******/ function CryptoCupToken() public { } /*****------- PUBLIC FUNCTIONS -------******/ function name() public pure returns (string) { } function symbol() public pure returns (string) { } function implementsERC721() public pure returns (bool) { } function ownerOf(uint256 _tokenId) public view returns (address owner) { } function takeOwnership(uint256 _tokenId) public { } function approve(address _to, uint256 _tokenId) public { } function balanceOf(address _owner) public view returns (uint256 balance) { } function totalSupply() public view returns (uint256 total) { } function transfer(address _to, uint256 _tokenId) public { } function transferFrom(address _from, address _to, uint256 _tokenId) public { } function destroy() public onlyContractModifier { } function setDeveloper(address _newDeveloperAddress) public onlyContractModifier { } function createTeam(string name, string code) public onlyContractModifier { } function lockInLastSixteenPrize() public onlyContractModifier { } function payLastSixteenWinner(uint256 _tokenId) public onlyContractModifier { } function lockInQuarterFinalPrize() public onlyContractModifier { } function payQuarterFinalWinner(uint256 _tokenId) public onlyContractModifier { } function lockInSemiFinalPrize() public onlyContractModifier { } function paySemiFinalWinner(uint256 _tokenId) public onlyContractModifier { } function payTournamentWinner(uint256 _tokenId) public onlyContractModifier { require (tournamentComplete != true); Team storage team = teams[_tokenId]; require(team.numPayouts == 3); Payout storage payout = team.payouts[2]; require(<FILL_ME>) team.owner.transfer(prizes.TournamentWinner); emit PrizePaid("Final", _tokenId, team.owner, prizes.TournamentWinner, uint256(now)); team.payouts[team.numPayouts++] = Payout({ stage: "Final", amount: prizes.TournamentWinner, to: team.owner, when: uint256(now) }); tournamentComplete = true; } function payExcess() public onlyContractModifier { } function getTeam(uint256 _tokenId) public view returns (uint256 id, string name, string code, uint256 cost, uint256 price, address owner, uint256 numPayouts) { } function getTeamPayouts(uint256 _tokenId, uint256 _payoutId) public view returns (uint256 id, string stage, uint256 amount, address to, uint256 when) { } // Allows someone to send ether and obtain the token function buyTeam(uint256 _tokenId) public payable { } function getPrizeFund() public view returns (bool lastSixteenTotalFixed, uint256 lastSixteenWinner, bool quarterFinalTotalFixed, uint256 quarterFinalWinner, bool semiFinalTotalFixed, uint256 semiFinalWinner, uint256 tournamentWinner, uint256 total) { } /********----------- PRIVATE FUNCTIONS ------------********/ function _addressNotNull(address _to) private pure returns (bool) { } function _createTeam(string _name, string _code, uint256 _price, address _owner) private { } function _approved(address _to, uint256 _tokenId) private view returns (bool) { } function _transfer(address _from, address _to, uint256 _tokenId) private { } function _owns(address _claimant, uint256 _tokenId) private view returns (bool) { } function _compareStrings (string a, string b) private pure returns (bool){ } }
_compareStrings(payout.stage,"Semi Final")
53,104
_compareStrings(payout.stage,"Semi Final")
"Tickets are sold out"
// SPDX-License-Identifier: UNNLICENSED pragma solidity 0.8.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./Counters.sol"; import "./ReentrancyGuard.sol"; contract CEXTickets is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; // Starts at 0 Counters.Counter ID; // Max supply uint256 maxSupply = 100; // Price increments for each segment of 25 NFTs uint256[] private quarters = [750000000000000000, 900000000000000000, 1050000000000000000, 1250000000000000000]; // Tracks amount address has purchased mapping(address => uint256) public amountBought; // The address to receive payment from sales address payable payee; // Event to emit upon purchase event mint(uint256 id, address mintFrom, address mintTo); constructor(string memory name, string memory symbol, address payable payRecipient) ERC721(name, symbol) { } function buy() public payable nonReentrant { require(<FILL_ME>) require(msg.value == currentPrice(), "Incorrect amount of ETH sent"); // Limit 1 per wallet address require(amountBought[_msgSender()] < 1, "You have already bought the max amount of tickets"); // Increment amount bought for message sender address amountBought[_msgSender()] += 1; // Pay payee (bool success,) = payee.call{value: msg.value}(""); require(success, "Transfer fail"); uint256 currID = Counters.current(ID); // Increment ID counter Counters.increment(ID); // Mint NFT to user wallet _mint(_msgSender(), currID); emit mint(currID, address(this), _msgSender()); } function changePrice(uint256 quarterToChange, uint256 newPrice) public onlyOwner { } // Returns the current amount of NFTs minted function totalSupply() public view returns(uint256) { } function currentPrice() public view returns(uint256) { } function withdraw() public { } }
Counters.current(ID)<maxSupply,"Tickets are sold out"
53,123
Counters.current(ID)<maxSupply
"You have already bought the max amount of tickets"
// SPDX-License-Identifier: UNNLICENSED pragma solidity 0.8.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./Counters.sol"; import "./ReentrancyGuard.sol"; contract CEXTickets is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; // Starts at 0 Counters.Counter ID; // Max supply uint256 maxSupply = 100; // Price increments for each segment of 25 NFTs uint256[] private quarters = [750000000000000000, 900000000000000000, 1050000000000000000, 1250000000000000000]; // Tracks amount address has purchased mapping(address => uint256) public amountBought; // The address to receive payment from sales address payable payee; // Event to emit upon purchase event mint(uint256 id, address mintFrom, address mintTo); constructor(string memory name, string memory symbol, address payable payRecipient) ERC721(name, symbol) { } function buy() public payable nonReentrant { require(Counters.current(ID) < maxSupply, "Tickets are sold out"); require(msg.value == currentPrice(), "Incorrect amount of ETH sent"); // Limit 1 per wallet address require(<FILL_ME>) // Increment amount bought for message sender address amountBought[_msgSender()] += 1; // Pay payee (bool success,) = payee.call{value: msg.value}(""); require(success, "Transfer fail"); uint256 currID = Counters.current(ID); // Increment ID counter Counters.increment(ID); // Mint NFT to user wallet _mint(_msgSender(), currID); emit mint(currID, address(this), _msgSender()); } function changePrice(uint256 quarterToChange, uint256 newPrice) public onlyOwner { } // Returns the current amount of NFTs minted function totalSupply() public view returns(uint256) { } function currentPrice() public view returns(uint256) { } function withdraw() public { } }
amountBought[_msgSender()]<1,"You have already bought the max amount of tickets"
53,123
amountBought[_msgSender()]<1
"You are not authorized"
// SPDX-License-Identifier: UNNLICENSED pragma solidity 0.8.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./Counters.sol"; import "./ReentrancyGuard.sol"; contract CEXTickets is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; // Starts at 0 Counters.Counter ID; // Max supply uint256 maxSupply = 100; // Price increments for each segment of 25 NFTs uint256[] private quarters = [750000000000000000, 900000000000000000, 1050000000000000000, 1250000000000000000]; // Tracks amount address has purchased mapping(address => uint256) public amountBought; // The address to receive payment from sales address payable payee; // Event to emit upon purchase event mint(uint256 id, address mintFrom, address mintTo); constructor(string memory name, string memory symbol, address payable payRecipient) ERC721(name, symbol) { } function buy() public payable nonReentrant { } function changePrice(uint256 quarterToChange, uint256 newPrice) public onlyOwner { } // Returns the current amount of NFTs minted function totalSupply() public view returns(uint256) { } function currentPrice() public view returns(uint256) { } function withdraw() public { require(<FILL_ME>) (bool success,) = payee.call{value: address(this).balance}(""); require(success, "Transfer fail"); } }
_msgSender()==payee,"You are not authorized"
53,123
_msgSender()==payee
"forbidden"
pragma solidity ^0.6.0; // ERC721 import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // ERC1155 import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "./ERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; interface IFactory { function fee() external view returns (uint256); } contract NFT20Pair is ERC20, IERC721Receiver, ERC1155Receiver { address public factory; address public nftAddress; uint256 public nftType; uint256 public nftValue = 100 * 10**18; mapping(uint256 => uint256) public track1155; using EnumerableSet for EnumerableSet.UintSet; EnumerableSet.UintSet lockedNfts; event Withdraw(uint256[] indexed _tokenIds, uint256[] indexed amounts); // create new token constructor() public { } function init( string memory name, string memory symbol, address _nftAddress, uint256 _nftType ) public { } function getInfos() public view returns ( uint256 _type, string memory _name, string memory _symbol, uint256 _supply ) { } // withdraw nft and burn tokens function withdraw(uint256[] calldata _tokenIds, uint256[] calldata amounts) external { } function _withdraw1155( address _from, address _to, uint256 _tokenId, uint256 value ) internal { } function _batchWithdraw1155( address _from, address _to, uint256[] memory ids, uint256[] memory amounts ) internal { } function _withdraw721( address _from, address _to, uint256 _tokenId ) internal { } function onERC721Received( address operator, address, uint256 tokenId, bytes memory ) public virtual override returns (bytes4) { // require(nftType == 721, "forbidden");this is not needed so could remove right? require(nftAddress == msg.sender, "forbidden"); require(<FILL_ME>) require( IERC721(nftAddress).ownerOf(tokenId) == address(this), "forbidden" ); //this is extra check but not sure if required lockedNfts.add(tokenId); uint256 fee = IFactory(factory).fee(); _mint(factory, nftValue.mul(fee).div(100)); _mint(operator, nftValue.mul(uint256(100).sub(fee)).div(100)); return this.onERC721Received.selector; } function onERC1155Received( address operator, address, uint256 id, uint256 value, bytes memory ) public virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address, uint256[] memory ids, uint256[] memory values, bytes memory ) public virtual override returns (bytes4) { } // set new price function setParams( uint256 _nftType, uint256 _nftValue, string calldata name, string calldata symbol ) external { } }
!lockedNfts.contains(tokenId),"forbidden"
53,293
!lockedNfts.contains(tokenId)
"forbidden"
pragma solidity ^0.6.0; // ERC721 import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // ERC1155 import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "./ERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; interface IFactory { function fee() external view returns (uint256); } contract NFT20Pair is ERC20, IERC721Receiver, ERC1155Receiver { address public factory; address public nftAddress; uint256 public nftType; uint256 public nftValue = 100 * 10**18; mapping(uint256 => uint256) public track1155; using EnumerableSet for EnumerableSet.UintSet; EnumerableSet.UintSet lockedNfts; event Withdraw(uint256[] indexed _tokenIds, uint256[] indexed amounts); // create new token constructor() public { } function init( string memory name, string memory symbol, address _nftAddress, uint256 _nftType ) public { } function getInfos() public view returns ( uint256 _type, string memory _name, string memory _symbol, uint256 _supply ) { } // withdraw nft and burn tokens function withdraw(uint256[] calldata _tokenIds, uint256[] calldata amounts) external { } function _withdraw1155( address _from, address _to, uint256 _tokenId, uint256 value ) internal { } function _batchWithdraw1155( address _from, address _to, uint256[] memory ids, uint256[] memory amounts ) internal { } function _withdraw721( address _from, address _to, uint256 _tokenId ) internal { } function onERC721Received( address operator, address, uint256 tokenId, bytes memory ) public virtual override returns (bytes4) { // require(nftType == 721, "forbidden");this is not needed so could remove right? require(nftAddress == msg.sender, "forbidden"); require(!lockedNfts.contains(tokenId), "forbidden"); require(<FILL_ME>) //this is extra check but not sure if required lockedNfts.add(tokenId); uint256 fee = IFactory(factory).fee(); _mint(factory, nftValue.mul(fee).div(100)); _mint(operator, nftValue.mul(uint256(100).sub(fee)).div(100)); return this.onERC721Received.selector; } function onERC1155Received( address operator, address, uint256 id, uint256 value, bytes memory ) public virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address, uint256[] memory ids, uint256[] memory values, bytes memory ) public virtual override returns (bytes4) { } // set new price function setParams( uint256 _nftType, uint256 _nftValue, string calldata name, string calldata symbol ) external { } }
IERC721(nftAddress).ownerOf(tokenId)==address(this),"forbidden"
53,293
IERC721(nftAddress).ownerOf(tokenId)==address(this)
"forbidden"
pragma solidity ^0.6.0; // ERC721 import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // ERC1155 import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "./ERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; interface IFactory { function fee() external view returns (uint256); } contract NFT20Pair is ERC20, IERC721Receiver, ERC1155Receiver { address public factory; address public nftAddress; uint256 public nftType; uint256 public nftValue = 100 * 10**18; mapping(uint256 => uint256) public track1155; using EnumerableSet for EnumerableSet.UintSet; EnumerableSet.UintSet lockedNfts; event Withdraw(uint256[] indexed _tokenIds, uint256[] indexed amounts); // create new token constructor() public { } function init( string memory name, string memory symbol, address _nftAddress, uint256 _nftType ) public { } function getInfos() public view returns ( uint256 _type, string memory _name, string memory _symbol, uint256 _supply ) { } // withdraw nft and burn tokens function withdraw(uint256[] calldata _tokenIds, uint256[] calldata amounts) external { } function _withdraw1155( address _from, address _to, uint256 _tokenId, uint256 value ) internal { } function _batchWithdraw1155( address _from, address _to, uint256[] memory ids, uint256[] memory amounts ) internal { } function _withdraw721( address _from, address _to, uint256 _tokenId ) internal { } function onERC721Received( address operator, address, uint256 tokenId, bytes memory ) public virtual override returns (bytes4) { } function onERC1155Received( address operator, address, uint256 id, uint256 value, bytes memory ) public virtual override returns (bytes4) { // require(nftType == 1155, "forbidden"); this is not needed so could remove right? require(nftAddress == msg.sender, "forbidden"); require(<FILL_ME>) if (!lockedNfts.contains(id)) { lockedNfts.add(id); } track1155[id] = track1155[id].add(value); uint256 fee = IFactory(factory).fee(); _mint(factory, (nftValue.mul(value)).mul(fee).div(100)); _mint( operator, (nftValue.mul(value)).mul(uint256(100).sub(fee)).div(100) ); return this.onERC1155Received.selector; } function onERC1155BatchReceived( address operator, address, uint256[] memory ids, uint256[] memory values, bytes memory ) public virtual override returns (bytes4) { } // set new price function setParams( uint256 _nftType, uint256 _nftValue, string calldata name, string calldata symbol ) external { } }
IERC1155(nftAddress).balanceOf(address(this),id)>=value,"forbidden"
53,293
IERC1155(nftAddress).balanceOf(address(this),id)>=value
"forbidden"
pragma solidity ^0.6.0; // ERC721 import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // ERC1155 import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "./ERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; interface IFactory { function fee() external view returns (uint256); } contract NFT20Pair is ERC20, IERC721Receiver, ERC1155Receiver { address public factory; address public nftAddress; uint256 public nftType; uint256 public nftValue = 100 * 10**18; mapping(uint256 => uint256) public track1155; using EnumerableSet for EnumerableSet.UintSet; EnumerableSet.UintSet lockedNfts; event Withdraw(uint256[] indexed _tokenIds, uint256[] indexed amounts); // create new token constructor() public { } function init( string memory name, string memory symbol, address _nftAddress, uint256 _nftType ) public { } function getInfos() public view returns ( uint256 _type, string memory _name, string memory _symbol, uint256 _supply ) { } // withdraw nft and burn tokens function withdraw(uint256[] calldata _tokenIds, uint256[] calldata amounts) external { } function _withdraw1155( address _from, address _to, uint256 _tokenId, uint256 value ) internal { } function _batchWithdraw1155( address _from, address _to, uint256[] memory ids, uint256[] memory amounts ) internal { } function _withdraw721( address _from, address _to, uint256 _tokenId ) internal { } function onERC721Received( address operator, address, uint256 tokenId, bytes memory ) public virtual override returns (bytes4) { } function onERC1155Received( address operator, address, uint256 id, uint256 value, bytes memory ) public virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address, uint256[] memory ids, uint256[] memory values, bytes memory ) public virtual override returns (bytes4) { require(nftType == 1155, "forbidden"); require(nftAddress == msg.sender, "forbidden"); uint256 qty = 0; for (uint256 i = 0; i < ids.length; i++) { require(<FILL_ME>) if (!lockedNfts.contains(ids[i])) { lockedNfts.add(ids[i]); } qty = qty + values[i]; track1155[ids[i]] = track1155[ids[i]].add(values[i]); } uint256 fee = IFactory(factory).fee(); _mint( operator, (nftValue.mul(qty)).mul(uint256(100).sub(fee)).div(100) ); _mint(factory, (nftValue.mul(qty)).mul(fee).div(100)); return this.onERC1155BatchReceived.selector; } // set new price function setParams( uint256 _nftType, uint256 _nftValue, string calldata name, string calldata symbol ) external { } }
IERC1155(nftAddress).balanceOf(address(this),ids[i])>=values[i],"forbidden"
53,293
IERC1155(nftAddress).balanceOf(address(this),ids[i])>=values[i]
null
/* . _ __ ____ ________ _________ | |/ // __ \/ ____/ / /_ __/ | | // / / / __/ / / / / / /| | / |/ /_/ / /___/ /___/ / / ___ | /_/|_/_____/_____/_____/_/ /_/ |_| XDELTA.IO Features: - XDELTA holder get 20% from every buy event and 80%-20% from every sell event - Anti-dump: selling fee gradually decreases from 80% on the first day to 20% on the 5th day. - Referral bonus: 6.6% from buy-in amounts - 100% open and secure - Immutable: no way for anyone including devs to modify the contract or exit-scam in any way - This contract will work forever, no kill switch, no admin functions website: https://xdelta.io discord: https://discord.gg/QeQ2SCw Register in our Discord server for early Founder access Launch at 2100 UTC Sunday October 13 */ pragma solidity ^0.4.26; contract XDELTA { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // administrators can: // -> change the name of the contract // -> change the name of the token // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later) // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyAdministrator(){ address _customerAddress = msg.sender; require(<FILL_ME>) _; } // // prevents contracts from interacting with XDELTA // modifier isHuman() { } // ensures that the first tokens in the contract will be equally distributed // meaning, no divine dump will be ever possible // result: healthy longevity. modifier founderAccess(uint256 _amountOfEthereum){ } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "XDELTA.io"; string public symbol = "X"; uint8 constant public decimals = 18; uint8 constant internal entryFee_ = 20; // 20% to enter uint8 constant internal exitFeeHigh_ = 80; // 80% to exit (on the first day) uint8 constant internal exitFeeLow_ = 20; // 20% to exit (after the 5th day) uint8 constant internal transferFee_ = 10; // 10% transfer fee uint8 constant internal refferalFee_ = 33; // 33% from enter fee divs or 6.6% for each invite uint256 constant internal tokenPriceInitial_ = 0.00000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.000000001 ether; uint256 constant internal magnitude = 2**64; uint256 constant public launchTime = 1571000400; //2100 UTC October 13 // proof of stake (defaults at 25 tokens) uint256 public stakingRequirement = 25e18; // founder program mapping(address => bool) internal founders_; uint256 constant internal founderMaxPurchase_ = 2 ether; uint256 constant internal founderQuota_ = 20 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; mapping(address => uint256) internal founderAccumulatedQuota_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; // administrator list (see above on what they can do) mapping(address => bool) public administrators_; // when this is set to true, only founders can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) bool public onlyFounders = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) */ function buy(address _referredBy) public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { } /** * Converts all of caller's dividends to tokens. */ function reinvest() onlyStronghands() public { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() onlyStronghands() public { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) onlyBagholders() public { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders() public returns(bool) { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the founder phase. */ function disableInitialStage() onlyAdministrator() public { } /** * In case one of us dies, we need to replace ourselves. */ function setAdministrator(address _identifier, bool _status) onlyAdministrator() public { } /** * Precautionary measures in case we need to adjust the masternode rate. */ function setStakingRequirement(uint256 _amountOfTokens) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setName(string _name) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) onlyAdministrator() public { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) view public returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) view public returns(uint256) { } /** * Return the buy price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum, address _referredBy) founderAccess(_incomingEthereum) isHuman internal returns(uint256) { } function addFounder(address _newFounder) onlyAdministrator() public { } function multiAddFounder(address[] memory _founders) public onlyAdministrator() { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } function getTime() public returns(uint256) { } /** * Calculate the current exit fee. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function exitFee(uint256 _amount) internal view returns (uint256) { } function sqrt(uint x) internal pure returns (uint y) { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } }
administrators_[_customerAddress]
53,423
administrators_[_customerAddress]
null
/* . _ __ ____ ________ _________ | |/ // __ \/ ____/ / /_ __/ | | // / / / __/ / / / / / /| | / |/ /_/ / /___/ /___/ / / ___ | /_/|_/_____/_____/_____/_/ /_/ |_| XDELTA.IO Features: - XDELTA holder get 20% from every buy event and 80%-20% from every sell event - Anti-dump: selling fee gradually decreases from 80% on the first day to 20% on the 5th day. - Referral bonus: 6.6% from buy-in amounts - 100% open and secure - Immutable: no way for anyone including devs to modify the contract or exit-scam in any way - This contract will work forever, no kill switch, no admin functions website: https://xdelta.io discord: https://discord.gg/QeQ2SCw Register in our Discord server for early Founder access Launch at 2100 UTC Sunday October 13 */ pragma solidity ^0.4.26; contract XDELTA { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // administrators can: // -> change the name of the contract // -> change the name of the token // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later) // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyAdministrator(){ } // // prevents contracts from interacting with XDELTA // modifier isHuman() { } // ensures that the first tokens in the contract will be equally distributed // meaning, no divine dump will be ever possible // result: healthy longevity. modifier founderAccess(uint256 _amountOfEthereum){ address _customerAddress = msg.sender; if (launchTime <= now){ onlyFounders = false; } // are we still in the vulnerable phase? // if so, enact anti early whale protocol if( onlyFounders && ((totalEthereumBalance() - _amountOfEthereum) <= founderQuota_ )){ require(<FILL_ME>) // updated the accumulated quota founderAccumulatedQuota_[_customerAddress] = SafeMath.add(founderAccumulatedQuota_[_customerAddress], _amountOfEthereum); // execute _; } else { // in case the ether count drops low, the founder phase won't reinitiate onlyFounders = false; _; } } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "XDELTA.io"; string public symbol = "X"; uint8 constant public decimals = 18; uint8 constant internal entryFee_ = 20; // 20% to enter uint8 constant internal exitFeeHigh_ = 80; // 80% to exit (on the first day) uint8 constant internal exitFeeLow_ = 20; // 20% to exit (after the 5th day) uint8 constant internal transferFee_ = 10; // 10% transfer fee uint8 constant internal refferalFee_ = 33; // 33% from enter fee divs or 6.6% for each invite uint256 constant internal tokenPriceInitial_ = 0.00000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.000000001 ether; uint256 constant internal magnitude = 2**64; uint256 constant public launchTime = 1571000400; //2100 UTC October 13 // proof of stake (defaults at 25 tokens) uint256 public stakingRequirement = 25e18; // founder program mapping(address => bool) internal founders_; uint256 constant internal founderMaxPurchase_ = 2 ether; uint256 constant internal founderQuota_ = 20 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; mapping(address => uint256) internal founderAccumulatedQuota_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; // administrator list (see above on what they can do) mapping(address => bool) public administrators_; // when this is set to true, only founders can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) bool public onlyFounders = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) */ function buy(address _referredBy) public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { } /** * Converts all of caller's dividends to tokens. */ function reinvest() onlyStronghands() public { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() onlyStronghands() public { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) onlyBagholders() public { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders() public returns(bool) { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the founder phase. */ function disableInitialStage() onlyAdministrator() public { } /** * In case one of us dies, we need to replace ourselves. */ function setAdministrator(address _identifier, bool _status) onlyAdministrator() public { } /** * Precautionary measures in case we need to adjust the masternode rate. */ function setStakingRequirement(uint256 _amountOfTokens) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setName(string _name) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) onlyAdministrator() public { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) view public returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) view public returns(uint256) { } /** * Return the buy price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum, address _referredBy) founderAccess(_incomingEthereum) isHuman internal returns(uint256) { } function addFounder(address _newFounder) onlyAdministrator() public { } function multiAddFounder(address[] memory _founders) public onlyAdministrator() { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } function getTime() public returns(uint256) { } /** * Calculate the current exit fee. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function exitFee(uint256 _amount) internal view returns (uint256) { } function sqrt(uint x) internal pure returns (uint y) { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } }
founders_[_customerAddress]==true&&(founderAccumulatedQuota_[_customerAddress]+_amountOfEthereum)<=founderMaxPurchase_
53,423
founders_[_customerAddress]==true&&(founderAccumulatedQuota_[_customerAddress]+_amountOfEthereum)<=founderMaxPurchase_
null
/* . _ __ ____ ________ _________ | |/ // __ \/ ____/ / /_ __/ | | // / / / __/ / / / / / /| | / |/ /_/ / /___/ /___/ / / ___ | /_/|_/_____/_____/_____/_/ /_/ |_| XDELTA.IO Features: - XDELTA holder get 20% from every buy event and 80%-20% from every sell event - Anti-dump: selling fee gradually decreases from 80% on the first day to 20% on the 5th day. - Referral bonus: 6.6% from buy-in amounts - 100% open and secure - Immutable: no way for anyone including devs to modify the contract or exit-scam in any way - This contract will work forever, no kill switch, no admin functions website: https://xdelta.io discord: https://discord.gg/QeQ2SCw Register in our Discord server for early Founder access Launch at 2100 UTC Sunday October 13 */ pragma solidity ^0.4.26; contract XDELTA { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // administrators can: // -> change the name of the contract // -> change the name of the token // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later) // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyAdministrator(){ } // // prevents contracts from interacting with XDELTA // modifier isHuman() { } // ensures that the first tokens in the contract will be equally distributed // meaning, no divine dump will be ever possible // result: healthy longevity. modifier founderAccess(uint256 _amountOfEthereum){ } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "XDELTA.io"; string public symbol = "X"; uint8 constant public decimals = 18; uint8 constant internal entryFee_ = 20; // 20% to enter uint8 constant internal exitFeeHigh_ = 80; // 80% to exit (on the first day) uint8 constant internal exitFeeLow_ = 20; // 20% to exit (after the 5th day) uint8 constant internal transferFee_ = 10; // 10% transfer fee uint8 constant internal refferalFee_ = 33; // 33% from enter fee divs or 6.6% for each invite uint256 constant internal tokenPriceInitial_ = 0.00000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.000000001 ether; uint256 constant internal magnitude = 2**64; uint256 constant public launchTime = 1571000400; //2100 UTC October 13 // proof of stake (defaults at 25 tokens) uint256 public stakingRequirement = 25e18; // founder program mapping(address => bool) internal founders_; uint256 constant internal founderMaxPurchase_ = 2 ether; uint256 constant internal founderQuota_ = 20 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; mapping(address => uint256) internal founderAccumulatedQuota_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; // administrator list (see above on what they can do) mapping(address => bool) public administrators_; // when this is set to true, only founders can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) bool public onlyFounders = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) */ function buy(address _referredBy) public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { } /** * Converts all of caller's dividends to tokens. */ function reinvest() onlyStronghands() public { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() onlyStronghands() public { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) onlyBagholders() public { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders() public returns(bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens // also disables transfers until founder phase is over // ( we dont want whale premines ) // ( administrator still can distribute tokens to founders and promoters) require(<FILL_ME>) // withdraw all outstanding dividends first if(myDividends(true) > 0) withdraw(); // liquify 10% of the tokens that are transfered // these are dispersed to shareholders uint256 _tokenFee = SafeMath.div(SafeMath.mul(_amountOfTokens, transferFee_), 100); // founders and promoters get tokens directly from developers with minimal fee if (now < launchTime) _tokenFee = 1000000000000000000; uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); // burn the fee tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); // exchange tokens tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); // update dividend trackers payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens); payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens); // disperse dividends among holders profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); // fire event emit Transfer(_customerAddress, _toAddress, _taxedTokens); emit Transfer(_customerAddress, 0x0, _tokenFee); // ERC20 return true; } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the founder phase. */ function disableInitialStage() onlyAdministrator() public { } /** * In case one of us dies, we need to replace ourselves. */ function setAdministrator(address _identifier, bool _status) onlyAdministrator() public { } /** * Precautionary measures in case we need to adjust the masternode rate. */ function setStakingRequirement(uint256 _amountOfTokens) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setName(string _name) onlyAdministrator() public { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) onlyAdministrator() public { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) view public returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) view public returns(uint256) { } /** * Return the buy price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum, address _referredBy) founderAccess(_incomingEthereum) isHuman internal returns(uint256) { } function addFounder(address _newFounder) onlyAdministrator() public { } function multiAddFounder(address[] memory _founders) public onlyAdministrator() { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } function getTime() public returns(uint256) { } /** * Calculate the current exit fee. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function exitFee(uint256 _amount) internal view returns (uint256) { } function sqrt(uint x) internal pure returns (uint y) { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } }
(!onlyFounders||administrators_[_customerAddress])&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress]
53,423
(!onlyFounders||administrators_[_customerAddress])&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress]
null
pragma solidity 0.4.25; /** * @title VSTER ICO Contract * @dev VSTER is an ERC-20 Standar Compliant Token */ /** * @title SafeMath by OpenZeppelin * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public; function transferFrom(address from, address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title admined * @notice This contract is administered */ contract admined { //mapping to user levels mapping(address => uint8) public level; //0 normal user //1 basic admin //2 master admin /** * @dev This contructor takes the msg.sender as the first master admin */ constructor() internal { } /** * @dev This modifier limits function execution to the admin */ modifier onlyAdmin(uint8 _level) { //A modifier to define admin-only functions require(<FILL_ME>) //It require the user level to be more or equal than _level _; } /** * @notice This function transfer the adminship of the contract to _newAdmin * @param _newAdmin The new admin of the contract */ function adminshipLevel(address _newAdmin, uint8 _level) onlyAdmin(2) public { } /** * @dev Log Events */ event AdminshipUpdated(address _newAdmin, uint8 _level); } contract VSTERICO is admined { using SafeMath for uint256; //This ico have these possible states enum State { PRESALE, MAINSALE, Successful } //Public variables //Time-state Related State public state = State.PRESALE; //Set initial stage uint256 constant public PRESALEStart = 1548979200; //Human time (GMT): Friday, 1 February 2019 0:00:00 uint256 constant public MAINSALEStart = 1554163200; //Human time (GMT): Tuesday, 2 April 2019 0:00:00 uint256 constant public SaleDeadline = 1564531200; //Human time (GMT): Wednesday, 31 July 2019 0:00:00 uint256 public completedAt; //Set when ico finish //Token-eth related uint256 public totalRaised; //eth collected in wei uint256 public totalRefDistributed; //total tokens distributed to referrals uint256 public totalEthRefDistributed; //total eth distributed to specified referrals uint256 public totalDistributed; //Sale tokens distributed ERC20Basic public tokenReward = ERC20Basic(0xA2e13c4f0431B6f2B06BBE61a24B61CCBe13136A); //Token contract address mapping(address => bool) referral; //Determine the referral type //Contract details address public creator; //Creator address address public fundsWallet = 0x62e0b52F0a7AD4bB7b87Ce41e132bCBC7173EB96; string public version = '0.2'; //Contract version //Price related uint256 public USDPriceInWei; // 0.1 cent (0.001$) in wei string public USDPrice; //events for log event LogFundrisingInitialized(address indexed _creator); event LogFundingReceived(address indexed _addr, uint _amount, uint _currentTotal, address _referral); event LogBeneficiaryPaid(address indexed _beneficiaryAddress); event LogContributorsPayout(address indexed _addr, uint _amount); event LogFundingSuccessful(uint _totalRaised); //Modifier to prevent execution if ico has ended or is holded modifier notFinished() { } /** * @notice ICO constructor * @param _initialUSDInWei initial usd value on wei */ constructor(uint _initialUSDInWei) public { } function setReferralType(address _user, bool _type) onlyAdmin(1) public { } /** * @notice contribution handler */ function contribute(address _target, uint256 _value, address _reff) public notFinished payable { } /** * @notice tokenBought calculation function * @param _value is the amount of eth multiplied by 1e18 */ function tokenBuyCalc(uint _value) internal view returns (uint sold,uint remaining) { } /** * @notice Process to check contract current status */ function checkIfFundingCompleteOrExpired() public { } /** * @notice successful closure handler */ function successful() public { } /** * @notice set usd price on wei * @param _value wei value */ function setPrice(uint _value, string _price) public onlyAdmin(2) { } /** * @notice Function to claim any token stuck on contract * @param _address Address of target token */ function externalTokensRecovery(ERC20Basic _address) onlyAdmin(2) public{ } /* * @dev Direct payments handler */ function () public payable { } }
level[msg.sender]>=_level
53,429
level[msg.sender]>=_level
"!owner"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { require(<FILL_ME>) } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_isOwner(),"!owner"
53,459
_isOwner()
'custom'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { require(<FILL_ME>) } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_isOwner()||_isCustomAllowed(tokenId),'custom'
53,459
_isOwner()||_isCustomAllowed(tokenId)
'!owner'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { require(pausedPref == false || paused == false, 'paused'); require(<FILL_ME>) uint256 discount = discounts[ownPref]; if (discount > price) discount = price; uint _price = discount > 0 ? discount : price; _mint(amount, _price); } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_owns1155(ownPref,tokenId,msg.sender),'!owner'
53,459
_owns1155(ownPref,tokenId,msg.sender)
'!owner'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { require(pausedPref == false || paused == false, 'paused'); require(<FILL_ME>) uint256 discount = discounts[ownPref]; if (discount > price) discount = price; uint _price = discount > 0 ? discount : price; _mint(amount, _price); } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_owns(ownPref,msg.sender),'!owner'
53,459
_owns(ownPref,msg.sender)
'!owner'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { require(paused == false, 'paused'); uint256 discount = discounts[erc1155]; require(discount > 0, '!discount'); require(<FILL_ME>) if (discount > price) discount = price; _mint(amount, discount); } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_owns1155(erc1155,tokenId,msg.sender),'!owner'
53,459
_owns1155(erc1155,tokenId,msg.sender)
'!owner'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { require(paused == false, 'paused'); uint256 discount = discounts[erc721]; require(discount > 0, '!discount'); require(<FILL_ME>) if (discount > price) discount = price; _mint(amount, discount); } function _mint(uint256 amount, uint256 thePrice) internal { } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
_owns(erc721,msg.sender),'!owner'
53,459
_owns(erc721,msg.sender)
'!noneLeft'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "./IHandler.sol"; import "./Structs.sol"; import "./Base64.sol"; import "./Memory.sol"; contract ERC721Base is ERC721EnumerableUpgradeable, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private _tokenIds; uint256 public price; mapping(address => uint256) public discounts; uint256 public maxMint; uint256 public maxTotal; bool public paused; IHandler public handler; mapping (uint256 => uint256) public seeds; string[] public scripts; string[] public fyrdScripts; string[] public externalScripts; bool allowCustom; mapping (uint256 => string[]) public c_scripts; mapping (uint256 => string[]) public c_fyrdScripts; mapping (uint256 => string[]) public c_externalScripts; mapping (uint256 => bool) public c_locked; uint public feePercent; address public feeAddress; uint constant PERCENT_BASE = 10000; address public ownPref; bool public pausedPref; function initialize(string memory _desc, string memory _token, uint256 _price, uint256 _maxTotal, uint256 _maxMint, uint _feePercent, address _feeAddress, address _gyve, address _ownPref) public initializer { } function _getScripts(string[] storage _scripts) internal view returns (bytes memory script) { } function _allowGetScripts(uint tokenId) internal view returns(bool) { } function _getGyveScript(uint256 tokenId) internal view returns (bytes memory script) { } function _getFyrdScripts(uint256 tokenId) internal view returns (string[] memory script) { } function _getExternalScript(uint256 tokenId) internal view returns (bytes memory script) { } function _setScripts(string[] storage set, string[] memory _scripts) internal { } function _isOwner() internal view returns(bool) { } function _onlyOwner() internal view { } function setScripts(string[] memory _scripts) external { } function resetScripts() external { } function getScripts() external view returns (string[] memory) { } function lockCustom(uint tokenId, bool lock) external { } function setAllowCustom(bool _allow) external { } function _isCustomAllowed(uint tokenId) internal view returns(bool) { } function _onlyOwnerOrCustom(uint tokenId) internal view { } function setCustomScripts(uint256 tokenId, string[] memory _scripts) external { } function resetCustomScripts(uint tokenId) external { } function getCustomScripts(uint256 tokenId) external view returns (string[] memory) { } function setCustomExternalScripts(uint tokenId, string[] memory _scripts) external { } function resetCustomExternalScripts(uint tokenId) external { } function getCustomExternalScripts(uint tokenId) external view returns (string[] memory) { } function setExternalScripts(string[] memory _scripts) external { } function resetExternalScripts() external { } function getExternalScripts() external view returns (string[] memory) { } function lenExternalScripts() external view returns(uint) { } function setCustomFyrdScripts(uint tokenId, string[] memory _scripts) external { } function getCustomFyrdScripts(uint tokenId) external view returns (string[] memory) { } function resetCustomFyrdScripts(uint tokenId) external { } function setFyrdScripts(string[] memory _scripts) external { } function getFyrdScripts() external view returns (string[] memory) { } function resetFyrdScripts() external { } function lenFyrdScripts() external view returns(uint) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function stringJoin(bytes[] memory svec, string memory sep, uint vlen) internal pure returns(bytes memory) { } function generateStreams(bytes[MAX_STREAMS] memory streams) internal pure returns (bytes memory) { } function generateImage(Result memory vars) internal pure returns (bytes memory) { } function generateHtml(Result memory vars) internal pure returns (bytes memory) { } function generateJson(Result memory vars, bool debug) internal pure returns (string memory) { } function generatePrints(Result memory vars) internal pure returns(bytes memory) { } function generateSlots(Result memory vars) internal pure returns(bytes memory) { } function generateErrors(Result memory vars) internal pure returns(bytes memory) { } function generateMeta(Result memory vars) internal pure returns(bytes memory) { } function generateAttrs(Result memory vars) internal pure returns(bytes memory) { } function mint(uint256 amount) payable external { } function mintOwner(uint256 amount) payable external { } function mintPref1155(uint256 amount, uint256 tokenId) payable external { } function mintPref(uint256 amount) payable external { } function mintDiscount1155(uint256 amount, address erc1155, uint256 tokenId) payable external { } function mintDiscount(uint256 amount, address erc721) payable external { } function _mint(uint256 amount, uint256 thePrice) internal { require(amount > 0 && amount <= maxMint, '!amount'); require(<FILL_ME>) require(msg.value == amount * thePrice, '!price'); _sendEth(msg.value); for (uint256 i = 0; i < amount; i++) { _mintToken(); } } function _mintToken() internal returns(uint256 tokenId) { } function _getRandomValue(uint256 tokenId) internal view returns(uint256) { } function _owns(address erc721, address _owner) internal view returns(bool) { } function _owns1155(address erc1155, uint256 _tokenId, address _owner) internal view returns(bool) { } function _ownsToken(uint tokenId) internal view returns(bool) { } function setDiscount(address erc721, uint256 discount) external { } function unpause() external { } function pause() external { } function unpausePref() external { } function pausePref() external { } function setOwnPref(address _ownPref) external { } function _sendEth(uint256 eth) internal { } function _send(address dest, uint eth) internal { } function setHandler(address _handler) external { } function setPrice(uint256 _price) external { } function setMaxTotal(uint256 _maxTotal) external { } function tokenURIDebug(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd) external view returns (string memory) { } function tokenURI(uint256 tokenId, uint256 seed, string memory gyve, string memory ext, string[] memory fyrd, bool debug) internal view returns (string memory) { } }
totalSupply()+amount<=maxTotal,'!noneLeft'
53,459
totalSupply()+amount<=maxTotal
null
pragma solidity ^0.4.24; /** @title CnusUp Token * An ERC20-compliant token. */ contract CnusUpToken is ERC20, Ownable { using SafeMath for uint256; bool public transfersEnabled = false; string public name = "CoinUs CnusUp"; string public symbol = "CNUSUP"; uint256 public decimals = 18; event TransfersAllowed(bool _transfersEnabled); modifier transfersAllowed { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } function disableTransfers(bool _disable) public onlyOwner { } function batchIssue(address[] memory _to, uint256[] memory _amount) public onlyOwner { require(_to.length == _amount.length); for(uint i = 0; i < _to.length; i++) { require(<FILL_ME>) require(_to[i] != address(this)); _mint(_to[i], _amount[i]); } } function checkMisplacedTokenBalance( address _tokenAddress ) public view returns (uint256) { } // Allow transfer of accidentally sent ERC20 tokens function refundMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) public onlyOwner { } function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { } function _transferMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) internal { } }
_to[i]!=address(0)
53,461
_to[i]!=address(0)
null
pragma solidity ^0.4.24; /** @title CnusUp Token * An ERC20-compliant token. */ contract CnusUpToken is ERC20, Ownable { using SafeMath for uint256; bool public transfersEnabled = false; string public name = "CoinUs CnusUp"; string public symbol = "CNUSUP"; uint256 public decimals = 18; event TransfersAllowed(bool _transfersEnabled); modifier transfersAllowed { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } function disableTransfers(bool _disable) public onlyOwner { } function batchIssue(address[] memory _to, uint256[] memory _amount) public onlyOwner { require(_to.length == _amount.length); for(uint i = 0; i < _to.length; i++) { require(_to[i] != address(0)); require(<FILL_ME>) _mint(_to[i], _amount[i]); } } function checkMisplacedTokenBalance( address _tokenAddress ) public view returns (uint256) { } // Allow transfer of accidentally sent ERC20 tokens function refundMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) public onlyOwner { } function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { } function _transferMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) internal { } }
_to[i]!=address(this)
53,461
_to[i]!=address(this)
"Insufficient token balance."
pragma solidity ^0.4.24; /** @title CnusUp Token * An ERC20-compliant token. */ contract CnusUpToken is ERC20, Ownable { using SafeMath for uint256; bool public transfersEnabled = false; string public name = "CoinUs CnusUp"; string public symbol = "CNUSUP"; uint256 public decimals = 18; event TransfersAllowed(bool _transfersEnabled); modifier transfersAllowed { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } function disableTransfers(bool _disable) public onlyOwner { } function batchIssue(address[] memory _to, uint256[] memory _amount) public onlyOwner { } function checkMisplacedTokenBalance( address _tokenAddress ) public view returns (uint256) { } // Allow transfer of accidentally sent ERC20 tokens function refundMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) public onlyOwner { } function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { } function _transferMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) internal { require(_recipient != address(0)); ERC20 unknownToken = ERC20(_tokenAddress); require(<FILL_ME>) require(unknownToken.transfer(_recipient, _value)); } }
unknownToken.balanceOf(address(this))>=_value,"Insufficient token balance."
53,461
unknownToken.balanceOf(address(this))>=_value
null
pragma solidity ^0.4.24; /** @title CnusUp Token * An ERC20-compliant token. */ contract CnusUpToken is ERC20, Ownable { using SafeMath for uint256; bool public transfersEnabled = false; string public name = "CoinUs CnusUp"; string public symbol = "CNUSUP"; uint256 public decimals = 18; event TransfersAllowed(bool _transfersEnabled); modifier transfersAllowed { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } function disableTransfers(bool _disable) public onlyOwner { } function batchIssue(address[] memory _to, uint256[] memory _amount) public onlyOwner { } function checkMisplacedTokenBalance( address _tokenAddress ) public view returns (uint256) { } // Allow transfer of accidentally sent ERC20 tokens function refundMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) public onlyOwner { } function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { } function _transferMisplacedToken( address _recipient, address _tokenAddress, uint256 _value ) internal { require(_recipient != address(0)); ERC20 unknownToken = ERC20(_tokenAddress); require(unknownToken.balanceOf(address(this)) >= _value, "Insufficient token balance."); require(<FILL_ME>) } }
unknownToken.transfer(_recipient,_value)
53,461
unknownToken.transfer(_recipient,_value)
"beneficiary exists"
//SPDX-License-Identifier: MIT pragma solidity 0.7.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "../utils/CloneFactory.sol"; import "./TokenVesting.sol"; /** * @dev Deploys new vesting contracts */ contract VestingFactory is CloneFactory, Ownable { using SafeMath for uint256; event Created(address beneficiary, address vestingContract); /// @dev implementation address of Token Vesting address private implementation; /// @dev Address to Token Vesting map mapping(address => TokenVesting) vestings; /// @dev Deploys a new proxy instance and sets custom owner of proxy /// Throws if the owner already have a Token Vesting contract /// @return vesting - address of new Token Vesting Contract function deployVesting( uint256[] memory periods, uint256[] memory tokenAmounts, address beneficiary, address token ) public returns (TokenVesting vesting) { require(implementation != address(0)); require(<FILL_ME>) require(periods.length == tokenAmounts.length, "Length mismatch"); address _vesting = address(uint160(createClone(implementation))); vesting = TokenVesting(_vesting); require(vesting.initialize(periods, tokenAmounts, beneficiary, token), "!Initialized"); vestings[beneficiary] = vesting; emit Created(beneficiary, _vesting); } /// @dev Change the address implementation of the Token Vesting /// @param _impl new implementation address of Token Vesting function setImplementation(address _impl) external onlyOwner { } /// @dev get token vesting implementation address function getImplementation() external view returns(address) { } /// @dev get vesting contract address for a given beneficiary function getVestingContract(address beneficiary) external view returns(address) { } /// @notice Fetch amount that can be currently released by a certain address function releaseableAmount(address beneficiary) public view returns(uint) { } }
vestings[beneficiary]==TokenVesting(0),"beneficiary exists"
53,539
vestings[beneficiary]==TokenVesting(0)
"!Initialized"
//SPDX-License-Identifier: MIT pragma solidity 0.7.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "../utils/CloneFactory.sol"; import "./TokenVesting.sol"; /** * @dev Deploys new vesting contracts */ contract VestingFactory is CloneFactory, Ownable { using SafeMath for uint256; event Created(address beneficiary, address vestingContract); /// @dev implementation address of Token Vesting address private implementation; /// @dev Address to Token Vesting map mapping(address => TokenVesting) vestings; /// @dev Deploys a new proxy instance and sets custom owner of proxy /// Throws if the owner already have a Token Vesting contract /// @return vesting - address of new Token Vesting Contract function deployVesting( uint256[] memory periods, uint256[] memory tokenAmounts, address beneficiary, address token ) public returns (TokenVesting vesting) { require(implementation != address(0)); require( vestings[beneficiary] == TokenVesting(0), "beneficiary exists" ); require(periods.length == tokenAmounts.length, "Length mismatch"); address _vesting = address(uint160(createClone(implementation))); vesting = TokenVesting(_vesting); require(<FILL_ME>) vestings[beneficiary] = vesting; emit Created(beneficiary, _vesting); } /// @dev Change the address implementation of the Token Vesting /// @param _impl new implementation address of Token Vesting function setImplementation(address _impl) external onlyOwner { } /// @dev get token vesting implementation address function getImplementation() external view returns(address) { } /// @dev get vesting contract address for a given beneficiary function getVestingContract(address beneficiary) external view returns(address) { } /// @notice Fetch amount that can be currently released by a certain address function releaseableAmount(address beneficiary) public view returns(uint) { } }
vesting.initialize(periods,tokenAmounts,beneficiary,token),"!Initialized"
53,539
vesting.initialize(periods,tokenAmounts,beneficiary,token)
"Not accepted"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; interface IOwnable { function policy() external view returns (address); function renounceManagement() external; function pushManagement( address newOwner_ ) external; function pullManagement() external; } contract Ownable is IOwnable { address internal _owner; address internal _newOwner; event OwnershipPushed(address indexed previousOwner, address indexed newOwner); event OwnershipPulled(address indexed previousOwner, address indexed newOwner); constructor () { } function policy() public view override returns (address) { } modifier onlyPolicy() { } function renounceManagement() public virtual override onlyPolicy() { } function pushManagement( address newOwner_ ) public virtual override onlyPolicy() { } function pullManagement() public virtual override { } } interface IERC20 { function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function totalSupply() external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { } } interface IBondCalculator { function valuation( address pair_, uint amount_ ) external view returns ( uint _value ); } contract TestTreasury is Ownable { using SafeERC20 for IERC20; using SafeMath for uint; mapping( address => bool ) public isReserveToken; mapping( address => bool ) public isReserveDepositor; mapping( address => bool ) public isReserveSpender; mapping( address => bool ) public isReserveManager; function deposit( uint _amount, address _token, uint _profit ) external { require(<FILL_ME>) IERC20( _token ).safeTransferFrom( msg.sender, address(this), _amount ); require( isReserveDepositor[ msg.sender ], "Not approved" ); } function withdraw( uint _amount, address _token ) external { } function manage( address _token, uint _amount ) external { } function valueOfToken( address _token, uint _amount ) public view returns ( uint value_ ) { } enum MANAGING { RESERVEDEPOSITOR, RESERVESPENDER, RESERVETOKEN, RESERVEMANAGER } function toggle( MANAGING _managing, address _address ) external onlyPolicy() { } }
isReserveToken[_token],"Not accepted"
53,564
isReserveToken[_token]
"Not approved"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; interface IOwnable { function policy() external view returns (address); function renounceManagement() external; function pushManagement( address newOwner_ ) external; function pullManagement() external; } contract Ownable is IOwnable { address internal _owner; address internal _newOwner; event OwnershipPushed(address indexed previousOwner, address indexed newOwner); event OwnershipPulled(address indexed previousOwner, address indexed newOwner); constructor () { } function policy() public view override returns (address) { } modifier onlyPolicy() { } function renounceManagement() public virtual override onlyPolicy() { } function pushManagement( address newOwner_ ) public virtual override onlyPolicy() { } function pullManagement() public virtual override { } } interface IERC20 { function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function totalSupply() external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { } } interface IBondCalculator { function valuation( address pair_, uint amount_ ) external view returns ( uint _value ); } contract TestTreasury is Ownable { using SafeERC20 for IERC20; using SafeMath for uint; mapping( address => bool ) public isReserveToken; mapping( address => bool ) public isReserveDepositor; mapping( address => bool ) public isReserveSpender; mapping( address => bool ) public isReserveManager; function deposit( uint _amount, address _token, uint _profit ) external { require( isReserveToken[ _token ], "Not accepted" ); IERC20( _token ).safeTransferFrom( msg.sender, address(this), _amount ); require(<FILL_ME>) } function withdraw( uint _amount, address _token ) external { } function manage( address _token, uint _amount ) external { } function valueOfToken( address _token, uint _amount ) public view returns ( uint value_ ) { } enum MANAGING { RESERVEDEPOSITOR, RESERVESPENDER, RESERVETOKEN, RESERVEMANAGER } function toggle( MANAGING _managing, address _address ) external onlyPolicy() { } }
isReserveDepositor[msg.sender],"Not approved"
53,564
isReserveDepositor[msg.sender]
"Not approved"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; interface IOwnable { function policy() external view returns (address); function renounceManagement() external; function pushManagement( address newOwner_ ) external; function pullManagement() external; } contract Ownable is IOwnable { address internal _owner; address internal _newOwner; event OwnershipPushed(address indexed previousOwner, address indexed newOwner); event OwnershipPulled(address indexed previousOwner, address indexed newOwner); constructor () { } function policy() public view override returns (address) { } modifier onlyPolicy() { } function renounceManagement() public virtual override onlyPolicy() { } function pushManagement( address newOwner_ ) public virtual override onlyPolicy() { } function pullManagement() public virtual override { } } interface IERC20 { function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function totalSupply() external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { } } interface IBondCalculator { function valuation( address pair_, uint amount_ ) external view returns ( uint _value ); } contract TestTreasury is Ownable { using SafeERC20 for IERC20; using SafeMath for uint; mapping( address => bool ) public isReserveToken; mapping( address => bool ) public isReserveDepositor; mapping( address => bool ) public isReserveSpender; mapping( address => bool ) public isReserveManager; function deposit( uint _amount, address _token, uint _profit ) external { } function withdraw( uint _amount, address _token ) external { require( isReserveToken[ _token ], "Not accepted" ); // Only reserves can be used for redemptions require(<FILL_ME>) IERC20( _token ).safeTransfer( msg.sender, _amount ); } function manage( address _token, uint _amount ) external { } function valueOfToken( address _token, uint _amount ) public view returns ( uint value_ ) { } enum MANAGING { RESERVEDEPOSITOR, RESERVESPENDER, RESERVETOKEN, RESERVEMANAGER } function toggle( MANAGING _managing, address _address ) external onlyPolicy() { } }
isReserveSpender[msg.sender]==true,"Not approved"
53,564
isReserveSpender[msg.sender]==true
"Not approved"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; interface IOwnable { function policy() external view returns (address); function renounceManagement() external; function pushManagement( address newOwner_ ) external; function pullManagement() external; } contract Ownable is IOwnable { address internal _owner; address internal _newOwner; event OwnershipPushed(address indexed previousOwner, address indexed newOwner); event OwnershipPulled(address indexed previousOwner, address indexed newOwner); constructor () { } function policy() public view override returns (address) { } modifier onlyPolicy() { } function renounceManagement() public virtual override onlyPolicy() { } function pushManagement( address newOwner_ ) public virtual override onlyPolicy() { } function pullManagement() public virtual override { } } interface IERC20 { function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function totalSupply() external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { } } interface IBondCalculator { function valuation( address pair_, uint amount_ ) external view returns ( uint _value ); } contract TestTreasury is Ownable { using SafeERC20 for IERC20; using SafeMath for uint; mapping( address => bool ) public isReserveToken; mapping( address => bool ) public isReserveDepositor; mapping( address => bool ) public isReserveSpender; mapping( address => bool ) public isReserveManager; function deposit( uint _amount, address _token, uint _profit ) external { } function withdraw( uint _amount, address _token ) external { } function manage( address _token, uint _amount ) external { require(<FILL_ME>) IERC20( _token ).safeTransfer( msg.sender, _amount ); } function valueOfToken( address _token, uint _amount ) public view returns ( uint value_ ) { } enum MANAGING { RESERVEDEPOSITOR, RESERVESPENDER, RESERVETOKEN, RESERVEMANAGER } function toggle( MANAGING _managing, address _address ) external onlyPolicy() { } }
isReserveManager[msg.sender],"Not approved"
53,564
isReserveManager[msg.sender]
null
// SPDX-License-Identifier: MIT pragma solidity 0.5.0; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function pow(uint256 base, uint256 exponent) internal pure returns (uint256) { } } library Roles { struct Role { mapping(address => bool) bearer; } function add(Role storage role, address account) internal { } function remove(Role storage role, address account) internal { } function has(Role storage role, address account) internal view returns (bool) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } contract AdminRole is Ownable { using Roles for Roles.Role; event AdminAdded(address indexed account); event AdminRemoved(address indexed account); Roles.Role private _admin_list; constructor () internal { } modifier onlyAdmin() { require(<FILL_ME>) _; } function isAdmin(address account) public view returns (bool) { } function addAdmin(address account) public onlyAdmin { } function removeAdmin(address account) public onlyOwner { } function renounceAdmin() public { } function _addAdmin(address account) internal { } function _removeAdmin(address account) internal { } } contract Pausable is AdminRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyAdmin whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyAdmin whenPaused { } } interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { } } contract ERC20Pausable is ERC20, Pausable { function transfer(address to, uint256 value) public whenNotPaused returns (bool) { } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { } function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) { } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool success) { } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { } /** * @return the name of the token. */ function name() public view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { } } contract FRR is ERC20Detailed, ERC20Pausable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) public timelockList; mapping(address => bool) public frozenAccount; event Freeze(address indexed holder); event Unfreeze(address indexed holder); event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); modifier notFrozen(address _holder) { } constructor() ERC20Detailed("Frontrow", "FRR", 18) public { } function balanceOf(address owner) public view returns (uint256) { } function lockedBalanceOf(address owner) public view returns (uint256) { } function transfer(address to, uint256 value) public notFrozen(msg.sender) returns (bool) { } function transferFrom(address from, address to, uint256 value) public notFrozen(from) returns (bool) { } function freezeAccount(address holder) public onlyAdmin returns (bool) { } function unfreezeAccount(address holder) public onlyAdmin returns (bool) { } function lock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function unlock(address holder, uint256 idx) public onlyAdmin returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns (bool) { } function _unlock(address holder, uint256 idx) internal returns (bool) { } function _autoUnlock(address holder) internal returns (bool) { } function autoUnlock() public returns (bool) { } /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public notFrozen(msg.sender) { } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param value uint256 The amount of token to be burned */ function burnFrom(address from, uint256 value) public notFrozen(from) { } }
isAdmin(msg.sender)||isOwner(msg.sender)
53,679
isAdmin(msg.sender)||isOwner(msg.sender)
"Nothing allowed."
// SPDX-License-Identifier: MIT pragma solidity 0.5.0; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function pow(uint256 base, uint256 exponent) internal pure returns (uint256) { } } library Roles { struct Role { mapping(address => bool) bearer; } function add(Role storage role, address account) internal { } function remove(Role storage role, address account) internal { } function has(Role storage role, address account) internal view returns (bool) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } contract AdminRole is Ownable { using Roles for Roles.Role; event AdminAdded(address indexed account); event AdminRemoved(address indexed account); Roles.Role private _admin_list; constructor () internal { } modifier onlyAdmin() { } function isAdmin(address account) public view returns (bool) { } function addAdmin(address account) public onlyAdmin { } function removeAdmin(address account) public onlyOwner { } function renounceAdmin() public { } function _addAdmin(address account) internal { } function _removeAdmin(address account) internal { } } contract Pausable is AdminRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyAdmin whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyAdmin whenPaused { } } interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { require(<FILL_ME>) _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } contract ERC20Pausable is ERC20, Pausable { function transfer(address to, uint256 value) public whenNotPaused returns (bool) { } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { } function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) { } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool success) { } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { } /** * @return the name of the token. */ function name() public view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { } } contract FRR is ERC20Detailed, ERC20Pausable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) public timelockList; mapping(address => bool) public frozenAccount; event Freeze(address indexed holder); event Unfreeze(address indexed holder); event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); modifier notFrozen(address _holder) { } constructor() ERC20Detailed("Frontrow", "FRR", 18) public { } function balanceOf(address owner) public view returns (uint256) { } function lockedBalanceOf(address owner) public view returns (uint256) { } function transfer(address to, uint256 value) public notFrozen(msg.sender) returns (bool) { } function transferFrom(address from, address to, uint256 value) public notFrozen(from) returns (bool) { } function freezeAccount(address holder) public onlyAdmin returns (bool) { } function unfreezeAccount(address holder) public onlyAdmin returns (bool) { } function lock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function unlock(address holder, uint256 idx) public onlyAdmin returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns (bool) { } function _unlock(address holder, uint256 idx) internal returns (bool) { } function _autoUnlock(address holder) internal returns (bool) { } function autoUnlock() public returns (bool) { } /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public notFrozen(msg.sender) { } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param value uint256 The amount of token to be burned */ function burnFrom(address from, uint256 value) public notFrozen(from) { } }
_allowed[account][msg.sender]>0,"Nothing allowed."
53,679
_allowed[account][msg.sender]>0
"not enough balance."
// SPDX-License-Identifier: MIT pragma solidity 0.5.0; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function pow(uint256 base, uint256 exponent) internal pure returns (uint256) { } } library Roles { struct Role { mapping(address => bool) bearer; } function add(Role storage role, address account) internal { } function remove(Role storage role, address account) internal { } function has(Role storage role, address account) internal view returns (bool) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } contract AdminRole is Ownable { using Roles for Roles.Role; event AdminAdded(address indexed account); event AdminRemoved(address indexed account); Roles.Role private _admin_list; constructor () internal { } modifier onlyAdmin() { } function isAdmin(address account) public view returns (bool) { } function addAdmin(address account) public onlyAdmin { } function removeAdmin(address account) public onlyOwner { } function renounceAdmin() public { } function _addAdmin(address account) internal { } function _removeAdmin(address account) internal { } } contract Pausable is AdminRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyAdmin whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyAdmin whenPaused { } } interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { } } contract ERC20Pausable is ERC20, Pausable { function transfer(address to, uint256 value) public whenNotPaused returns (bool) { } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { } function approve(address spender, uint256 value) public whenNotPaused returns (bool) { } function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) { } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool success) { } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { } /** * @return the name of the token. */ function name() public view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { } } contract FRR is ERC20Detailed, ERC20Pausable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) public timelockList; mapping(address => bool) public frozenAccount; event Freeze(address indexed holder); event Unfreeze(address indexed holder); event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); modifier notFrozen(address _holder) { } constructor() ERC20Detailed("Frontrow", "FRR", 18) public { } function balanceOf(address owner) public view returns (uint256) { } function lockedBalanceOf(address owner) public view returns (uint256) { } function transfer(address to, uint256 value) public notFrozen(msg.sender) returns (bool) { } function transferFrom(address from, address to, uint256 value) public notFrozen(from) returns (bool) { } function freezeAccount(address holder) public onlyAdmin returns (bool) { } function unfreezeAccount(address holder) public onlyAdmin returns (bool) { } function lock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlyAdmin returns (bool) { } function unlock(address holder, uint256 idx) public onlyAdmin returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns (bool) { } function _unlock(address holder, uint256 idx) internal returns (bool) { } function _autoUnlock(address holder) internal returns (bool) { } function autoUnlock() public returns (bool) { } /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public notFrozen(msg.sender) { if (timelockList[msg.sender].length > 0) { _autoUnlock(msg.sender); } require(<FILL_ME>) _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param from address The address which you want to send tokens from * @param value uint256 The amount of token to be burned */ function burnFrom(address from, uint256 value) public notFrozen(from) { } }
SafeMath.sub(balanceOf(msg.sender),lockedBalanceOf(msg.sender))>=value,"not enough balance."
53,679
SafeMath.sub(balanceOf(msg.sender),lockedBalanceOf(msg.sender))>=value
"Imx L2 is enabled"
pragma solidity ^0.8.6; contract VeveToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable { bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); event EnabledImx(address account); event DisabledImx(address account); modifier whenImxEnabled() { } modifier whenImxDisabled() { require(<FILL_ME>) _; } bool public imxEnabled; event UpdatedImx(address imx); modifier onlyIMX() { } address public imx; string public baseURI; mapping(bytes => uint256) private tokenBlueprintToTokenId; mapping(uint256 => string) private tokenNames; mapping(uint256 => uint256) private tokenIssueNumbers; function initialize(string memory baseURI_, address imx_) public initializer { } /** * Management */ function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory baseURI_) public onlyRole(DEFAULT_ADMIN_ROLE) { } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} /** * ImmutableX */ function setImx(address _imx) public onlyRole(DEFAULT_ADMIN_ROLE) { } function enableImx() public whenImxDisabled onlyRole(DEFAULT_ADMIN_ROLE) { } function disableImx() public whenImxEnabled onlyRole(DEFAULT_ADMIN_ROLE) { } /** * Token Helpers */ function exists(uint256 tokenId) public view returns (bool) { } function getDetailsByBlueprint(bytes memory blueprint) public view returns (uint256 tokenId, string memory tokenURI) { } function getDetails(uint256 tokenId) public view returns ( string memory name, uint256 issueNumber, string memory tokenURI ) { } /** * Minting */ function safeMint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { } function mint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { } function mintFor( address to, uint256 tokenId, bytes calldata blueprint ) public whenImxEnabled onlyIMX { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) whenNotPaused { } /** * Burning */ function burn(uint256 tokenId) public onlyRole(BURNER_ROLE) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override( ERC721Upgradeable, ERC721EnumerableUpgradeable, AccessControlUpgradeable ) returns (bool) { } }
!imxEnabled,"Imx L2 is enabled"
53,691
!imxEnabled
"Token blueprint already minted"
pragma solidity ^0.8.6; contract VeveToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable { bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); event EnabledImx(address account); event DisabledImx(address account); modifier whenImxEnabled() { } modifier whenImxDisabled() { } bool public imxEnabled; event UpdatedImx(address imx); modifier onlyIMX() { } address public imx; string public baseURI; mapping(bytes => uint256) private tokenBlueprintToTokenId; mapping(uint256 => string) private tokenNames; mapping(uint256 => uint256) private tokenIssueNumbers; function initialize(string memory baseURI_, address imx_) public initializer { } /** * Management */ function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory baseURI_) public onlyRole(DEFAULT_ADMIN_ROLE) { } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} /** * ImmutableX */ function setImx(address _imx) public onlyRole(DEFAULT_ADMIN_ROLE) { } function enableImx() public whenImxDisabled onlyRole(DEFAULT_ADMIN_ROLE) { } function disableImx() public whenImxEnabled onlyRole(DEFAULT_ADMIN_ROLE) { } /** * Token Helpers */ function exists(uint256 tokenId) public view returns (bool) { } function getDetailsByBlueprint(bytes memory blueprint) public view returns (uint256 tokenId, string memory tokenURI) { } function getDetails(uint256 tokenId) public view returns ( string memory name, uint256 issueNumber, string memory tokenURI ) { } /** * Minting */ function safeMint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { (string memory name, uint256 issueNumber) = Blueprint .deserializeBlueprint(blueprint); require(<FILL_ME>) _safeMint(to, tokenId); tokenBlueprintToTokenId[blueprint] = tokenId; tokenNames[tokenId] = name; tokenIssueNumbers[tokenId] = issueNumber; } function mint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { } function mintFor( address to, uint256 tokenId, bytes calldata blueprint ) public whenImxEnabled onlyIMX { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) whenNotPaused { } /** * Burning */ function burn(uint256 tokenId) public onlyRole(BURNER_ROLE) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override( ERC721Upgradeable, ERC721EnumerableUpgradeable, AccessControlUpgradeable ) returns (bool) { } }
tokenBlueprintToTokenId[blueprint]==0,"Token blueprint already minted"
53,691
tokenBlueprintToTokenId[blueprint]==0
"Token id does not match metadata"
pragma solidity ^0.8.6; contract VeveToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable { bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); event EnabledImx(address account); event DisabledImx(address account); modifier whenImxEnabled() { } modifier whenImxDisabled() { } bool public imxEnabled; event UpdatedImx(address imx); modifier onlyIMX() { } address public imx; string public baseURI; mapping(bytes => uint256) private tokenBlueprintToTokenId; mapping(uint256 => string) private tokenNames; mapping(uint256 => uint256) private tokenIssueNumbers; function initialize(string memory baseURI_, address imx_) public initializer { } /** * Management */ function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory baseURI_) public onlyRole(DEFAULT_ADMIN_ROLE) { } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _authorizeUpgrade(address newImplementation) internal override onlyRole(UPGRADER_ROLE) {} /** * ImmutableX */ function setImx(address _imx) public onlyRole(DEFAULT_ADMIN_ROLE) { } function enableImx() public whenImxDisabled onlyRole(DEFAULT_ADMIN_ROLE) { } function disableImx() public whenImxEnabled onlyRole(DEFAULT_ADMIN_ROLE) { } /** * Token Helpers */ function exists(uint256 tokenId) public view returns (bool) { } function getDetailsByBlueprint(bytes memory blueprint) public view returns (uint256 tokenId, string memory tokenURI) { } function getDetails(uint256 tokenId) public view returns ( string memory name, uint256 issueNumber, string memory tokenURI ) { } /** * Minting */ function safeMint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { } function mint( address to, uint256 tokenId, bytes calldata blueprint ) public onlyRole(MINTER_ROLE) { } function mintFor( address to, uint256 tokenId, bytes calldata blueprint ) public whenImxEnabled onlyIMX { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) whenNotPaused { } /** * Burning */ function burn(uint256 tokenId) public onlyRole(BURNER_ROLE) { string memory name = tokenNames[tokenId]; uint256 issueNumber = tokenIssueNumbers[tokenId]; bytes memory tokenBlueprint = Blueprint.serializeBlueprint( name, issueNumber ); require(<FILL_ME>) super._burn(tokenId); delete tokenBlueprintToTokenId[tokenBlueprint]; delete tokenNames[tokenId]; delete tokenIssueNumbers[tokenId]; } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override( ERC721Upgradeable, ERC721EnumerableUpgradeable, AccessControlUpgradeable ) returns (bool) { } }
tokenBlueprintToTokenId[tokenBlueprint]==tokenId,"Token id does not match metadata"
53,691
tokenBlueprintToTokenId[tokenBlueprint]==tokenId
"Sale not open"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; // **** ****** ** // *///** **////** /** // /* */* ** ** ** // ****** ****** ****** ****** // /* * /*//** ** /** //////** //**//* //////** ///**/ // /** /* //*** /** ******* /** / ******* /** // /* /* **/** //** ** **////** /** **////** /** // / **** ** //** //****** //********/*** //******** //** // //// // // ////// //////// /// //////// // import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; /** * @title DichoStudio 0xCarat * @author codesza, adapted from NPassCore.sol, NDerivative.sol, Voyagerz.sol, and CryptoCoven.sol * and inspired by Vows and Runners: Next Generation */ contract DichoStudio0xCarat is ERC721, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; /// @notice A counter for tokens Counters.Counter private _tokenIds; uint256 private constant _maxPublicSupply = 888; uint256 private constant _maxRingsPerWallet = 3; uint256 public saleStartTimestamp; address private openSeaProxyRegistryAddress; /// @notice Records of crafter- and wearer- derived seeds mapping(uint256 => uint256) private _ringSeed; mapping(uint256 => uint256) private _wearerSeed; /// @notice Recordkeeping beyond balanceOf mapping(address => uint256) private _crafterBalance; constructor(address _openSeaProxyRegistryAddress) ERC721("Dicho Studio 0xCarat", "RING") { } /// @notice Craft rings, a.k.a. mint function craft(uint256 numToMint) external nonReentrant { require(<FILL_ME>) require(numToMint > 0 && numToMint <= mintsAvailable(), "Out of rings"); require( _crafterBalance[msg.sender] + numToMint <= _maxRingsPerWallet, "Max rings to craft is three" ); uint256 tokenId; for (uint256 i = 0; i < numToMint; i++) { _tokenIds.increment(); tokenId = _tokenIds.current(); _safeMint(msg.sender, tokenId); _ringSeed[tokenId] = randSeed(msg.sender, tokenId, 13999234923493293432397); _wearerSeed[tokenId] = _ringSeed[tokenId]; } _crafterBalance[msg.sender] += numToMint; } /// @notice Gift rings using safeTransferFrom function gift(address to, uint256 tokenId) external nonReentrant { } /// @notice To divorce, burn the ring. function divorce(uint256 tokenId) external nonReentrant { } /// @notice Is it time yet? function isSaleOpen() public view returns (bool) { } /// @notice Calculate available open mints function mintsAvailable() public view returns (uint256) { } // ============ OWNER ONLY ROUTINES ============ /// @notice Allows owner to withdraw amount function withdrawAll() external onlyOwner { } /// @notice Allows owner to change sale time start function setSaleTimestamp(uint256 timestamp) external onlyOwner { } // ============ HELPER FUNCTIONS / UTILS ============ /// @notice Random seed generation, from Voyagerz contract function randSeed(address addr, uint256 tokenId, uint256 modulus) internal view returns (uint256) { } function toString(uint256 value) internal pure returns (string memory) { } function correctColor(uint256 hue, uint256 sat, uint256 lum, uint256 seed) internal pure returns (uint256, uint256) { } // ============ RING CONSTRUCTION ============ /// @notice Baseline parameters for a ring struct RingParams { uint256 gemcol_h; uint256 gemcol_s; uint256 gemcol_l; uint256 bgcol_h; uint256 bgcol_s; uint256 cut_idx; uint256 band_idx; string bandcol; } /// @notice Using wearer and crafter seeds to define ring parameters function getRingParams(uint256 tokenId) internal view returns (RingParams memory) { } /// @notice Constructing the ring's svg using its parameters function getSvg(uint256 tokenId) internal view returns (bytes memory, RingParams memory) { } // ============ OVERRIDES ============ /// @notice Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /// @notice Updates tokenId's wearer and seed to update background function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } } /// @notice These contract definitions are used to create a reference to the OpenSea ProxyRegistry contract by using the registry's address (see isApprovedForAll). contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
isSaleOpen(),"Sale not open"
53,716
isSaleOpen()
"Max rings to craft is three"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; // **** ****** ** // *///** **////** /** // /* */* ** ** ** // ****** ****** ****** ****** // /* * /*//** ** /** //////** //**//* //////** ///**/ // /** /* //*** /** ******* /** / ******* /** // /* /* **/** //** ** **////** /** **////** /** // / **** ** //** //****** //********/*** //******** //** // //// // // ////// //////// /// //////// // import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; /** * @title DichoStudio 0xCarat * @author codesza, adapted from NPassCore.sol, NDerivative.sol, Voyagerz.sol, and CryptoCoven.sol * and inspired by Vows and Runners: Next Generation */ contract DichoStudio0xCarat is ERC721, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; /// @notice A counter for tokens Counters.Counter private _tokenIds; uint256 private constant _maxPublicSupply = 888; uint256 private constant _maxRingsPerWallet = 3; uint256 public saleStartTimestamp; address private openSeaProxyRegistryAddress; /// @notice Records of crafter- and wearer- derived seeds mapping(uint256 => uint256) private _ringSeed; mapping(uint256 => uint256) private _wearerSeed; /// @notice Recordkeeping beyond balanceOf mapping(address => uint256) private _crafterBalance; constructor(address _openSeaProxyRegistryAddress) ERC721("Dicho Studio 0xCarat", "RING") { } /// @notice Craft rings, a.k.a. mint function craft(uint256 numToMint) external nonReentrant { require(isSaleOpen(), "Sale not open"); require(numToMint > 0 && numToMint <= mintsAvailable(), "Out of rings"); require(<FILL_ME>) uint256 tokenId; for (uint256 i = 0; i < numToMint; i++) { _tokenIds.increment(); tokenId = _tokenIds.current(); _safeMint(msg.sender, tokenId); _ringSeed[tokenId] = randSeed(msg.sender, tokenId, 13999234923493293432397); _wearerSeed[tokenId] = _ringSeed[tokenId]; } _crafterBalance[msg.sender] += numToMint; } /// @notice Gift rings using safeTransferFrom function gift(address to, uint256 tokenId) external nonReentrant { } /// @notice To divorce, burn the ring. function divorce(uint256 tokenId) external nonReentrant { } /// @notice Is it time yet? function isSaleOpen() public view returns (bool) { } /// @notice Calculate available open mints function mintsAvailable() public view returns (uint256) { } // ============ OWNER ONLY ROUTINES ============ /// @notice Allows owner to withdraw amount function withdrawAll() external onlyOwner { } /// @notice Allows owner to change sale time start function setSaleTimestamp(uint256 timestamp) external onlyOwner { } // ============ HELPER FUNCTIONS / UTILS ============ /// @notice Random seed generation, from Voyagerz contract function randSeed(address addr, uint256 tokenId, uint256 modulus) internal view returns (uint256) { } function toString(uint256 value) internal pure returns (string memory) { } function correctColor(uint256 hue, uint256 sat, uint256 lum, uint256 seed) internal pure returns (uint256, uint256) { } // ============ RING CONSTRUCTION ============ /// @notice Baseline parameters for a ring struct RingParams { uint256 gemcol_h; uint256 gemcol_s; uint256 gemcol_l; uint256 bgcol_h; uint256 bgcol_s; uint256 cut_idx; uint256 band_idx; string bandcol; } /// @notice Using wearer and crafter seeds to define ring parameters function getRingParams(uint256 tokenId) internal view returns (RingParams memory) { } /// @notice Constructing the ring's svg using its parameters function getSvg(uint256 tokenId) internal view returns (bytes memory, RingParams memory) { } // ============ OVERRIDES ============ /// @notice Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /// @notice Updates tokenId's wearer and seed to update background function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } } /// @notice These contract definitions are used to create a reference to the OpenSea ProxyRegistry contract by using the registry's address (see isApprovedForAll). contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
_crafterBalance[msg.sender]+numToMint<=_maxRingsPerWallet,"Max rings to craft is three"
53,716
_crafterBalance[msg.sender]+numToMint<=_maxRingsPerWallet
"Address already claimed."
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/cryptography/MerkleProof.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; contract MerkleTokenClaimDataManager is ReentrancyGuard { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); using Strings for uint256; bytes32 public immutable merkleRoot; // This is a packed array of booleans. mapping(uint256 => uint256) private claimsBitMap; constructor(bytes32 _merkleRoot) public { } function verifyAndSetClaimed( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external payable nonReentrant returns (uint256) { require(<FILL_ME>) // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), "Invalid proof."); // Mark it claimed and send the token. _setClaimed(index); } function hasClaimed(uint256 index) public view returns (bool) { } function _setClaimed(uint256 index) private { } }
!hasClaimed(index),"Address already claimed."
53,731
!hasClaimed(index)
"::isKeeper: relayer is not registered"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import '@openzeppelin/contracts/access/Ownable.sol'; import "../libraries/UniswapV2Library.sol"; import '../interfaces/Keep3r/IKeep3rV1Mini.sol'; enum OrderState {Placed, Cancelled, Executed} interface UnitradeInterface { function cancelOrder(uint256 orderId) external returns (bool); function executeOrder(uint256 orderId) external returns (uint256[] memory amounts); function feeDiv() external view returns (uint16); function feeMul() external view returns (uint16); function getActiveOrderId(uint256 index) external view returns (uint256); function getActiveOrdersLength() external view returns (uint256); function getOrder(uint256 orderId) external view returns ( uint8 orderType, address maker, address tokenIn, address tokenOut, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee, uint256 totalEthDeposited, OrderState orderState, bool deflationary ); function getOrderIdForAddress(address _address, uint256 index) external view returns (uint256); function getOrdersForAddressLength(address _address) external view returns (uint256); function incinerator() external view returns (address); function owner() external view returns (address); function placeOrder( uint8 orderType, address tokenIn, address tokenOut, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee ) external returns (uint256); function renounceOwnership() external; function splitDiv() external view returns (uint16); function splitMul() external view returns (uint16); function staker() external view returns (address); function transferOwnership(address newOwner) external; function uniswapV2Factory() external view returns (address); function uniswapV2Router() external view returns (address); function updateFee(uint16 _feeMul, uint16 _feeDiv) external; function updateOrder( uint256 orderId, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee ) external returns (bool); function updateSplit(uint16 _splitMul, uint16 _splitDiv) external; function updateStaker(address newStaker) external; } contract UnitradeExecutorRLRv2 is Ownable{ UnitradeInterface iUniTrade = UnitradeInterface( 0xC1bF1B4929DA9303773eCEa5E251fDEc22cC6828 ); //change this to relay3r on deploy IKeep3rV1Mini public RLR; bool TryDeflationaryOrders = false; bool public payoutETH = true; bool public payoutRLR = true; constructor(address keepertoken) public { } modifier upkeep() { require(<FILL_ME>) _; if(payoutETH){ //Payout ETH RLR.workedETH(msg.sender); } if(payoutRLR) { //Payout RLR RLR.worked(msg.sender); } } function togglePayETH() public onlyOwner { } function togglePayRLR() public onlyOwner { } //Use this to depricate this job to move rlr to another job later function destructJob() public onlyOwner { } function setTryBurnabletokens(bool fTry) public onlyOwner{ } function getIfExecuteable(uint256 i) public view returns (bool) { } function hasExecutableOrdersPending() public view returns (bool) { } //Get count of executable orders function getExectuableOrdersCount() public view returns (uint count){ } function getExecutableOrdersList() public view returns (uint[] memory) { } receive() external payable { } function workable() public view returns (bool) { } function work() public upkeep{ } //Use this to save on gas function workBatch(uint[] memory orderList) public upkeep { } }
RLR.isKeeper(msg.sender),"::isKeeper: relayer is not registered"
53,770
RLR.isKeeper(msg.sender)
"No executable trades"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import '@openzeppelin/contracts/access/Ownable.sol'; import "../libraries/UniswapV2Library.sol"; import '../interfaces/Keep3r/IKeep3rV1Mini.sol'; enum OrderState {Placed, Cancelled, Executed} interface UnitradeInterface { function cancelOrder(uint256 orderId) external returns (bool); function executeOrder(uint256 orderId) external returns (uint256[] memory amounts); function feeDiv() external view returns (uint16); function feeMul() external view returns (uint16); function getActiveOrderId(uint256 index) external view returns (uint256); function getActiveOrdersLength() external view returns (uint256); function getOrder(uint256 orderId) external view returns ( uint8 orderType, address maker, address tokenIn, address tokenOut, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee, uint256 totalEthDeposited, OrderState orderState, bool deflationary ); function getOrderIdForAddress(address _address, uint256 index) external view returns (uint256); function getOrdersForAddressLength(address _address) external view returns (uint256); function incinerator() external view returns (address); function owner() external view returns (address); function placeOrder( uint8 orderType, address tokenIn, address tokenOut, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee ) external returns (uint256); function renounceOwnership() external; function splitDiv() external view returns (uint16); function splitMul() external view returns (uint16); function staker() external view returns (address); function transferOwnership(address newOwner) external; function uniswapV2Factory() external view returns (address); function uniswapV2Router() external view returns (address); function updateFee(uint16 _feeMul, uint16 _feeDiv) external; function updateOrder( uint256 orderId, uint256 amountInOffered, uint256 amountOutExpected, uint256 executorFee ) external returns (bool); function updateSplit(uint16 _splitMul, uint16 _splitDiv) external; function updateStaker(address newStaker) external; } contract UnitradeExecutorRLRv2 is Ownable{ UnitradeInterface iUniTrade = UnitradeInterface( 0xC1bF1B4929DA9303773eCEa5E251fDEc22cC6828 ); //change this to relay3r on deploy IKeep3rV1Mini public RLR; bool TryDeflationaryOrders = false; bool public payoutETH = true; bool public payoutRLR = true; constructor(address keepertoken) public { } modifier upkeep() { } function togglePayETH() public onlyOwner { } function togglePayRLR() public onlyOwner { } //Use this to depricate this job to move rlr to another job later function destructJob() public onlyOwner { } function setTryBurnabletokens(bool fTry) public onlyOwner{ } function getIfExecuteable(uint256 i) public view returns (bool) { } function hasExecutableOrdersPending() public view returns (bool) { } //Get count of executable orders function getExectuableOrdersCount() public view returns (uint count){ } function getExecutableOrdersList() public view returns (uint[] memory) { } receive() external payable { } function workable() public view returns (bool) { } function work() public upkeep{ require(<FILL_ME>) for (uint256 i = 0; i < iUniTrade.getActiveOrdersLength() - 1; i++) { if (getIfExecuteable(iUniTrade.getActiveOrderId(i))) { iUniTrade.executeOrder(i); } } } //Use this to save on gas function workBatch(uint[] memory orderList) public upkeep { } }
workable(),"No executable trades"
53,770
workable()
"Giveaway not minted"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RichApeCarClubNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; using SafeMath for uint256; using SafeMath for uint8; uint256 public constant preSalePrice = 0.12 ether; uint256 public constant publicSalePrice = 0.15 ether; uint256 public constant supplyForPreSale = 4777; uint256 public mintLimit = 100; uint256 public mintLimitForPreSale = 4; uint256 public giveawaySupply = 777; uint256 public maxPerAddressDuringMint; uint256 public maxSupply = 7777; bool public saleStarted = false; bool public presaleStarted = false; bool public revealed = false; string private baseExtension = ".json"; string private baseURI; string private notRevealedURI; bytes32 private _merkleRoot; constructor( uint256 maxBatchSize_, string memory baseURI_, string memory notRevealedURI_ ) ERC721A("Rich Ape Car Club", "RACC") { } modifier callerIsUser() { } function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Mint NFTs for giveway */ function mintForGiveaway() external onlyOwner { } /** * @dev Admin mint for allocated NFTs * @param _amount Number of NFTs to mint * @param _to NFT receiver */ function mintAdmin(uint256 _amount, address _to) external onlyOwner { require(<FILL_ME>) require(totalSupply() + _amount <= maxSupply, "Max supply reached"); uint256 numChunks = _amount / maxPerAddressDuringMint; for (uint256 i = 0; i < numChunks; i++) { _safeMint(_to, maxPerAddressDuringMint); } uint256 numModules = _amount % maxPerAddressDuringMint; if (numModules > 0) { _safeMint(_to, numModules); } } /** * @param _account Leaf for MerkleTree */ function _leaf(address _account) private pure returns (bytes32) { } function _verifyWhitelist(bytes32 leaf, bytes32[] memory _proof) private view returns (bool) { } /** * @param _amount Number of nfts to mint for whitelist * @param _proof Array of values generated by Merkle tree */ function whitelistMint(uint256 _amount, bytes32[] memory _proof) external payable { } /** * @param _amount numbers of NFT to mint for public sale */ function publicSaleMint(uint256 _amount) external payable callerIsUser { } function _refundIfOver(uint256 _price) private { } /** * Override tokenURI */ function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner nonReentrant { } function setSaleStarted(bool _hasStarted) external onlyOwner { } function setpresaleStarted(bool _hasStarted) external onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function reveal() public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootValue) external onlyOwner returns (bytes32) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
totalSupply()>=giveawaySupply,"Giveaway not minted"
53,771
totalSupply()>=giveawaySupply
"Invalid Address"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RichApeCarClubNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; using SafeMath for uint256; using SafeMath for uint8; uint256 public constant preSalePrice = 0.12 ether; uint256 public constant publicSalePrice = 0.15 ether; uint256 public constant supplyForPreSale = 4777; uint256 public mintLimit = 100; uint256 public mintLimitForPreSale = 4; uint256 public giveawaySupply = 777; uint256 public maxPerAddressDuringMint; uint256 public maxSupply = 7777; bool public saleStarted = false; bool public presaleStarted = false; bool public revealed = false; string private baseExtension = ".json"; string private baseURI; string private notRevealedURI; bytes32 private _merkleRoot; constructor( uint256 maxBatchSize_, string memory baseURI_, string memory notRevealedURI_ ) ERC721A("Rich Ape Car Club", "RACC") { } modifier callerIsUser() { } function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Mint NFTs for giveway */ function mintForGiveaway() external onlyOwner { } /** * @dev Admin mint for allocated NFTs * @param _amount Number of NFTs to mint * @param _to NFT receiver */ function mintAdmin(uint256 _amount, address _to) external onlyOwner { } /** * @param _account Leaf for MerkleTree */ function _leaf(address _account) private pure returns (bytes32) { } function _verifyWhitelist(bytes32 leaf, bytes32[] memory _proof) private view returns (bool) { } /** * @param _amount Number of nfts to mint for whitelist * @param _proof Array of values generated by Merkle tree */ function whitelistMint(uint256 _amount, bytes32[] memory _proof) external payable { require(presaleStarted, "Not started presale mint"); require(totalSupply() >= giveawaySupply, "Giveaway not minted"); require(<FILL_ME>) require( _amount > 0 && numberMinted(msg.sender) + _amount <= mintLimitForPreSale, "Max limit per wallet exceeded" ); require( totalSupply() + _amount <= supplyForPreSale, "Max supply reached" ); if (msg.sender != owner()) { require( msg.value >= preSalePrice * _amount, "Need to send more ETH" ); } _safeMint(msg.sender, _amount); _refundIfOver(preSalePrice * _amount); } /** * @param _amount numbers of NFT to mint for public sale */ function publicSaleMint(uint256 _amount) external payable callerIsUser { } function _refundIfOver(uint256 _price) private { } /** * Override tokenURI */ function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner nonReentrant { } function setSaleStarted(bool _hasStarted) external onlyOwner { } function setpresaleStarted(bool _hasStarted) external onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function reveal() public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootValue) external onlyOwner returns (bytes32) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
_verifyWhitelist(_leaf(msg.sender),_proof)==true,"Invalid Address"
53,771
_verifyWhitelist(_leaf(msg.sender),_proof)==true
"Max supply reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RichApeCarClubNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; using SafeMath for uint256; using SafeMath for uint8; uint256 public constant preSalePrice = 0.12 ether; uint256 public constant publicSalePrice = 0.15 ether; uint256 public constant supplyForPreSale = 4777; uint256 public mintLimit = 100; uint256 public mintLimitForPreSale = 4; uint256 public giveawaySupply = 777; uint256 public maxPerAddressDuringMint; uint256 public maxSupply = 7777; bool public saleStarted = false; bool public presaleStarted = false; bool public revealed = false; string private baseExtension = ".json"; string private baseURI; string private notRevealedURI; bytes32 private _merkleRoot; constructor( uint256 maxBatchSize_, string memory baseURI_, string memory notRevealedURI_ ) ERC721A("Rich Ape Car Club", "RACC") { } modifier callerIsUser() { } function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Mint NFTs for giveway */ function mintForGiveaway() external onlyOwner { } /** * @dev Admin mint for allocated NFTs * @param _amount Number of NFTs to mint * @param _to NFT receiver */ function mintAdmin(uint256 _amount, address _to) external onlyOwner { } /** * @param _account Leaf for MerkleTree */ function _leaf(address _account) private pure returns (bytes32) { } function _verifyWhitelist(bytes32 leaf, bytes32[] memory _proof) private view returns (bool) { } /** * @param _amount Number of nfts to mint for whitelist * @param _proof Array of values generated by Merkle tree */ function whitelistMint(uint256 _amount, bytes32[] memory _proof) external payable { require(presaleStarted, "Not started presale mint"); require(totalSupply() >= giveawaySupply, "Giveaway not minted"); require( _verifyWhitelist(_leaf(msg.sender), _proof) == true, "Invalid Address" ); require( _amount > 0 && numberMinted(msg.sender) + _amount <= mintLimitForPreSale, "Max limit per wallet exceeded" ); require(<FILL_ME>) if (msg.sender != owner()) { require( msg.value >= preSalePrice * _amount, "Need to send more ETH" ); } _safeMint(msg.sender, _amount); _refundIfOver(preSalePrice * _amount); } /** * @param _amount numbers of NFT to mint for public sale */ function publicSaleMint(uint256 _amount) external payable callerIsUser { } function _refundIfOver(uint256 _price) private { } /** * Override tokenURI */ function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner nonReentrant { } function setSaleStarted(bool _hasStarted) external onlyOwner { } function setpresaleStarted(bool _hasStarted) external onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function reveal() public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootValue) external onlyOwner returns (bytes32) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
totalSupply()+_amount<=supplyForPreSale,"Max supply reached"
53,771
totalSupply()+_amount<=supplyForPreSale
"can not mint this many"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract RichApeCarClubNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; using SafeMath for uint256; using SafeMath for uint8; uint256 public constant preSalePrice = 0.12 ether; uint256 public constant publicSalePrice = 0.15 ether; uint256 public constant supplyForPreSale = 4777; uint256 public mintLimit = 100; uint256 public mintLimitForPreSale = 4; uint256 public giveawaySupply = 777; uint256 public maxPerAddressDuringMint; uint256 public maxSupply = 7777; bool public saleStarted = false; bool public presaleStarted = false; bool public revealed = false; string private baseExtension = ".json"; string private baseURI; string private notRevealedURI; bytes32 private _merkleRoot; constructor( uint256 maxBatchSize_, string memory baseURI_, string memory notRevealedURI_ ) ERC721A("Rich Ape Car Club", "RACC") { } modifier callerIsUser() { } function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Mint NFTs for giveway */ function mintForGiveaway() external onlyOwner { } /** * @dev Admin mint for allocated NFTs * @param _amount Number of NFTs to mint * @param _to NFT receiver */ function mintAdmin(uint256 _amount, address _to) external onlyOwner { } /** * @param _account Leaf for MerkleTree */ function _leaf(address _account) private pure returns (bytes32) { } function _verifyWhitelist(bytes32 leaf, bytes32[] memory _proof) private view returns (bool) { } /** * @param _amount Number of nfts to mint for whitelist * @param _proof Array of values generated by Merkle tree */ function whitelistMint(uint256 _amount, bytes32[] memory _proof) external payable { } /** * @param _amount numbers of NFT to mint for public sale */ function publicSaleMint(uint256 _amount) external payable callerIsUser { require(saleStarted, "PUBLIC_MINT_NOT_STARTED"); require(totalSupply() >= giveawaySupply, "Giveaway not minted"); require(totalSupply() + _amount <= maxSupply, "reached max supply"); require(<FILL_ME>) if (msg.sender != owner()) { require( msg.value >= publicSalePrice * _amount, "Need to send more ETH" ); } uint256 numChunks = _amount / maxPerAddressDuringMint; for (uint256 i = 0; i < numChunks; i++) { _safeMint(msg.sender, maxPerAddressDuringMint); } uint256 numModules = _amount % maxPerAddressDuringMint; if (numModules > 0) { _safeMint(msg.sender, numModules); } _refundIfOver(publicSalePrice * _amount); } function _refundIfOver(uint256 _price) private { } /** * Override tokenURI */ function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner nonReentrant { } function setSaleStarted(bool _hasStarted) external onlyOwner { } function setpresaleStarted(bool _hasStarted) external onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function reveal() public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootValue) external onlyOwner returns (bytes32) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
numberMinted(msg.sender)+_amount<=mintLimit,"can not mint this many"
53,771
numberMinted(msg.sender)+_amount<=mintLimit
"CANNOT_CONTROL_EVENTS"
// SPDX-License-Identifier: MIT pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import "./Destinations.sol"; import "./IEventSender.sol"; abstract contract EventSender is IEventSender { bool public eventSend; Destinations public destinations; modifier onEventSend() { } modifier onlyEventSendControl() { require(<FILL_ME>) _; } function setDestinations(address fxStateSender, address destinationOnL2) external virtual override onlyEventSendControl { } function setEventSend(bool eventSendSet) external virtual override onlyEventSendControl { } function canControlEventSend() internal view virtual returns (bool); function sendEvent(bytes memory data) internal virtual { } }
canControlEventSend(),"CANNOT_CONTROL_EVENTS"
53,887
canControlEventSend()
"ADDRESS_NOT_SET"
// SPDX-License-Identifier: MIT pragma solidity 0.6.11; pragma experimental ABIEncoderV2; import "./Destinations.sol"; import "./IEventSender.sol"; abstract contract EventSender is IEventSender { bool public eventSend; Destinations public destinations; modifier onEventSend() { } modifier onlyEventSendControl() { } function setDestinations(address fxStateSender, address destinationOnL2) external virtual override onlyEventSendControl { } function setEventSend(bool eventSendSet) external virtual override onlyEventSendControl { } function canControlEventSend() internal view virtual returns (bool); function sendEvent(bytes memory data) internal virtual { require(<FILL_ME>) require(destinations.destinationOnL2 != address(0), "ADDRESS_NOT_SET"); destinations.fxStateSender.sendMessageToChild(destinations.destinationOnL2, data); } }
address(destinations.fxStateSender)!=address(0),"ADDRESS_NOT_SET"
53,887
address(destinations.fxStateSender)!=address(0)
"Deposit not found"
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } } library Address { function toAddress(bytes source) internal pure returns(address addr) { } } /** */ contract SInv { //use of library of safe mathematical operations using SafeMath for uint; using Address for *; // array containing information about beneficiaries mapping(address => uint) public userDeposit; //Mapping for how much the User got from Refs mapping(address=>uint) public RefBonus; //How much the user earned to date mapping(address=>uint) public UserEarnings; //array containing information about the time of payment mapping(address => uint) public userTime; //array containing information on interest paid mapping(address => uint) public persentWithdraw; //fund fo transfer percent address public projectFund = 0xB3cE9796aCDC1855bd6Cec85a3403f13C918f1F2; //percentage deducted to the advertising fund uint projectPercent = 5; // 0,5% //time through which you can take dividends uint public chargingTime = 24 hours; uint public startPercent = 250*10; uint public countOfInvestors; uint public daysOnline; uint public dividendsPaid; constructor() public { } modifier isIssetUser() { require(<FILL_ME>) _; } modifier timePayment() { } function() external payable { } //return of interest on the deposit function collectPercent() isIssetUser timePayment public { } //When User decides to reinvest instead of paying out (to get more dividends per day) function Reinvest() isIssetUser timePayment external { } //make a contribution to the system function makeDeposit(bytes32 referrer) public payable { } //function call for fallback function makeDepositA(address referrer) public payable { } function getUserEarnings(address addr) public view returns(uint) { } //calculation of the current interest rate on the deposit function persentRate() public view returns(uint) { } // Withdraw of your referral earnings function PayOutRefBonus() external { } //refund of the amount available for withdrawal on deposit function payoutAmount(address addr) public view returns(uint,uint) { } mapping (address=>address) public TheGuyWhoReffedMe; mapping (address=>bytes32) public MyPersonalRefName; //for bidirectional search mapping (bytes32=>address) public RefNameToAddress; // referral counter mapping (address=>uint256) public referralCounter; // referral earnings counter mapping (address=>uint256) public referralEarningsCounter; //public function to register your ref function createMyPersonalRefName(bytes32 _RefName) external payable { } function newRegistrationwithRef() private { } //first grade ref gets 1% extra function CheckFirstGradeRefAdress() private { } //second grade ref gets 0,5% extra function CheckSecondGradeRefAdress() private { } //third grade ref gets 0,25% extra function CheckThirdGradeRefAdress() private { } //Returns your personal RefName, when it is registered function getMyRefName(address addr) public view returns(bytes32) { } function getMyRefNameAsString(address addr) public view returns(string) { } function bytes32ToString(bytes32 x) internal pure returns (string) { } }
userDeposit[msg.sender]>0,"Deposit not found"
53,991
userDeposit[msg.sender]>0