comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Staking token not matched."
// Copyright (c) 2020 SashimiProject. pragma solidity 0.6.12; contract LpBar is ERC20("LpBar", "xLP"), Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public lp; IERC20 public sashimi; IMasterChef public masterChef; uint256 public pid; IStakingRewards public uniStake; uint256 public totalLp; IUni public uni; IUniswapV2Router02 router; uint256 public perShareForUniHarvest; uint256 public perShareForChefHarvest; address public wETH; mapping(address => uint256) public lpBalance; mapping(address => uint256) public xLPBalance; // address => amount mapping(address => uint256) public rewardDebtsFromUni; // address => sashimi reward debt mapping(address => uint256) public rewardDebtsFromChef; // address => sashimi reward debt constructor(IERC20 _sashimi, IERC20 _lp, IUni _uni, IMasterChef _masterChef, IUniswapV2Router02 _router, IStakingRewards _uniStake, address _wETH) public { require(<FILL_ME>) lp = _lp; masterChef = _masterChef; uniStake = _uniStake; sashimi = _sashimi; uni = _uni; router = _router; wETH = _wETH; } function setPid(uint256 _pid) public onlyOwner{ } function approveMax() public onlyOwner{ } function enter(uint256 _amount) public { } function leave(uint256 _xLpShare) public { } function changeRouter(IUniswapV2Router02 _router) onlyOwner public{ } function harvestFromUniStake() private returns (uint256){ } function updatePerShareForUniHarvest() private{ } function updatePerShareForChefHarvest(uint256 _amount, bool _deposit, uint256 _totalShares) private { } function transferSashimi(address receipt, uint256 amount) private { } function earned(address account) public view returns(uint256){ } function earnedFromUniStaking(address account) public view returns(uint256){ } function earnedFromChef(address account) public view returns(uint256){ } }
_uniStake.stakingToken()==address(_lp),"Staking token not matched."
13,355
_uniStake.stakingToken()==address(_lp)
"SmartPoolRegistry.addSmartPool: POOL_ALREADY_IN_REGISTRY"
pragma solidity 0.8.1; import "../interfaces/IPieRegistry.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SmartPoolRegistry is IPieRegistry, Ownable { mapping(address => bool) public override inRegistry; address[] public override entries; function addSmartPool(address _smartPool) external override onlyOwner { require(<FILL_ME>) entries.push(_smartPool); inRegistry[_smartPool] = true; } function removeSmartPool(uint256 _index) public override onlyOwner { } function removeSmartPoolByAddress(address _address) external onlyOwner { } }
!inRegistry[_smartPool],"SmartPoolRegistry.addSmartPool: POOL_ALREADY_IN_REGISTRY"
13,378
!inRegistry[_smartPool]
'cannot take from contract what you did not send'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './OKLGWithdrawable.sol'; /** * @title OKLGAffiliate * @dev Support affiliate logic */ contract OKLGAffiliate is OKLGWithdrawable { modifier onlyAffiliateOrOwner() { } struct Affiliate { uint256 feePercent; uint256 revenue; } uint16 public defaultAffiliateDiscount = 1000; // 10% uint16 public constant PERCENT_DENOMENATOR = 10000; address public paymentWallet = 0x0000000000000000000000000000000000000000; mapping(address => Affiliate) public affiliates; // value is percentage of fees for affiliate (denomenator of 10000) address[] public affiliateList; mapping(address => uint256) public overrideDiscounts; // value is percentage off for customer (denomenator of 10000) event AddAffiliate(address indexed wallet, uint256 percent); event RemoveAffiliate(address indexed wallet); event AddDiscount(address indexed wallet, uint256 percent); event RemoveDiscount(address indexed wallet); event Pay(address indexed payee, uint256 amount); function getAllAffiliates() external view returns (address[] memory) { } function pay( address _caller, address _referrer, uint256 _basePrice ) internal { uint256 balanceBefore = address(this).balance - msg.value; uint256 price = getFinalPrice(_caller, _referrer, _basePrice); require(msg.value >= price, 'not enough ETH to pay'); // affiliate fee if applicable if (affiliates[_referrer].feePercent > 0) { uint256 referrerFee = (price * affiliates[_referrer].feePercent) / PERCENT_DENOMENATOR; (bool sent, ) = payable(_referrer).call{ value: referrerFee }(''); require(sent, 'affiliate payment did not go through'); affiliates[_referrer].revenue += price; price -= referrerFee; } // if affiliate does not take everything, send normal payment if (price > 0) { address wallet = paymentWallet == address(0) ? owner() : paymentWallet; (bool sent, ) = payable(wallet).call{ value: price }(''); require(sent, 'main payment did not go through'); } require(<FILL_ME>) emit Pay(msg.sender, _basePrice); } function getFinalPrice( address _caller, address _referrer, uint256 _basePrice ) public view returns (uint256) { } function overrideDiscount(address _wallet, uint256 _percent) external onlyAffiliateOrOwner { } function removeDiscount(address _wallet) external onlyAffiliateOrOwner { } function addAffiliate(address _wallet, uint256 _percent) public onlyOwner { } function addAffiliatesBulk( address[] memory _wallets, uint256[] memory _percents ) external onlyOwner { } function removeAffiliate(address _wallet) external onlyOwner { } function setDefaultAffiliateDiscount(uint16 _discount) external onlyOwner { } function setPaymentWallet(address _wallet) external onlyOwner { } }
address(this).balance>=balanceBefore,'cannot take from contract what you did not send'
13,466
address(this).balance>=balanceBefore
'affiliate must exist'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './OKLGWithdrawable.sol'; /** * @title OKLGAffiliate * @dev Support affiliate logic */ contract OKLGAffiliate is OKLGWithdrawable { modifier onlyAffiliateOrOwner() { } struct Affiliate { uint256 feePercent; uint256 revenue; } uint16 public defaultAffiliateDiscount = 1000; // 10% uint16 public constant PERCENT_DENOMENATOR = 10000; address public paymentWallet = 0x0000000000000000000000000000000000000000; mapping(address => Affiliate) public affiliates; // value is percentage of fees for affiliate (denomenator of 10000) address[] public affiliateList; mapping(address => uint256) public overrideDiscounts; // value is percentage off for customer (denomenator of 10000) event AddAffiliate(address indexed wallet, uint256 percent); event RemoveAffiliate(address indexed wallet); event AddDiscount(address indexed wallet, uint256 percent); event RemoveDiscount(address indexed wallet); event Pay(address indexed payee, uint256 amount); function getAllAffiliates() external view returns (address[] memory) { } function pay( address _caller, address _referrer, uint256 _basePrice ) internal { } function getFinalPrice( address _caller, address _referrer, uint256 _basePrice ) public view returns (uint256) { } function overrideDiscount(address _wallet, uint256 _percent) external onlyAffiliateOrOwner { } function removeDiscount(address _wallet) external onlyAffiliateOrOwner { require(<FILL_ME>) delete overrideDiscounts[_wallet]; emit RemoveDiscount(_wallet); } function addAffiliate(address _wallet, uint256 _percent) public onlyOwner { } function addAffiliatesBulk( address[] memory _wallets, uint256[] memory _percents ) external onlyOwner { } function removeAffiliate(address _wallet) external onlyOwner { } function setDefaultAffiliateDiscount(uint16 _discount) external onlyOwner { } function setPaymentWallet(address _wallet) external onlyOwner { } }
overrideDiscounts[_wallet]>0,'affiliate must exist'
13,466
overrideDiscounts[_wallet]>0
'affiliate must exist'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './OKLGWithdrawable.sol'; /** * @title OKLGAffiliate * @dev Support affiliate logic */ contract OKLGAffiliate is OKLGWithdrawable { modifier onlyAffiliateOrOwner() { } struct Affiliate { uint256 feePercent; uint256 revenue; } uint16 public defaultAffiliateDiscount = 1000; // 10% uint16 public constant PERCENT_DENOMENATOR = 10000; address public paymentWallet = 0x0000000000000000000000000000000000000000; mapping(address => Affiliate) public affiliates; // value is percentage of fees for affiliate (denomenator of 10000) address[] public affiliateList; mapping(address => uint256) public overrideDiscounts; // value is percentage off for customer (denomenator of 10000) event AddAffiliate(address indexed wallet, uint256 percent); event RemoveAffiliate(address indexed wallet); event AddDiscount(address indexed wallet, uint256 percent); event RemoveDiscount(address indexed wallet); event Pay(address indexed payee, uint256 amount); function getAllAffiliates() external view returns (address[] memory) { } function pay( address _caller, address _referrer, uint256 _basePrice ) internal { } function getFinalPrice( address _caller, address _referrer, uint256 _basePrice ) public view returns (uint256) { } function overrideDiscount(address _wallet, uint256 _percent) external onlyAffiliateOrOwner { } function removeDiscount(address _wallet) external onlyAffiliateOrOwner { } function addAffiliate(address _wallet, uint256 _percent) public onlyOwner { } function addAffiliatesBulk( address[] memory _wallets, uint256[] memory _percents ) external onlyOwner { } function removeAffiliate(address _wallet) external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < affiliateList.length; i++) { if (affiliateList[i] == _wallet) { affiliateList[i] = affiliateList[affiliateList.length - 1]; affiliateList.pop(); break; } } affiliates[_wallet].feePercent = 0; emit RemoveAffiliate(_wallet); } function setDefaultAffiliateDiscount(uint16 _discount) external onlyOwner { } function setPaymentWallet(address _wallet) external onlyOwner { } }
affiliates[_wallet].feePercent>0,'affiliate must exist'
13,466
affiliates[_wallet].feePercent>0
"You shall not pass"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; // the erc1155 base contract - the openzeppelin erc1155 import "../token/ERC1155.sol"; import "../royalties/ERC2981.sol"; import "../utils/AddressSet.sol"; import "../utils/UInt256Set.sol"; import "./ProxyRegistry.sol"; import "./ERC1155Owners.sol"; import "./ERC1155Owned.sol"; import "./ERC1155TotalBalance.sol"; import "./ERC1155CommonUri.sol"; import "../access/Controllable.sol"; import "../interfaces/IMultiToken.sol"; import "../interfaces/IERC1155Mint.sol"; import "../interfaces/IERC1155Burn.sol"; import "../interfaces/IERC1155Multinetwork.sol"; import "../interfaces/IERC1155Bridge.sol"; import "../service/Service.sol"; import "../utils/Strings.sol"; /** * @title MultiToken * @notice the multitoken contract. All tokens are printed on this contract. The token has all the capabilities * of an erc1155 contract, plus network transfer, royallty tracking and assignment and other features. */ contract MultiToken is ERC1155, ProxyRegistryManager, ERC1155Owners, ERC1155Owned, ERC1155TotalBalance, IERC1155Multinetwork, ERC1155CommonUri, IMultiToken, ERC2981, Service, Controllable { // to work with token holder and held token lists using AddressSet for AddressSet.Set; using UInt256Set for UInt256Set.Set; address internal masterMinter; function initialize(address registry) public initializer { } function setMasterController(address _masterMinter) public { } function addDirectMinter(address directMinter) public { } /// @notice only allow owner of the contract modifier onlyOwner() { require(<FILL_ME>) _; } /// @notice only allow owner of the contract modifier onlyMinter() { } /// @notice Mint a specified amount the specified token hash to the specified receiver /// @param recipient the address of the receiver /// @param tokenHash the token id to mint /// @param amount the amount to mint function mint( address recipient, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice mint tokens of specified amount to the specified address /// @param recipient the mint target /// @param tokenHash the token hash to mint /// @param amount the amount to mint function mintWithCommonUri( address recipient, uint256 tokenHash, uint256 amount, uint256 uriId ) external override onlyMinter { } function setCommonUri(uint256 uriId, string memory value) external override onlyMinter { } function setCommonUriOf(uint256 uriId, uint256 value) external override onlyMinter { } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 tokenHash) public view virtual override returns (string memory) { } function setUri(uint256 tokenHash, string memory value) external onlyMinter { } mapping(uint256 => string) internal uriOf; mapping(uint256 => address) internal uriOwners; function _setUri(uint256 tokenHash, string memory value) internal { } /// @notice burn a specified amount of the specified token hash from the specified target /// @param target the address of the target /// @param tokenHash the token id to burn /// @param amount the amount to burn function burn( address target, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice override base functionality to check proxy registries for approvers /// @param _owner the owner address /// @param _operator the operator address /// @return isOperator true if the owner is an approver for the operator function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } /// @notice See {IERC165-supportsInterface}. ERC165 implementor. identifies this contract as an ERC1155 /// @param interfaceId the interface id to check function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } /// @notice perform a network token transfer. Transfer the specified quantity of the specified token hash to the destination address on the destination network. function networkTransferFrom( address from, address to, uint256 network, uint256 id, uint256 amount, bytes calldata data ) external virtual override { } /// @notice override base functionality to process token transfers so as to populate token holders and held tokens lists /// @param operator the operator address /// @param from the address of the sender /// @param to the address of the receiver /// @param ids the token ids /// @param amounts the token amounts /// @param data the data function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } mapping(uint256 => string) internal symbolsOf; mapping(uint256 => string) internal namesOf; function symbolOf(uint256 _tokenId) external view override returns (string memory out) { } function nameOf(uint256 _tokenId) external view override returns (string memory out) { } function setSymbolOf(uint256 _tokenId, string memory _symbolOf) external onlyMinter { } function setNameOf(uint256 _tokenId, string memory _nameOf) external onlyMinter { } function setRoyalty(uint256 tokenId, address receiver, uint256 amount) external onlyOwner { } }
_isController(msg.sender),"You shall not pass"
13,555
_isController(msg.sender)
"You shall not pass"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; // the erc1155 base contract - the openzeppelin erc1155 import "../token/ERC1155.sol"; import "../royalties/ERC2981.sol"; import "../utils/AddressSet.sol"; import "../utils/UInt256Set.sol"; import "./ProxyRegistry.sol"; import "./ERC1155Owners.sol"; import "./ERC1155Owned.sol"; import "./ERC1155TotalBalance.sol"; import "./ERC1155CommonUri.sol"; import "../access/Controllable.sol"; import "../interfaces/IMultiToken.sol"; import "../interfaces/IERC1155Mint.sol"; import "../interfaces/IERC1155Burn.sol"; import "../interfaces/IERC1155Multinetwork.sol"; import "../interfaces/IERC1155Bridge.sol"; import "../service/Service.sol"; import "../utils/Strings.sol"; /** * @title MultiToken * @notice the multitoken contract. All tokens are printed on this contract. The token has all the capabilities * of an erc1155 contract, plus network transfer, royallty tracking and assignment and other features. */ contract MultiToken is ERC1155, ProxyRegistryManager, ERC1155Owners, ERC1155Owned, ERC1155TotalBalance, IERC1155Multinetwork, ERC1155CommonUri, IMultiToken, ERC2981, Service, Controllable { // to work with token holder and held token lists using AddressSet for AddressSet.Set; using UInt256Set for UInt256Set.Set; address internal masterMinter; function initialize(address registry) public initializer { } function setMasterController(address _masterMinter) public { } function addDirectMinter(address directMinter) public { } /// @notice only allow owner of the contract modifier onlyOwner() { } /// @notice only allow owner of the contract modifier onlyMinter() { require(<FILL_ME>) _; } /// @notice Mint a specified amount the specified token hash to the specified receiver /// @param recipient the address of the receiver /// @param tokenHash the token id to mint /// @param amount the amount to mint function mint( address recipient, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice mint tokens of specified amount to the specified address /// @param recipient the mint target /// @param tokenHash the token hash to mint /// @param amount the amount to mint function mintWithCommonUri( address recipient, uint256 tokenHash, uint256 amount, uint256 uriId ) external override onlyMinter { } function setCommonUri(uint256 uriId, string memory value) external override onlyMinter { } function setCommonUriOf(uint256 uriId, uint256 value) external override onlyMinter { } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 tokenHash) public view virtual override returns (string memory) { } function setUri(uint256 tokenHash, string memory value) external onlyMinter { } mapping(uint256 => string) internal uriOf; mapping(uint256 => address) internal uriOwners; function _setUri(uint256 tokenHash, string memory value) internal { } /// @notice burn a specified amount of the specified token hash from the specified target /// @param target the address of the target /// @param tokenHash the token id to burn /// @param amount the amount to burn function burn( address target, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice override base functionality to check proxy registries for approvers /// @param _owner the owner address /// @param _operator the operator address /// @return isOperator true if the owner is an approver for the operator function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } /// @notice See {IERC165-supportsInterface}. ERC165 implementor. identifies this contract as an ERC1155 /// @param interfaceId the interface id to check function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } /// @notice perform a network token transfer. Transfer the specified quantity of the specified token hash to the destination address on the destination network. function networkTransferFrom( address from, address to, uint256 network, uint256 id, uint256 amount, bytes calldata data ) external virtual override { } /// @notice override base functionality to process token transfers so as to populate token holders and held tokens lists /// @param operator the operator address /// @param from the address of the sender /// @param to the address of the receiver /// @param ids the token ids /// @param amounts the token amounts /// @param data the data function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } mapping(uint256 => string) internal symbolsOf; mapping(uint256 => string) internal namesOf; function symbolOf(uint256 _tokenId) external view override returns (string memory out) { } function nameOf(uint256 _tokenId) external view override returns (string memory out) { } function setSymbolOf(uint256 _tokenId, string memory _symbolOf) external onlyMinter { } function setNameOf(uint256 _tokenId, string memory _nameOf) external onlyMinter { } function setRoyalty(uint256 tokenId, address receiver, uint256 amount) external onlyOwner { } }
_isController(msg.sender)||masterMinter==msg.sender,"You shall not pass"
13,555
_isController(msg.sender)||masterMinter==msg.sender
"Only the owner can set the URI"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; // the erc1155 base contract - the openzeppelin erc1155 import "../token/ERC1155.sol"; import "../royalties/ERC2981.sol"; import "../utils/AddressSet.sol"; import "../utils/UInt256Set.sol"; import "./ProxyRegistry.sol"; import "./ERC1155Owners.sol"; import "./ERC1155Owned.sol"; import "./ERC1155TotalBalance.sol"; import "./ERC1155CommonUri.sol"; import "../access/Controllable.sol"; import "../interfaces/IMultiToken.sol"; import "../interfaces/IERC1155Mint.sol"; import "../interfaces/IERC1155Burn.sol"; import "../interfaces/IERC1155Multinetwork.sol"; import "../interfaces/IERC1155Bridge.sol"; import "../service/Service.sol"; import "../utils/Strings.sol"; /** * @title MultiToken * @notice the multitoken contract. All tokens are printed on this contract. The token has all the capabilities * of an erc1155 contract, plus network transfer, royallty tracking and assignment and other features. */ contract MultiToken is ERC1155, ProxyRegistryManager, ERC1155Owners, ERC1155Owned, ERC1155TotalBalance, IERC1155Multinetwork, ERC1155CommonUri, IMultiToken, ERC2981, Service, Controllable { // to work with token holder and held token lists using AddressSet for AddressSet.Set; using UInt256Set for UInt256Set.Set; address internal masterMinter; function initialize(address registry) public initializer { } function setMasterController(address _masterMinter) public { } function addDirectMinter(address directMinter) public { } /// @notice only allow owner of the contract modifier onlyOwner() { } /// @notice only allow owner of the contract modifier onlyMinter() { } /// @notice Mint a specified amount the specified token hash to the specified receiver /// @param recipient the address of the receiver /// @param tokenHash the token id to mint /// @param amount the amount to mint function mint( address recipient, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice mint tokens of specified amount to the specified address /// @param recipient the mint target /// @param tokenHash the token hash to mint /// @param amount the amount to mint function mintWithCommonUri( address recipient, uint256 tokenHash, uint256 amount, uint256 uriId ) external override onlyMinter { } function setCommonUri(uint256 uriId, string memory value) external override onlyMinter { require(<FILL_ME>) _setCommonUri(uriId, value); } function setCommonUriOf(uint256 uriId, uint256 value) external override onlyMinter { } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 tokenHash) public view virtual override returns (string memory) { } function setUri(uint256 tokenHash, string memory value) external onlyMinter { } mapping(uint256 => string) internal uriOf; mapping(uint256 => address) internal uriOwners; function _setUri(uint256 tokenHash, string memory value) internal { } /// @notice burn a specified amount of the specified token hash from the specified target /// @param target the address of the target /// @param tokenHash the token id to burn /// @param amount the amount to burn function burn( address target, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice override base functionality to check proxy registries for approvers /// @param _owner the owner address /// @param _operator the operator address /// @return isOperator true if the owner is an approver for the operator function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } /// @notice See {IERC165-supportsInterface}. ERC165 implementor. identifies this contract as an ERC1155 /// @param interfaceId the interface id to check function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } /// @notice perform a network token transfer. Transfer the specified quantity of the specified token hash to the destination address on the destination network. function networkTransferFrom( address from, address to, uint256 network, uint256 id, uint256 amount, bytes calldata data ) external virtual override { } /// @notice override base functionality to process token transfers so as to populate token holders and held tokens lists /// @param operator the operator address /// @param from the address of the sender /// @param to the address of the receiver /// @param ids the token ids /// @param amounts the token amounts /// @param data the data function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } mapping(uint256 => string) internal symbolsOf; mapping(uint256 => string) internal namesOf; function symbolOf(uint256 _tokenId) external view override returns (string memory out) { } function nameOf(uint256 _tokenId) external view override returns (string memory out) { } function setSymbolOf(uint256 _tokenId, string memory _symbolOf) external onlyMinter { } function setNameOf(uint256 _tokenId, string memory _nameOf) external onlyMinter { } function setRoyalty(uint256 tokenId, address receiver, uint256 amount) external onlyOwner { } }
commonURIOwners[uriId]==address(0)||commonURIOwners[uriId]==msg.sender||_isController(msg.sender),"Only the owner can set the URI"
13,555
commonURIOwners[uriId]==address(0)||commonURIOwners[uriId]==msg.sender||_isController(msg.sender)
"Only the owner can set the URI"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; // the erc1155 base contract - the openzeppelin erc1155 import "../token/ERC1155.sol"; import "../royalties/ERC2981.sol"; import "../utils/AddressSet.sol"; import "../utils/UInt256Set.sol"; import "./ProxyRegistry.sol"; import "./ERC1155Owners.sol"; import "./ERC1155Owned.sol"; import "./ERC1155TotalBalance.sol"; import "./ERC1155CommonUri.sol"; import "../access/Controllable.sol"; import "../interfaces/IMultiToken.sol"; import "../interfaces/IERC1155Mint.sol"; import "../interfaces/IERC1155Burn.sol"; import "../interfaces/IERC1155Multinetwork.sol"; import "../interfaces/IERC1155Bridge.sol"; import "../service/Service.sol"; import "../utils/Strings.sol"; /** * @title MultiToken * @notice the multitoken contract. All tokens are printed on this contract. The token has all the capabilities * of an erc1155 contract, plus network transfer, royallty tracking and assignment and other features. */ contract MultiToken is ERC1155, ProxyRegistryManager, ERC1155Owners, ERC1155Owned, ERC1155TotalBalance, IERC1155Multinetwork, ERC1155CommonUri, IMultiToken, ERC2981, Service, Controllable { // to work with token holder and held token lists using AddressSet for AddressSet.Set; using UInt256Set for UInt256Set.Set; address internal masterMinter; function initialize(address registry) public initializer { } function setMasterController(address _masterMinter) public { } function addDirectMinter(address directMinter) public { } /// @notice only allow owner of the contract modifier onlyOwner() { } /// @notice only allow owner of the contract modifier onlyMinter() { } /// @notice Mint a specified amount the specified token hash to the specified receiver /// @param recipient the address of the receiver /// @param tokenHash the token id to mint /// @param amount the amount to mint function mint( address recipient, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice mint tokens of specified amount to the specified address /// @param recipient the mint target /// @param tokenHash the token hash to mint /// @param amount the amount to mint function mintWithCommonUri( address recipient, uint256 tokenHash, uint256 amount, uint256 uriId ) external override onlyMinter { } function setCommonUri(uint256 uriId, string memory value) external override onlyMinter { } function setCommonUriOf(uint256 uriId, uint256 value) external override onlyMinter { } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 tokenHash) public view virtual override returns (string memory) { } function setUri(uint256 tokenHash, string memory value) external onlyMinter { require(<FILL_ME>) _setUri(tokenHash, value); } mapping(uint256 => string) internal uriOf; mapping(uint256 => address) internal uriOwners; function _setUri(uint256 tokenHash, string memory value) internal { } /// @notice burn a specified amount of the specified token hash from the specified target /// @param target the address of the target /// @param tokenHash the token id to burn /// @param amount the amount to burn function burn( address target, uint256 tokenHash, uint256 amount ) external override onlyMinter { } /// @notice override base functionality to check proxy registries for approvers /// @param _owner the owner address /// @param _operator the operator address /// @return isOperator true if the owner is an approver for the operator function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } /// @notice See {IERC165-supportsInterface}. ERC165 implementor. identifies this contract as an ERC1155 /// @param interfaceId the interface id to check function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } /// @notice perform a network token transfer. Transfer the specified quantity of the specified token hash to the destination address on the destination network. function networkTransferFrom( address from, address to, uint256 network, uint256 id, uint256 amount, bytes calldata data ) external virtual override { } /// @notice override base functionality to process token transfers so as to populate token holders and held tokens lists /// @param operator the operator address /// @param from the address of the sender /// @param to the address of the receiver /// @param ids the token ids /// @param amounts the token amounts /// @param data the data function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } mapping(uint256 => string) internal symbolsOf; mapping(uint256 => string) internal namesOf; function symbolOf(uint256 _tokenId) external view override returns (string memory out) { } function nameOf(uint256 _tokenId) external view override returns (string memory out) { } function setSymbolOf(uint256 _tokenId, string memory _symbolOf) external onlyMinter { } function setNameOf(uint256 _tokenId, string memory _nameOf) external onlyMinter { } function setRoyalty(uint256 tokenId, address receiver, uint256 amount) external onlyOwner { } }
uriOwners[tokenHash]==address(0)||uriOwners[tokenHash]==msg.sender||_isController(msg.sender),"Only the owner can set the URI"
13,555
uriOwners[tokenHash]==address(0)||uriOwners[tokenHash]==msg.sender||_isController(msg.sender)
"Roles: caller does not have the OPERATOR role"
pragma solidity ^0.6.0; contract Roles is AccessControl { bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR"); constructor () public { } modifier onlyOperator() { require(<FILL_ME>) _; } }
hasRole(OPERATOR_ROLE,_msgSender()),"Roles: caller does not have the OPERATOR role"
13,586
hasRole(OPERATOR_ROLE,_msgSender())
"Clipper/not-authorized"
// SPDX-License-Identifier: AGPL-3.0-or-later /// clip.sol -- Dai auction module 2.0 // Copyright (C) 2020-2021 Maker Ecosystem Growth Holdings, INC. // // 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 3 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. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity >=0.6.12; interface VatLike { function move(address,address,uint256) external; function flux(bytes32,address,address,uint256) external; function ilks(bytes32) external returns (uint256, uint256, uint256, uint256, uint256); function suck(address,address,uint256) external; } interface PipLike { function peek() external returns (bytes32, bool); } interface SpotterLike { function par() external returns (uint256); function ilks(bytes32) external returns (PipLike, uint256); } interface DogLike { function chop(bytes32) external returns (uint256); function digs(bytes32, uint256) external; } interface ClipperCallee { function clipperCall(address, uint256, uint256, bytes calldata) external; } interface AbacusLike { function price(uint256, uint256) external view returns (uint256); } contract Clipper { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external auth { } function deny(address usr) external auth { } modifier auth { require(<FILL_ME>) _; } // --- Data --- bytes32 immutable public ilk; // Collateral type of this Clipper VatLike immutable public vat; // Core CDP Engine DogLike public dog; // Liquidation module address public vow; // Recipient of dai raised in auctions SpotterLike public spotter; // Collateral price module AbacusLike public calc; // Current price calculator uint256 public buf; // Multiplicative factor to increase starting price [ray] uint256 public tail; // Time elapsed before auction reset [seconds] uint256 public cusp; // Percentage drop before auction reset [ray] uint64 public chip; // Percentage of tab to suck from vow to incentivize keepers [wad] uint192 public tip; // Flat fee to suck from vow to incentivize keepers [rad] uint256 public chost; // Cache the ilk dust times the ilk chop to prevent excessive SLOADs [rad] uint256 public kicks; // Total auctions uint256[] public active; // Array of active auction ids struct Sale { uint256 pos; // Index in active array uint256 tab; // Dai to raise [rad] uint256 lot; // collateral to sell [wad] address usr; // Liquidated CDP uint96 tic; // Auction start time uint256 top; // Starting price [ray] } mapping(uint256 => Sale) public sales; uint256 internal locked; // Levels for circuit breaker // 0: no breaker // 1: no new kick() // 2: no new kick() or redo() // 3: no new kick(), redo(), or take() uint256 public stopped = 0; // --- Events --- event Rely(address indexed usr); event Deny(address indexed usr); event File(bytes32 indexed what, uint256 data); event File(bytes32 indexed what, address data); event Kick( uint256 indexed id, uint256 top, uint256 tab, uint256 lot, address indexed usr, address indexed kpr, uint256 coin ); event Take( uint256 indexed id, uint256 max, uint256 price, uint256 owe, uint256 tab, uint256 lot, address indexed usr ); event Redo( uint256 indexed id, uint256 top, uint256 tab, uint256 lot, address indexed usr, address indexed kpr, uint256 coin ); event Yank(uint256 id); // --- Init --- constructor(address vat_, address spotter_, address dog_, bytes32 ilk_) public { } // --- Synchronization --- modifier lock { } modifier isStopped(uint256 level) { } // --- Administration --- function file(bytes32 what, uint256 data) external auth lock { } function file(bytes32 what, address data) external auth lock { } // --- Math --- uint256 constant BLN = 10 ** 9; uint256 constant WAD = 10 ** 18; uint256 constant RAY = 10 ** 27; function min(uint256 x, uint256 y) internal pure returns (uint256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Auction --- // get the price directly from the OSM // Could get this from rmul(Vat.ilks(ilk).spot, Spotter.mat()) instead, but // if mat has changed since the last poke, the resulting value will be // incorrect. function getFeedPrice() internal returns (uint256 feedPrice) { } // start an auction // note: trusts the caller to transfer collateral to the contract // The starting price `top` is obtained as follows: // // top = val * buf / par // // Where `val` is the collateral's unitary value in USD, `buf` is a // multiplicative factor to increase the starting price, and `par` is a // reference per DAI. function kick( uint256 tab, // Debt [rad] uint256 lot, // Collateral [wad] address usr, // Address that will receive any leftover collateral address kpr // Address that will receive incentives ) external auth lock isStopped(1) returns (uint256 id) { } // Reset an auction // See `kick` above for an explanation of the computation of `top`. function redo( uint256 id, // id of the auction to reset address kpr // Address that will receive incentives ) external lock isStopped(2) { } // Buy up to `amt` of collateral from the auction indexed by `id`. // // Auctions will not collect more DAI than their assigned DAI target,`tab`; // thus, if `amt` would cost more DAI than `tab` at the current price, the // amount of collateral purchased will instead be just enough to collect `tab` DAI. // // To avoid partial purchases resulting in very small leftover auctions that will // never be cleared, any partial purchase must leave at least `Clipper.chost` // remaining DAI target. `chost` is an asynchronously updated value equal to // (Vat.dust * Dog.chop(ilk) / WAD) where the values are understood to be determined // by whatever they were when Clipper.upchost() was last called. Purchase amounts // will be minimally decreased when necessary to respect this limit; i.e., if the // specified `amt` would leave `tab < chost` but `tab > 0`, the amount actually // purchased will be such that `tab == chost`. // // If `tab <= chost`, partial purchases are no longer possible; that is, the remaining // collateral can only be purchased entirely, or not at all. function take( uint256 id, // Auction id uint256 amt, // Upper limit on amount of collateral to buy [wad] uint256 max, // Maximum acceptable price (DAI / collateral) [ray] address who, // Receiver of collateral and external call address bytes calldata data // Data to pass in external call; if length 0, no call is done ) external lock isStopped(3) { } function _remove(uint256 id) internal { } // The number of active auctions function count() external view returns (uint256) { } // Return the entire array of active auctions function list() external view returns (uint256[] memory) { } // Externally returns boolean for if an auction needs a redo and also the current price function getStatus(uint256 id) external view returns (bool needsRedo, uint256 price, uint256 lot, uint256 tab) { } // Internally returns boolean for if an auction needs a redo function status(uint96 tic, uint256 top) internal view returns (bool done, uint256 price) { } // Public function to update the cached dust*chop value. function upchost() external { } // Cancel an auction during ES or via governance action. function yank(uint256 id) external auth lock { } }
wards[msg.sender]==1,"Clipper/not-authorized"
13,615
wards[msg.sender]==1
"Clipper/not-running-auction"
// SPDX-License-Identifier: AGPL-3.0-or-later /// clip.sol -- Dai auction module 2.0 // Copyright (C) 2020-2021 Maker Ecosystem Growth Holdings, INC. // // 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 3 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. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity >=0.6.12; interface VatLike { function move(address,address,uint256) external; function flux(bytes32,address,address,uint256) external; function ilks(bytes32) external returns (uint256, uint256, uint256, uint256, uint256); function suck(address,address,uint256) external; } interface PipLike { function peek() external returns (bytes32, bool); } interface SpotterLike { function par() external returns (uint256); function ilks(bytes32) external returns (PipLike, uint256); } interface DogLike { function chop(bytes32) external returns (uint256); function digs(bytes32, uint256) external; } interface ClipperCallee { function clipperCall(address, uint256, uint256, bytes calldata) external; } interface AbacusLike { function price(uint256, uint256) external view returns (uint256); } contract Clipper { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external auth { } function deny(address usr) external auth { } modifier auth { } // --- Data --- bytes32 immutable public ilk; // Collateral type of this Clipper VatLike immutable public vat; // Core CDP Engine DogLike public dog; // Liquidation module address public vow; // Recipient of dai raised in auctions SpotterLike public spotter; // Collateral price module AbacusLike public calc; // Current price calculator uint256 public buf; // Multiplicative factor to increase starting price [ray] uint256 public tail; // Time elapsed before auction reset [seconds] uint256 public cusp; // Percentage drop before auction reset [ray] uint64 public chip; // Percentage of tab to suck from vow to incentivize keepers [wad] uint192 public tip; // Flat fee to suck from vow to incentivize keepers [rad] uint256 public chost; // Cache the ilk dust times the ilk chop to prevent excessive SLOADs [rad] uint256 public kicks; // Total auctions uint256[] public active; // Array of active auction ids struct Sale { uint256 pos; // Index in active array uint256 tab; // Dai to raise [rad] uint256 lot; // collateral to sell [wad] address usr; // Liquidated CDP uint96 tic; // Auction start time uint256 top; // Starting price [ray] } mapping(uint256 => Sale) public sales; uint256 internal locked; // Levels for circuit breaker // 0: no breaker // 1: no new kick() // 2: no new kick() or redo() // 3: no new kick(), redo(), or take() uint256 public stopped = 0; // --- Events --- event Rely(address indexed usr); event Deny(address indexed usr); event File(bytes32 indexed what, uint256 data); event File(bytes32 indexed what, address data); event Kick( uint256 indexed id, uint256 top, uint256 tab, uint256 lot, address indexed usr, address indexed kpr, uint256 coin ); event Take( uint256 indexed id, uint256 max, uint256 price, uint256 owe, uint256 tab, uint256 lot, address indexed usr ); event Redo( uint256 indexed id, uint256 top, uint256 tab, uint256 lot, address indexed usr, address indexed kpr, uint256 coin ); event Yank(uint256 id); // --- Init --- constructor(address vat_, address spotter_, address dog_, bytes32 ilk_) public { } // --- Synchronization --- modifier lock { } modifier isStopped(uint256 level) { } // --- Administration --- function file(bytes32 what, uint256 data) external auth lock { } function file(bytes32 what, address data) external auth lock { } // --- Math --- uint256 constant BLN = 10 ** 9; uint256 constant WAD = 10 ** 18; uint256 constant RAY = 10 ** 27; function min(uint256 x, uint256 y) internal pure returns (uint256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { } function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Auction --- // get the price directly from the OSM // Could get this from rmul(Vat.ilks(ilk).spot, Spotter.mat()) instead, but // if mat has changed since the last poke, the resulting value will be // incorrect. function getFeedPrice() internal returns (uint256 feedPrice) { } // start an auction // note: trusts the caller to transfer collateral to the contract // The starting price `top` is obtained as follows: // // top = val * buf / par // // Where `val` is the collateral's unitary value in USD, `buf` is a // multiplicative factor to increase the starting price, and `par` is a // reference per DAI. function kick( uint256 tab, // Debt [rad] uint256 lot, // Collateral [wad] address usr, // Address that will receive any leftover collateral address kpr // Address that will receive incentives ) external auth lock isStopped(1) returns (uint256 id) { } // Reset an auction // See `kick` above for an explanation of the computation of `top`. function redo( uint256 id, // id of the auction to reset address kpr // Address that will receive incentives ) external lock isStopped(2) { } // Buy up to `amt` of collateral from the auction indexed by `id`. // // Auctions will not collect more DAI than their assigned DAI target,`tab`; // thus, if `amt` would cost more DAI than `tab` at the current price, the // amount of collateral purchased will instead be just enough to collect `tab` DAI. // // To avoid partial purchases resulting in very small leftover auctions that will // never be cleared, any partial purchase must leave at least `Clipper.chost` // remaining DAI target. `chost` is an asynchronously updated value equal to // (Vat.dust * Dog.chop(ilk) / WAD) where the values are understood to be determined // by whatever they were when Clipper.upchost() was last called. Purchase amounts // will be minimally decreased when necessary to respect this limit; i.e., if the // specified `amt` would leave `tab < chost` but `tab > 0`, the amount actually // purchased will be such that `tab == chost`. // // If `tab <= chost`, partial purchases are no longer possible; that is, the remaining // collateral can only be purchased entirely, or not at all. function take( uint256 id, // Auction id uint256 amt, // Upper limit on amount of collateral to buy [wad] uint256 max, // Maximum acceptable price (DAI / collateral) [ray] address who, // Receiver of collateral and external call address bytes calldata data // Data to pass in external call; if length 0, no call is done ) external lock isStopped(3) { } function _remove(uint256 id) internal { } // The number of active auctions function count() external view returns (uint256) { } // Return the entire array of active auctions function list() external view returns (uint256[] memory) { } // Externally returns boolean for if an auction needs a redo and also the current price function getStatus(uint256 id) external view returns (bool needsRedo, uint256 price, uint256 lot, uint256 tab) { } // Internally returns boolean for if an auction needs a redo function status(uint96 tic, uint256 top) internal view returns (bool done, uint256 price) { } // Public function to update the cached dust*chop value. function upchost() external { } // Cancel an auction during ES or via governance action. function yank(uint256 id) external auth lock { require(<FILL_ME>) dog.digs(ilk, sales[id].tab); vat.flux(ilk, address(this), msg.sender, sales[id].lot); _remove(id); emit Yank(id); } }
sales[id].usr!=address(0),"Clipper/not-running-auction"
13,615
sales[id].usr!=address(0)
"Initializable: Contract instance has already been initialized"
pragma solidity 0.5.12; /** * @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() { require(<FILL_ME>) bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } function isInitialized() public view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
initializing||isConstructor()||!initialized,"Initializable: Contract instance has already been initialized"
13,651
initializing||isConstructor()||!initialized
"SygnumToken: Account must not be frozen."
/** * @title SygnumToken * @author Connor Howe <[email protected]> * @notice ERC20 token with additional features. */ pragma solidity 0.5.12; contract SygnumToken is ERC20Snapshot, ERC20SygnumDetailed, ERC20Pausable, ERC20Mintable, ERC20Whitelist, ERC20Tradeable, ERC20Blockable, ERC20Burnable, ERC20Freezable, ERC20Destroyable { event Minted(address indexed minter, address indexed account, uint256 value); event Burned(address indexed burner, uint256 value); event BurnedFor(address indexed burner, address indexed account, uint256 value); event Confiscated(address indexed account, uint256 amount, address indexed receiver); uint16 constant BATCH_LIMIT = 256; /** * @dev Initialize contracts. * @param _baseOperators Base operators contract address. * @param _whitelist Whitelist contract address. * @param _traderOperators Trader operators contract address. * @param _blockerOperators Blocker operators contract address. */ function initializeContractsAndConstructor(string memory _name, string memory _symbol, uint8 _decimals, bytes4 _category, string memory _class, address _issuer, address _baseOperators, address _whitelist, address _traderOperators, address _blockerOperators) public initializer { } /** * @dev Burn. * @param _amount Amount of tokens to burn. */ function burn(uint256 _amount) public { require(<FILL_ME>) super._burn(msg.sender, _amount); emit Burned(msg.sender, _amount); } /** * @dev BurnFor. * @param _amount Amount of tokens to burn. */ function burnFor(address _account, uint256 _amount) public { } /** * @dev BurnFrom. * @param _amount Amount of tokens to burn. */ function burnFrom(address _account, uint256 _amount) public { } /** * @dev Mint. * @param _account Address to mint tokens to. * @param _amount Amount to mint. */ function mint(address _account, uint256 _amount) public { } /** * @dev Confiscate. * @param _confiscatee Account to confiscate funds from. * @param _receiver Account to transfer confiscated funds too. * @param _amount Amount of tokens to burn. */ function confiscate(address _confiscatee, address _receiver, uint256 _amount) public onlyOperator whenNotPaused whenWhitelisted(_receiver) whenWhitelisted(_confiscatee) { } /** * @dev Batch burn for. * @param _amounts Array of all values to burn. * @param _accounts Array of all addresses to burn from. */ function batchBurnFor(address[] memory _accounts, uint256[] memory _amounts) public { } /** * @dev Batch mint. * @param _accounts Array of all addresses to mint to. * @param _amounts Array of all values to mint. */ function batchMint(address[] memory _accounts, uint256[] memory _amounts) public{ } /** * @dev Batch confiscate to a maximum of 256 addresses. * @param _confiscatees array addresses who's funds are being confiscated * @param _receivers array addresses who's receiving the funds * @param _values array of values of funds being confiscated */ function batchConfiscate(address[] memory _confiscatees, address[] memory _receivers, uint256[] memory _values) public returns (bool) { } }
!isFrozen(msg.sender),"SygnumToken: Account must not be frozen."
13,671
!isFrozen(msg.sender)
"SygnumToken: Account must not be frozen if system calling."
/** * @title SygnumToken * @author Connor Howe <[email protected]> * @notice ERC20 token with additional features. */ pragma solidity 0.5.12; contract SygnumToken is ERC20Snapshot, ERC20SygnumDetailed, ERC20Pausable, ERC20Mintable, ERC20Whitelist, ERC20Tradeable, ERC20Blockable, ERC20Burnable, ERC20Freezable, ERC20Destroyable { event Minted(address indexed minter, address indexed account, uint256 value); event Burned(address indexed burner, uint256 value); event BurnedFor(address indexed burner, address indexed account, uint256 value); event Confiscated(address indexed account, uint256 amount, address indexed receiver); uint16 constant BATCH_LIMIT = 256; /** * @dev Initialize contracts. * @param _baseOperators Base operators contract address. * @param _whitelist Whitelist contract address. * @param _traderOperators Trader operators contract address. * @param _blockerOperators Blocker operators contract address. */ function initializeContractsAndConstructor(string memory _name, string memory _symbol, uint8 _decimals, bytes4 _category, string memory _class, address _issuer, address _baseOperators, address _whitelist, address _traderOperators, address _blockerOperators) public initializer { } /** * @dev Burn. * @param _amount Amount of tokens to burn. */ function burn(uint256 _amount) public { } /** * @dev BurnFor. * @param _amount Amount of tokens to burn. */ function burnFor(address _account, uint256 _amount) public { } /** * @dev BurnFrom. * @param _amount Amount of tokens to burn. */ function burnFrom(address _account, uint256 _amount) public { } /** * @dev Mint. * @param _account Address to mint tokens to. * @param _amount Amount to mint. */ function mint(address _account, uint256 _amount) public { if(isSystem(msg.sender)){ require(<FILL_ME>) } super._mint(_account, _amount); emit Minted(msg.sender, _account, _amount); } /** * @dev Confiscate. * @param _confiscatee Account to confiscate funds from. * @param _receiver Account to transfer confiscated funds too. * @param _amount Amount of tokens to burn. */ function confiscate(address _confiscatee, address _receiver, uint256 _amount) public onlyOperator whenNotPaused whenWhitelisted(_receiver) whenWhitelisted(_confiscatee) { } /** * @dev Batch burn for. * @param _amounts Array of all values to burn. * @param _accounts Array of all addresses to burn from. */ function batchBurnFor(address[] memory _accounts, uint256[] memory _amounts) public { } /** * @dev Batch mint. * @param _accounts Array of all addresses to mint to. * @param _amounts Array of all values to mint. */ function batchMint(address[] memory _accounts, uint256[] memory _amounts) public{ } /** * @dev Batch confiscate to a maximum of 256 addresses. * @param _confiscatees array addresses who's funds are being confiscated * @param _receivers array addresses who's receiving the funds * @param _values array of values of funds being confiscated */ function batchConfiscate(address[] memory _confiscatees, address[] memory _receivers, uint256[] memory _values) public returns (bool) { } }
!isFrozen(_account),"SygnumToken: Account must not be frozen if system calling."
13,671
!isFrozen(_account)
"Phase2Pool::recoverERC20: You must possess the recover role to recover erc20"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "synthetix/contracts/interfaces/IStakingRewards.sol"; import "./RewardDistributionRecipient.sol"; /** @title Phase 2 BANK Reward Pool for Float Protocol @notice This contract is used to reward `rewardToken` when `stakeToken` is staked. */ contract Phase2Pool is IStakingRewards, Context, AccessControl, RewardDistributionRecipient, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== CONSTANTS ========== */ uint256 public constant DURATION = 7 days; bytes32 public constant RECOVER_ROLE = keccak256("RECOVER_ROLE"); /* ========== STATE VARIABLES ========== */ IERC20 public rewardToken; IERC20 public stakeToken; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; uint256 private _totalSupply; mapping(address => uint256) private _balances; /* ========== CONSTRUCTOR ========== */ /** @notice Construct a new Phase2Pool @param _admin The default role controller for @param _rewardDistribution The reward distributor (can change reward rate) @param _rewardToken The reward token to distribute @param _stakingToken The staking token used to qualify for rewards */ constructor( address _admin, address _rewardDistribution, address _rewardToken, address _stakingToken ) RewardDistributionRecipient(_admin) { } /* ========== EVENTS ========== */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event Recovered(address token, uint256 amount); /* ========== MODIFIERS ========== */ modifier updateReward(address account) { } /* ========== VIEWS ========== */ function totalSupply() public override(IStakingRewards) view returns (uint256) { } function balanceOf(address account) public override(IStakingRewards) view returns (uint256) { } function lastTimeRewardApplicable() public override(IStakingRewards) view returns (uint256) { } function rewardPerToken() public override(IStakingRewards) view returns (uint256) { } function earned(address account) public override(IStakingRewards) view returns (uint256) { } function getRewardForDuration() external override(IStakingRewards) view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 amount) public virtual override(IStakingRewards) updateReward(msg.sender) { } function withdraw(uint256 amount) public override(IStakingRewards) updateReward(msg.sender) { } function exit() external override(IStakingRewards) { } function getReward() public virtual override(IStakingRewards) updateReward(msg.sender) { } /* ========== RESTRICTED FUNCTIONS ========== */ /* ----- Reward Distributor ----- */ /** @notice Should be called after the amount of reward tokens has been sent to the contract. Reward should be divisible by duration. @param reward number of tokens to be distributed over the duration. */ function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) { } /* ----- RECOVER_ROLE ----- */ /** @notice Provide accidental token retrieval. @dev Sourced from synthetix/contracts/StakingRewards.sol */ function recoverERC20(address tokenAddress, uint256 tokenAmount) external { require(<FILL_ME>) require( tokenAddress != address(stakeToken), "Phase2Pool::recoverERC20: Cannot recover the staking token" ); require( tokenAddress != address(rewardToken), "Phase2Pool::recoverERC20: Cannot recover the reward token" ); IERC20(tokenAddress).safeTransfer(_msgSender(), tokenAmount); emit Recovered(tokenAddress, tokenAmount); } }
hasRole(RECOVER_ROLE,_msgSender()),"Phase2Pool::recoverERC20: You must possess the recover role to recover erc20"
13,826
hasRole(RECOVER_ROLE,_msgSender())
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { require(<FILL_ME>) _; } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
!landManagement.paused()
13,830
!landManagement.paused()
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { require(<FILL_ME>) _; } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
landManagement.paused()
13,830
landManagement.paused()
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { require(<FILL_ME>) _; } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
landManagement.ethLandSaleOpen()
13,830
landManagement.ethLandSaleOpen()
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { require(<FILL_ME>) _; } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
landManagement.isUnicornContract(msg.sender)
13,830
landManagement.isUnicornContract(msg.sender)
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { require(<FILL_ME>) _; } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
landManagement.presaleOpen()
13,830
landManagement.presaleOpen()
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender].sub(planted[msg.sender])); require(<FILL_ME>) // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
balances[_to].add(_value)<=userRank.getUserLandLimit(_to)
13,830
balances[_to].add(_value)<=userRank.getUserLandLimit(_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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { require(<FILL_ME>) require(balances[_to].add(_amount) <= userRank.getUserLandLimit(_to)); totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
totalSupply_.add(_amount)<=MAX_SUPPLY
13,830
totalSupply_.add(_amount)<=MAX_SUPPLY
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { require(totalSupply_.add(_amount) <= MAX_SUPPLY); require(<FILL_ME>) totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
balances[_to].add(_amount)<=userRank.getUserLandLimit(_to)
13,830
balances[_to].add(_amount)<=userRank.getUserLandLimit(_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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { require(_count <= balances[_owner].sub(planted[_owner]) && _count > 0); //require(candyToken.transferFrom(msg.sender, this, _count.mul(priceRate))); if (_gardenerId > 0) { require(<FILL_ME>) require(candyToken.transferFrom(_owner, this, gardeners[_gardenerId].price.mul(_count))); } gardens[++gardenId] = Garden({ count: _count, startTime: now, owner: _owner, gardenerId: _gardenerId, lastCropTime: now, plantationIndex: plantationSize, ownerPlantationIndex: ownerPlantationSize[_owner] }); planted[_owner] = planted[_owner].add(_count); //update global plantation list plantation[plantationSize++] = gardenId; //update user plantation list ownerPlantation[_owner][ownerPlantationSize[_owner]++] = gardenId; emit MakePlant(_owner, gardenId, _count, gardenerId); } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
gardeners[_gardenerId].exists
13,830
gardeners[_gardenerId].exists
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { require(_count <= balances[_owner].sub(planted[_owner]) && _count > 0); //require(candyToken.transferFrom(msg.sender, this, _count.mul(priceRate))); if (_gardenerId > 0) { require(gardeners[_gardenerId].exists); require(<FILL_ME>) } gardens[++gardenId] = Garden({ count: _count, startTime: now, owner: _owner, gardenerId: _gardenerId, lastCropTime: now, plantationIndex: plantationSize, ownerPlantationIndex: ownerPlantationSize[_owner] }); planted[_owner] = planted[_owner].add(_count); //update global plantation list plantation[plantationSize++] = gardenId; //update user plantation list ownerPlantation[_owner][ownerPlantationSize[_owner]++] = gardenId; emit MakePlant(_owner, gardenId, _count, gardenerId); } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { } }
candyToken.transferFrom(_owner,this,gardeners[_gardenerId].price.mul(_count))
13,830
candyToken.transferFrom(_owner,this,gardeners[_gardenerId].price.mul(_count))
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { //require(_token == landManagement.candyToken()); require(msg.sender == address(candyToken)); require(<FILL_ME>) require(address(this).call(_extraData)); emit ReceiveApproval(_from, _value, _token); } function withdrawTokens() onlyManager public { } }
allowedFuncs[bytesToBytes4(_extraData)]
13,830
allowedFuncs[bytesToBytes4(_extraData)]
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { //require(_token == landManagement.candyToken()); require(msg.sender == address(candyToken)); require(allowedFuncs[bytesToBytes4(_extraData)]); require(<FILL_ME>) emit ReceiveApproval(_from, _value, _token); } function withdrawTokens() onlyManager public { } }
address(this).call(_extraData)
13,830
address(this).call(_extraData)
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 Subtracts 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 ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } interface UserRankInterface { function buyNextRank() external; function buyRank(uint _index) external; function getIndividualPrice(address _user, uint _index) external view returns (uint); function getRankPriceEth(uint _index) external view returns (uint); function getRankPriceCandy(uint _index) external view returns (uint); function getRankLandLimit(uint _index) external view returns (uint); function getRankTitle(uint _index) external view returns (string); function getUserRank(address _user) external view returns (uint); function getUserLandLimit(address _user) external view returns (uint); function ranksCount() external view returns (uint); function getNextRank(address _user) external returns (uint); function getPreSaleRank(address owner, uint _index) external; function getRank(address owner, uint _index) external; } contract MegaCandyInterface is ERC20 { function transferFromSystem(address _from, address _to, uint256 _value) public returns (bool); function burn(address _from, uint256 _value) public returns (bool); function mint(address _to, uint256 _amount) public returns (bool); } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { } modifier onlyOwner() { } modifier onlyManager() { } modifier onlyCommunity() { } modifier whenNotPaused() { } modifier whenPaused { } modifier onlyWhileEthSaleOpen { } modifier onlyLandManagement() { } modifier onlyUnicornContract() { } modifier onlyCandyLand() { } modifier whilePresaleOpen() { } function isGamePaused() external view returns (bool) { } } contract CanReceiveApproval { event ReceiveApproval(address from, uint256 value, address token); mapping (bytes4 => bool) allowedFuncs; modifier onlyPayloadSize(uint numwords) { } modifier onlySelf(){ } function bytesToBytes4(bytes b) internal pure returns (bytes4 out) { } } contract CandyLand is ERC20, LandAccessControl, CanReceiveApproval { using SafeMath for uint256; UserRankInterface public userRank; MegaCandyInterface public megaCandy; ERC20 public candyToken; struct Gardener { uint period; uint price; bool exists; } struct Garden { uint count; uint startTime; address owner; uint gardenerId; uint lastCropTime; uint plantationIndex; uint ownerPlantationIndex; } string public constant name = "Unicorn Land"; string public constant symbol = "Land"; uint8 public constant decimals = 0; uint256 totalSupply_; uint256 public MAX_SUPPLY = 30000; uint public constant plantedTime = 1 hours; uint public constant plantedRate = 1 ether; //uint public constant priceRate = 1 ether; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) internal allowed; mapping(address => uint256) planted; mapping(uint => Gardener) public gardeners; // Mapping from garden ID to Garde struct mapping(uint => Garden) public gardens; // garden index => gardenId mapping(uint => uint) public plantation; uint public plantationSize = 0; //user plantations // owner => array (index => gardenId) mapping(address => mapping(uint => uint)) public ownerPlantation; mapping(address => uint) public ownerPlantationSize; uint gardenerId = 0; uint gardenId = 0; event Mint(address indexed to, uint256 amount); event MakePlant(address indexed owner, uint gardenId, uint count, uint gardenerId); event GetCrop(address indexed owner, uint gardenId, uint megaCandyCount); event NewGardenerAdded(uint gardenerId, uint _period, uint _price); event GardenerChange(uint gardenerId, uint _period, uint _price); event NewLandLimit(uint newLimit); event TokensTransferred(address wallet, uint value); function CandyLand(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external { } function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function plantedOf(address _owner) public view returns (uint256 balance) { } function freeLandsOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { } function mint(address _to, uint256 _amount) onlyUnicornContract public returns (bool) { } function makePlant(uint _count, uint _gardenerId) public { } function _receiveMakePlant(address _beneficiary, uint _count, uint _gardenerId) onlySelf onlyPayloadSize(3) public { } function _makePlant(address _owner, uint _count, uint _gardenerId) internal { } function getCrop(uint _gardenId) public { } function addGardener(uint _period, uint _price) onlyOwner public { } function editGardener(uint _gardenerId, uint _period, uint _price) onlyOwner public { } function getUserLandLimit(address _user) public view returns(uint) { } function setLandLimit() external onlyCommunity { } //1% - 100, 10% - 1000 50% - 5000 function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) { } function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public { } function withdrawTokens() onlyManager public { require(<FILL_ME>) candyToken.transfer(landManagement.walletAddress(), candyToken.balanceOf(this)); emit TokensTransferred(landManagement.walletAddress(), candyToken.balanceOf(this)); } }
candyToken.balanceOf(this)>0
13,830
candyToken.balanceOf(this)>0
null
pragma solidity 0.5.7; // S E B A - For the New Economy // // https://www.seba.swiss/ // 0.05 // 0.10 // 0.25 // 0.50 // 1 // 2 // 4 // 8 // 16 // 32 /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ contract SEBA { // Track how many tokens are owned by each address. mapping (address => uint256) public balanceOf; // string public name = "SEBA"; string public symbol = "SEBA"; uint8 public decimals = 18; uint256 public totalSupply = 325000000 * (uint256(10) ** decimals); event Transfer(address indexed from, address indexed to, uint256 value); constructor() public { } function transfer(address to, uint256 value) public returns (bool success) { require(<FILL_ME>) balanceOf[msg.sender] -= value; // balanceOf[to] += value; // emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } }
balanceOf[msg.sender]>=value
13,843
balanceOf[msg.sender]>=value
"only a signer can call in MultiSigTools"
pragma solidity >=0.4.21 <0.6.0; contract MultiSigInterface{ function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool); function is_signer(address addr) public view returns(bool); } contract MultiSigTools{ MultiSigInterface public multisig_contract; constructor(address _contract) public{ } modifier only_signer{ require(<FILL_ME>) _; } modifier is_majority_sig(uint64 id, string memory name) { } event TransferMultiSig(address _old, address _new); function transfer_multisig(uint64 id, address _contract) public only_signer is_majority_sig(id, "transfer_multisig"){ } } contract TrustListInterface{ function is_trusted(address addr) public returns(bool); } contract TrustListTools{ TrustListInterface public list; constructor(address _list) public { } modifier is_trusted(address addr){ } } contract TransferableToken{ function balanceOf(address _owner) public returns (uint256 balance) ; function transfer(address _to, uint256 _amount) public returns (bool success) ; function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ; } contract TokenClaimer{ event ClaimedTokens(address indexed _token, address indexed _to, uint _amount); /// @notice This method can be used by the controller to extract mistakenly /// sent tokens to this contract. /// @param _token The address of the token contract that you want to recover /// set to 0 in case you want to extract ether. function _claimStdTokens(address _token, address payable to) internal { } } library 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) { } } contract IERC20Auction{ function is_expired() public view returns(bool); function is_finished() public view returns(bool); function auction_expiration() public returns(bool); } contract IERC20AuctionFactory{ function createERC20Auction(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public returns(address); } contract IERC20DepositPool { event Transfer(address from, address to, uint amount); event OutsideTransfer(address from, address to, uint amount); event InternalTransfer(address from, address to, uint amount); event DepositERC20(address addr, uint amount); event WithdrawERC20(address addr, uint amount); event LockERC20(address from, address addr, uint amount); event UnlockERC20(address from, address addr, uint amount); function deposit(uint _amount) public returns (bool); function transfer(address _to, uint _amount) public returns (bool); function withdraw(uint _amount) public returns(bool); function lock(address addr, uint amount) public returns (bool); function unlock(address addr, uint amount) public returns(bool); function outside_transfer(address from, address to, uint _amount) public returns(bool); function internal_transfer(address from, address to, uint amount) public returns(bool); } contract IERC20AuctionOpProxy { function add_auction(address _auction) public; function apply_bid(address addr, uint amount, uint price, uint price_unit) public; function revoke_bid(address addr, uint amount, uint price, uint price_unit) public; function apply_auction(address addr, uint amount, uint price, uint price_unit) public; function object_token() public view returns(address, string memory); function object_total_amount() public view returns(uint); } contract ERC20TokenBankInterface{ function balance() public view returns(uint); function token() public view returns(address, string memory); function issue(address _to, uint _amount) public returns (bool success); } contract ERC20Auction is IERC20Auction, MultiSigTools, TokenClaimer{ IERC20AuctionOpProxy public auction_proxy; uint public minimum_object_amount; uint public minimum_bid_price; uint public obj_price_unit; uint public auction_start_block; uint public auction_end_block; address public current_buyer; uint public current_bid_price; uint public current_bid_amount; bool public is_auction_settled; address public auction_creator; constructor(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public MultiSigTools(_multisig){ } function auction_info() public view returns (uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block){ } function hammer_info() public view returns (address buyer, uint price, uint amount){ } function object_token() public view returns(address, string memory){ } function object_total_amount() public view returns(uint){ } event Bid(address addr, uint amount, uint price); function bid(uint amount, uint price) public returns (bool){ } function is_expired() public view returns(bool){ } function is_finished() public view returns(bool){ } function auction_expiration() public returns (bool){ } function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){ } }
multisig_contract.is_signer(msg.sender),"only a signer can call in MultiSigTools"
13,882
multisig_contract.is_signer(msg.sender)
"not a trusted issuer"
pragma solidity >=0.4.21 <0.6.0; contract MultiSigInterface{ function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool); function is_signer(address addr) public view returns(bool); } contract MultiSigTools{ MultiSigInterface public multisig_contract; constructor(address _contract) public{ } modifier only_signer{ } modifier is_majority_sig(uint64 id, string memory name) { } event TransferMultiSig(address _old, address _new); function transfer_multisig(uint64 id, address _contract) public only_signer is_majority_sig(id, "transfer_multisig"){ } } contract TrustListInterface{ function is_trusted(address addr) public returns(bool); } contract TrustListTools{ TrustListInterface public list; constructor(address _list) public { } modifier is_trusted(address addr){ require(<FILL_ME>) _; } } contract TransferableToken{ function balanceOf(address _owner) public returns (uint256 balance) ; function transfer(address _to, uint256 _amount) public returns (bool success) ; function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ; } contract TokenClaimer{ event ClaimedTokens(address indexed _token, address indexed _to, uint _amount); /// @notice This method can be used by the controller to extract mistakenly /// sent tokens to this contract. /// @param _token The address of the token contract that you want to recover /// set to 0 in case you want to extract ether. function _claimStdTokens(address _token, address payable to) internal { } } library 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) { } } contract IERC20Auction{ function is_expired() public view returns(bool); function is_finished() public view returns(bool); function auction_expiration() public returns(bool); } contract IERC20AuctionFactory{ function createERC20Auction(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public returns(address); } contract IERC20DepositPool { event Transfer(address from, address to, uint amount); event OutsideTransfer(address from, address to, uint amount); event InternalTransfer(address from, address to, uint amount); event DepositERC20(address addr, uint amount); event WithdrawERC20(address addr, uint amount); event LockERC20(address from, address addr, uint amount); event UnlockERC20(address from, address addr, uint amount); function deposit(uint _amount) public returns (bool); function transfer(address _to, uint _amount) public returns (bool); function withdraw(uint _amount) public returns(bool); function lock(address addr, uint amount) public returns (bool); function unlock(address addr, uint amount) public returns(bool); function outside_transfer(address from, address to, uint _amount) public returns(bool); function internal_transfer(address from, address to, uint amount) public returns(bool); } contract IERC20AuctionOpProxy { function add_auction(address _auction) public; function apply_bid(address addr, uint amount, uint price, uint price_unit) public; function revoke_bid(address addr, uint amount, uint price, uint price_unit) public; function apply_auction(address addr, uint amount, uint price, uint price_unit) public; function object_token() public view returns(address, string memory); function object_total_amount() public view returns(uint); } contract ERC20TokenBankInterface{ function balance() public view returns(uint); function token() public view returns(address, string memory); function issue(address _to, uint _amount) public returns (bool success); } contract ERC20Auction is IERC20Auction, MultiSigTools, TokenClaimer{ IERC20AuctionOpProxy public auction_proxy; uint public minimum_object_amount; uint public minimum_bid_price; uint public obj_price_unit; uint public auction_start_block; uint public auction_end_block; address public current_buyer; uint public current_bid_price; uint public current_bid_amount; bool public is_auction_settled; address public auction_creator; constructor(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public MultiSigTools(_multisig){ } function auction_info() public view returns (uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block){ } function hammer_info() public view returns (address buyer, uint price, uint amount){ } function object_token() public view returns(address, string memory){ } function object_total_amount() public view returns(uint){ } event Bid(address addr, uint amount, uint price); function bid(uint amount, uint price) public returns (bool){ } function is_expired() public view returns(bool){ } function is_finished() public view returns(bool){ } function auction_expiration() public returns (bool){ } function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){ } }
list.is_trusted(addr),"not a trusted issuer"
13,882
list.is_trusted(addr)
"auction settled already"
pragma solidity >=0.4.21 <0.6.0; contract MultiSigInterface{ function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool); function is_signer(address addr) public view returns(bool); } contract MultiSigTools{ MultiSigInterface public multisig_contract; constructor(address _contract) public{ } modifier only_signer{ } modifier is_majority_sig(uint64 id, string memory name) { } event TransferMultiSig(address _old, address _new); function transfer_multisig(uint64 id, address _contract) public only_signer is_majority_sig(id, "transfer_multisig"){ } } contract TrustListInterface{ function is_trusted(address addr) public returns(bool); } contract TrustListTools{ TrustListInterface public list; constructor(address _list) public { } modifier is_trusted(address addr){ } } contract TransferableToken{ function balanceOf(address _owner) public returns (uint256 balance) ; function transfer(address _to, uint256 _amount) public returns (bool success) ; function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ; } contract TokenClaimer{ event ClaimedTokens(address indexed _token, address indexed _to, uint _amount); /// @notice This method can be used by the controller to extract mistakenly /// sent tokens to this contract. /// @param _token The address of the token contract that you want to recover /// set to 0 in case you want to extract ether. function _claimStdTokens(address _token, address payable to) internal { } } library 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) { } } contract IERC20Auction{ function is_expired() public view returns(bool); function is_finished() public view returns(bool); function auction_expiration() public returns(bool); } contract IERC20AuctionFactory{ function createERC20Auction(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public returns(address); } contract IERC20DepositPool { event Transfer(address from, address to, uint amount); event OutsideTransfer(address from, address to, uint amount); event InternalTransfer(address from, address to, uint amount); event DepositERC20(address addr, uint amount); event WithdrawERC20(address addr, uint amount); event LockERC20(address from, address addr, uint amount); event UnlockERC20(address from, address addr, uint amount); function deposit(uint _amount) public returns (bool); function transfer(address _to, uint _amount) public returns (bool); function withdraw(uint _amount) public returns(bool); function lock(address addr, uint amount) public returns (bool); function unlock(address addr, uint amount) public returns(bool); function outside_transfer(address from, address to, uint _amount) public returns(bool); function internal_transfer(address from, address to, uint amount) public returns(bool); } contract IERC20AuctionOpProxy { function add_auction(address _auction) public; function apply_bid(address addr, uint amount, uint price, uint price_unit) public; function revoke_bid(address addr, uint amount, uint price, uint price_unit) public; function apply_auction(address addr, uint amount, uint price, uint price_unit) public; function object_token() public view returns(address, string memory); function object_total_amount() public view returns(uint); } contract ERC20TokenBankInterface{ function balance() public view returns(uint); function token() public view returns(address, string memory); function issue(address _to, uint _amount) public returns (bool success); } contract ERC20Auction is IERC20Auction, MultiSigTools, TokenClaimer{ IERC20AuctionOpProxy public auction_proxy; uint public minimum_object_amount; uint public minimum_bid_price; uint public obj_price_unit; uint public auction_start_block; uint public auction_end_block; address public current_buyer; uint public current_bid_price; uint public current_bid_amount; bool public is_auction_settled; address public auction_creator; constructor(address _auction_proxy, uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block, address _creator, address _multisig ) public MultiSigTools(_multisig){ } function auction_info() public view returns (uint _min_obj_amount, uint _min_bid_price, uint _obj_price_unit, uint _start_block, uint _end_block){ } function hammer_info() public view returns (address buyer, uint price, uint amount){ } function object_token() public view returns(address, string memory){ } function object_total_amount() public view returns(uint){ } event Bid(address addr, uint amount, uint price); function bid(uint amount, uint price) public returns (bool){ } function is_expired() public view returns(bool){ } function is_finished() public view returns(bool){ } function auction_expiration() public returns (bool){ require(block.number > auction_end_block, "not expired yet"); require(<FILL_ME>) if(current_buyer == address(0x0)){ is_auction_settled = true; return true; } auction_proxy.apply_auction(current_buyer, current_bid_amount, current_bid_price, obj_price_unit); is_auction_settled = true; return true; } function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){ } }
!is_auction_settled,"auction settled already"
13,882
!is_auction_settled
"SOS: Max mint amount per wallet exceeded."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Expand.sol"; contract SOS is ERC721Expand, Ownable, ReentrancyGuard { string public baseURI; uint256 public constant PRICE = 0.0088 * 10**18; // 0.0088 ETH uint256 public maxMint; event Minted(address minter, uint256 amount); event BaseURIChanged(string newBaseURI); constructor( string memory initBaseURI, uint256 _maxBatchSize, uint256 _collectionSize ) ERC721Expand("Story Of Seassor", "SOS", _maxBatchSize, _collectionSize) { } function _baseURI() internal view override returns (string memory) { } function mint(uint256 amount) external payable { require( tx.origin == msg.sender, "SOS: contract is not allowed to mint." ); require(<FILL_ME>) require( totalSupply() + amount <= collectionSize, "SOS: Max supply exceeded." ); _safeMint(msg.sender, amount); refundIfOver(PRICE * amount); emit Minted(msg.sender, amount); } function refundIfOver(uint256 price) private { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external nonReentrant onlyOwner { } function numberMinted(address account) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
numberMinted(msg.sender)+amount<=maxMint,"SOS: Max mint amount per wallet exceeded."
13,917
numberMinted(msg.sender)+amount<=maxMint
"SOS: Max supply exceeded."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721Expand.sol"; contract SOS is ERC721Expand, Ownable, ReentrancyGuard { string public baseURI; uint256 public constant PRICE = 0.0088 * 10**18; // 0.0088 ETH uint256 public maxMint; event Minted(address minter, uint256 amount); event BaseURIChanged(string newBaseURI); constructor( string memory initBaseURI, uint256 _maxBatchSize, uint256 _collectionSize ) ERC721Expand("Story Of Seassor", "SOS", _maxBatchSize, _collectionSize) { } function _baseURI() internal view override returns (string memory) { } function mint(uint256 amount) external payable { require( tx.origin == msg.sender, "SOS: contract is not allowed to mint." ); require( numberMinted(msg.sender) + amount <= maxMint, "SOS: Max mint amount per wallet exceeded." ); require(<FILL_ME>) _safeMint(msg.sender, amount); refundIfOver(PRICE * amount); emit Minted(msg.sender, amount); } function refundIfOver(uint256 price) private { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external nonReentrant onlyOwner { } function numberMinted(address account) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
totalSupply()+amount<=collectionSize,"SOS: Max supply exceeded."
13,917
totalSupply()+amount<=collectionSize
"Caller is not minter"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title SWAGverseERC721 * SWAGverseERC721 - ERC721 contract that whitelists a trading address, and has minting functionality. */ contract SWAGverseERC721 is ERC721, ContextMixin, NativeMetaTransaction, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; /** * We rely on the OZ Counter util to keep track of the next available ID. * We track the nextTokenId instead of the currentTokenId to save users on gas costs. * Read more about it here: https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E */ Counters.Counter private _nextTokenId; address proxyRegistryAddress; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; mapping(address => bool) private _minters; string private _contractURI; string private _baseTokenURI; constructor( string memory _name, string memory _symbol, string memory contractURI_, string memory baseTokenURI_, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } /** * returns uri of metadata for this contract * see: https://docs.opensea.io/docs/contract-level-metadata */ function contractURI() public view returns (string memory) { } /** @dev Returns the total tokens minted so far. 1 is always subtracted from the Counter since it tracks the next available tokenId. */ function totalSupply() public view returns (uint256) { } function baseTokenURI() public view returns (string memory) { } function canMint(address operator) public view returns (bool) { } /** * returns uri of metadata for given token * see: https://docs.opensea.io/docs/metadata-standards */ function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { } /** * @dev Mints a token to an address with a tokenURI. * @param _to address of the future owner of the token */ function mintTo(address _to) public { require(<FILL_ME>) uint256 currentTokenId = _nextTokenId.current(); _nextTokenId.increment(); _safeMint(_to, currentTokenId); } // ***** Owner only interfaces starts from here ***** function setMinter(address operator, bool _canMint) public onlyOwner { } function setContractURI(string calldata newContractURI) public onlyOwner { } function setBaseTokenURI(string calldata baseTokenURI_) public onlyOwner { } function setTokenURI(uint256 tokenId, string memory _tokenURI) public onlyOwner { } }
canMint(msgSender()),"Caller is not minter"
13,951
canMint(msgSender())
'order'
pragma solidity >=0.4.24 <0.6.0; contract SimpleMultiSig { // EIP712 Precomputed hashes: // keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)") bytes32 constant EIP712DOMAINTYPE_HASH = 0xd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac56472; // kekkac256("Simple MultiSig") bytes32 constant NAME_HASH = 0xb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6; // kekkac256("1") bytes32 constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6; // kekkac256("MultiSigTransaction(address destination,uint256 value,bytes data,uint256 nonce,address executor,uint256 gasLimit)") bytes32 constant TXTYPE_HASH = 0x3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d7; bytes32 constant SALT = 0x251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc0; uint public nonce; // (only) mutable state uint public threshold; // immutable state mapping (address => bool) isOwner; // immutable state address[] public ownersArr; // immutable state bytes32 DOMAIN_SEPARATOR; // hash for EIP712, computed from contract address event Deposit(address indexed from, uint value); event Withdrawal(address indexed to, uint value); // Note that owners_ must be strictly increasing, in order to prevent duplicates constructor(uint threshold_, address[] memory owners_, uint chainId) public { require(owners_.length <= 10 && threshold_ <= owners_.length && threshold_ > 0, 'args'); address lastAdd = address(0); for (uint i = 0; i < owners_.length; i++) { require(<FILL_ME>) isOwner[owners_[i]] = true; lastAdd = owners_[i]; } ownersArr = owners_; threshold = threshold_; DOMAIN_SEPARATOR = keccak256(abi.encode(EIP712DOMAINTYPE_HASH, NAME_HASH, VERSION_HASH, chainId, this, SALT)); } // Note that address recovered from signatures must be strictly increasing, in order to prevent duplicates function execute(uint8[] memory sigV, bytes32[] memory sigR, bytes32[] memory sigS, address destination, uint value, bytes memory data, address executor, uint gasLimit) public { } function () payable external { } }
owners_[i]>lastAdd,'order'
13,992
owners_[i]>lastAdd
null
pragma solidity ^0.4.24; contract Audit { struct Proof { uint level; // Audit level uint insertedBlock; // Audit's block bytes32 ipfsHash; // IPFS dag-cbor proof address auditedBy; // Audited by address } event AttachedEvidence(address indexed auditorAddr, bytes32 indexed codeHash, bytes32 ipfsHash); event NewAudit(address indexed auditorAddr, bytes32 indexed codeHash); // Maps auditor address and code's keccak256 to Audit mapping (address => mapping (bytes32 => Proof)) public auditedContracts; // Maps auditor address to a list of audit code hashes mapping (address => bytes32[]) public auditorContracts; // Returns code audit level, 0 if not present function isVerifiedAddress(address _auditorAddr, address _contractAddr) public view returns(uint) { } function isVerifiedCode(address _auditorAddr, bytes32 _codeHash) public view returns(uint) { } function getCodeHash(address _contractAddr) public view returns(bytes32) { } // Add audit information function addAudit(bytes32 _codeHash, uint _level, bytes32 _ipfsHash) public { address auditor = msg.sender; require(<FILL_ME>) auditedContracts[auditor][_codeHash] = Proof({ level: _level, auditedBy: auditor, insertedBlock: block.number, ipfsHash: _ipfsHash }); auditorContracts[auditor].push(_codeHash); emit NewAudit(auditor, _codeHash); } // Add evidence to audited code, only author, if _newLevel is different from original // updates the contract's level function addEvidence(bytes32 _codeHash, uint _newLevel, bytes32 _ipfsHash) public { } function codeAt(address _addr) public view returns (bytes code) { } }
auditedContracts[auditor][_codeHash].insertedBlock==0
14,001
auditedContracts[auditor][_codeHash].insertedBlock==0
null
pragma solidity ^0.4.24; contract Audit { struct Proof { uint level; // Audit level uint insertedBlock; // Audit's block bytes32 ipfsHash; // IPFS dag-cbor proof address auditedBy; // Audited by address } event AttachedEvidence(address indexed auditorAddr, bytes32 indexed codeHash, bytes32 ipfsHash); event NewAudit(address indexed auditorAddr, bytes32 indexed codeHash); // Maps auditor address and code's keccak256 to Audit mapping (address => mapping (bytes32 => Proof)) public auditedContracts; // Maps auditor address to a list of audit code hashes mapping (address => bytes32[]) public auditorContracts; // Returns code audit level, 0 if not present function isVerifiedAddress(address _auditorAddr, address _contractAddr) public view returns(uint) { } function isVerifiedCode(address _auditorAddr, bytes32 _codeHash) public view returns(uint) { } function getCodeHash(address _contractAddr) public view returns(bytes32) { } // Add audit information function addAudit(bytes32 _codeHash, uint _level, bytes32 _ipfsHash) public { } // Add evidence to audited code, only author, if _newLevel is different from original // updates the contract's level function addEvidence(bytes32 _codeHash, uint _newLevel, bytes32 _ipfsHash) public { address auditor = msg.sender; require(<FILL_ME>) if (auditedContracts[auditor][_codeHash].level != _newLevel) auditedContracts[auditor][_codeHash].level = _newLevel; emit AttachedEvidence(auditor, _codeHash, _ipfsHash); } function codeAt(address _addr) public view returns (bytes code) { } }
auditedContracts[auditor][_codeHash].insertedBlock!=0
14,001
auditedContracts[auditor][_codeHash].insertedBlock!=0
"Account is already pauser"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; abstract contract Pauser is Ownable, Pausable { mapping(address => bool) public pausers; event PauserAdded(address account); event PauserRemoved(address account); constructor() { } modifier onlyPauser() { } function pause() public onlyPauser { } function unpause() public onlyPauser { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner { } function renouncePauser() public { } function _addPauser(address account) private { require(<FILL_ME>) pausers[account] = true; emit PauserAdded(account); } function _removePauser(address account) private { } }
!isPauser(account),"Account is already pauser"
14,027
!isPauser(account)
"Account is not pauser"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; abstract contract Pauser is Ownable, Pausable { mapping(address => bool) public pausers; event PauserAdded(address account); event PauserRemoved(address account); constructor() { } modifier onlyPauser() { } function pause() public onlyPauser { } function unpause() public onlyPauser { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner { } function renouncePauser() public { } function _addPauser(address account) private { } function _removePauser(address account) private { require(<FILL_ME>) pausers[account] = false; emit PauserRemoved(account); } }
isPauser(account),"Account is not pauser"
14,027
isPauser(account)
"ownership failed"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./FXY.sol"; contract Staker is Ownable, IERC721Receiver { mapping (uint => address) public ownership; mapping(uint => uint) public stakeTime; mapping(address => uint) public lastWithdraw; mapping (address => uint[]) private _qty; bool public paused = false; uint nullToken = 1 ether; uint tokensHour = 1; IERC721 public NFT; FXY public TOKEN; modifier notPaused(){ } constructor() { } function setTokenshour(uint new_) external onlyOwner { } function togglePause() public onlyOwner { } function setNFTAddress(address new_) external onlyOwner { } function setCOINAddress(address new_) external onlyOwner { } function getAssetsByHolder(address holder) public view returns (uint[] memory){ } function getProfits(uint tokenId) public view returns(uint) { } function getAllProfits() public view returns(uint) { } function stake(uint[] calldata tokenIds) public notPaused { } function unstake(uint[] calldata tokenIds) public { } function unstakeAll(bool wd) public { } function recover(uint tokenId) internal { require(<FILL_ME>) ownership[tokenId] = address(0); NFT.transferFrom(address(this), _msgSender(), tokenId); } function removeToken(uint tokenId) internal { } function claim() public notPaused { } function onERC721Received( address operator, address, uint256, bytes memory ) public virtual override returns (bytes4) { } }
ownership[tokenId]==_msgSender(),"ownership failed"
14,041
ownership[tokenId]==_msgSender()
"not allowed"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./FXY.sol"; contract Staker is Ownable, IERC721Receiver { mapping (uint => address) public ownership; mapping(uint => uint) public stakeTime; mapping(address => uint) public lastWithdraw; mapping (address => uint[]) private _qty; bool public paused = false; uint nullToken = 1 ether; uint tokensHour = 1; IERC721 public NFT; FXY public TOKEN; modifier notPaused(){ } constructor() { } function setTokenshour(uint new_) external onlyOwner { } function togglePause() public onlyOwner { } function setNFTAddress(address new_) external onlyOwner { } function setCOINAddress(address new_) external onlyOwner { } function getAssetsByHolder(address holder) public view returns (uint[] memory){ } function getProfits(uint tokenId) public view returns(uint) { } function getAllProfits() public view returns(uint) { } function stake(uint[] calldata tokenIds) public notPaused { } function unstake(uint[] calldata tokenIds) public { } function unstakeAll(bool wd) public { } function recover(uint tokenId) internal { } function removeToken(uint tokenId) internal { } function claim() public notPaused { } function onERC721Received( address operator, address, uint256, bytes memory ) public virtual override returns (bytes4) { require(<FILL_ME>) return this.onERC721Received.selector; } }
address(NFT)==operator,"not allowed"
14,041
address(NFT)==operator
"Already Claimed"
pragma solidity ^0.5.11; contract ERC20Interface{ //using SafeMath for uint256; function transfer(address _address, uint _value) public returns (bool success){} function balanceOf(address _address)view public returns(uint); function transferFrom(address _from, address _receiver, uint _value) public returns (bool success){} function allowance(address owner, address spender) public view returns (uint256) {} } contract Reward{ address owner; uint public _tokenDecimal = 18; ERC20Interface public token; uint holderbalance; uint amount; uint real1 = 5; uint p1 = 1; //for first set of people; uint p2 = 10000; //for second set of people; uint peal1 = p1*10**_tokenDecimal; uint peal2 = p2*10**_tokenDecimal; bool public open = true; mapping (address => uint) _holdersID; address [] _whitelist; address rewardpool; constructor(ERC20Interface _token, address _rewardpool) public{ } modifier onlyOwner() { } function _percent1(uint _value) public onlyOwner{ } function _RewardPool(address _account) public onlyOwner{ } function _range1(uint _value) public onlyOwner{ } function _range2(uint _value) public onlyOwner{ } function _showrange1() public view returns(uint){ } function _showrange2() public view returns(uint){ } function _start() public onlyOwner{ } function _end() public onlyOwner{ } function Claim() public returns(bool){ require(open == true, "Claiming is not yet initialized"); require(<FILL_ME>) uint place = lengthShotslist(); _holdersID[msg.sender] = place; _whitelist.push(msg.sender); holderbalance = token.balanceOf(msg.sender); if(holderbalance >= peal1 && holderbalance < peal2){ amount = holderbalance * real1 / 100; //5 percent // stage = 1; require(token.allowance(rewardpool, address(this)) >= amount, 'All tokens aloted has been completely claimed'); token.transferFrom(rewardpool, msg.sender, amount); } else if(holderbalance >= peal2){ // stage = 2; amount = peal2 * real1 / 100; //5 percent require(token.allowance(rewardpool, address(this)) >= amount, 'All tokens aloted has been completely claimed'); token.transferFrom(rewardpool, msg.sender, amount); } return true; } function holdersID() internal view returns(uint){ } function viewWhitelist(uint _ID) internal view returns(address){ } function check() public returns (bool){ } function clear()public onlyOwner{ } function lengthShotslist() internal view returns (uint){ } }
check()==false,"Already Claimed"
14,049
check()==false
'All tokens aloted has been completely claimed'
pragma solidity ^0.5.11; contract ERC20Interface{ //using SafeMath for uint256; function transfer(address _address, uint _value) public returns (bool success){} function balanceOf(address _address)view public returns(uint); function transferFrom(address _from, address _receiver, uint _value) public returns (bool success){} function allowance(address owner, address spender) public view returns (uint256) {} } contract Reward{ address owner; uint public _tokenDecimal = 18; ERC20Interface public token; uint holderbalance; uint amount; uint real1 = 5; uint p1 = 1; //for first set of people; uint p2 = 10000; //for second set of people; uint peal1 = p1*10**_tokenDecimal; uint peal2 = p2*10**_tokenDecimal; bool public open = true; mapping (address => uint) _holdersID; address [] _whitelist; address rewardpool; constructor(ERC20Interface _token, address _rewardpool) public{ } modifier onlyOwner() { } function _percent1(uint _value) public onlyOwner{ } function _RewardPool(address _account) public onlyOwner{ } function _range1(uint _value) public onlyOwner{ } function _range2(uint _value) public onlyOwner{ } function _showrange1() public view returns(uint){ } function _showrange2() public view returns(uint){ } function _start() public onlyOwner{ } function _end() public onlyOwner{ } function Claim() public returns(bool){ require(open == true, "Claiming is not yet initialized"); require(check() == false, "Already Claimed"); uint place = lengthShotslist(); _holdersID[msg.sender] = place; _whitelist.push(msg.sender); holderbalance = token.balanceOf(msg.sender); if(holderbalance >= peal1 && holderbalance < peal2){ amount = holderbalance * real1 / 100; //5 percent // stage = 1; require(<FILL_ME>) token.transferFrom(rewardpool, msg.sender, amount); } else if(holderbalance >= peal2){ // stage = 2; amount = peal2 * real1 / 100; //5 percent require(token.allowance(rewardpool, address(this)) >= amount, 'All tokens aloted has been completely claimed'); token.transferFrom(rewardpool, msg.sender, amount); } return true; } function holdersID() internal view returns(uint){ } function viewWhitelist(uint _ID) internal view returns(address){ } function check() public returns (bool){ } function clear()public onlyOwner{ } function lengthShotslist() internal view returns (uint){ } }
token.allowance(rewardpool,address(this))>=amount,'All tokens aloted has been completely claimed'
14,049
token.allowance(rewardpool,address(this))>=amount
"Implementation not set"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "./Proxy.sol"; /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. * * Credit: https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/packages/lib/contracts/upgradeability/BaseUpgradeabilityProxy.sol */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(<FILL_ME>) bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } emit Upgraded(newImplementation); } }
AddressUpgradeable.isContract(newImplementation),"Implementation not set"
14,051
AddressUpgradeable.isContract(newImplementation)
"exceeds max Sophias"
// contracts/sophiafaces.sol // SPDX-License-Identifier: MIT // ___. .__ __ _____ // \_ |__ | | ____ ____ | | ___/ ____\____ ____ ____ ______ // | __ \| | / _ \_/ ___\| |/ /\ __\\__ \ _/ ___\/ __ \ / ___/ // | \_\ \ |_( <_> ) \___| < | | / __ \\ \__\ ___/ \___ \ // |___ /____/\____/ \___ >__|_ \ |__| (____ /\___ >__a_ >____ > // \/ \/ \/ \/ \/ \/ \/ pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; // sophiafaces - a blockfaces production abstract contract Blockfaces { function walletOfOwner(address _owner) public virtual view returns(uint256[] memory); } contract sophiafaces is ERC721Enumerable, Ownable { using Strings for uint256; Blockfaces private blockface; bool public hasSaleStarted; uint256 private _price = 0.06 ether; uint256 private _holderprice = 0.04 ether; string _baseTokenURI; // The IPFS hash string public METADATA_PROVENANCE_HASH = ""; // Truth string public constant R = "sophiafaces - the girl with the thousand faces"; constructor(string memory baseURI) ERC721("Sophiafaces","SFACES") { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function adopt(uint256 numfaces) public payable { uint256[] memory blockfaceids; blockfaceids = blockface.walletOfOwner(msg.sender); uint256 balance = blockfaceids.length; uint256 supply = totalSupply(); require(hasSaleStarted, "sale is paused"); require(numfaces < 26, "only up to 25 Sophias at once"); require(<FILL_ME>) if(balance > 0){ require(msg.value >= _holderprice * numfaces, "ether value sent is below the price"); for(uint256 i; i < numfaces; i++){ _safeMint( msg.sender, supply + i ); } } else{ require(msg.value >= _price * numfaces, "ether value sent is below the price"); for(uint256 i; i < numfaces; i++){ _safeMint( msg.sender, supply + i ); } } } // a higher power function setProvenanceHash(string memory _hash) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setHolderPrice(uint256 _newPrice) public onlyOwner() { } function startSale() public onlyOwner { } function pauseSale() public onlyOwner { } function withdrawAll() public payable onlyOwner { } // community reserve function reserve() public onlyOwner { } }
supply+numfaces<1001,"exceeds max Sophias"
14,080
supply+numfaces<1001
null
// contracts/sophiafaces.sol // SPDX-License-Identifier: MIT // ___. .__ __ _____ // \_ |__ | | ____ ____ | | ___/ ____\____ ____ ____ ______ // | __ \| | / _ \_/ ___\| |/ /\ __\\__ \ _/ ___\/ __ \ / ___/ // | \_\ \ |_( <_> ) \___| < | | / __ \\ \__\ ___/ \___ \ // |___ /____/\____/ \___ >__|_ \ |__| (____ /\___ >__a_ >____ > // \/ \/ \/ \/ \/ \/ \/ pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; // sophiafaces - a blockfaces production abstract contract Blockfaces { function walletOfOwner(address _owner) public virtual view returns(uint256[] memory); } contract sophiafaces is ERC721Enumerable, Ownable { using Strings for uint256; Blockfaces private blockface; bool public hasSaleStarted; uint256 private _price = 0.06 ether; uint256 private _holderprice = 0.04 ether; string _baseTokenURI; // The IPFS hash string public METADATA_PROVENANCE_HASH = ""; // Truth string public constant R = "sophiafaces - the girl with the thousand faces"; constructor(string memory baseURI) ERC721("Sophiafaces","SFACES") { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function adopt(uint256 numfaces) public payable { } // a higher power function setProvenanceHash(string memory _hash) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setHolderPrice(uint256 _newPrice) public onlyOwner() { } function startSale() public onlyOwner { } function pauseSale() public onlyOwner { } function withdrawAll() public payable onlyOwner { require(<FILL_ME>) } // community reserve function reserve() public onlyOwner { } }
payable(msg.sender).send(address(this).balance)
14,080
payable(msg.sender).send(address(this).balance)
"PROJECT_ALREADY_SETUP"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { require(<FILL_ME>) require(maxTokenId_ > 0, "ZERO_MAX_TOKEN_ID"); require(royaltyFee_ <= MAX_ROYALTY_FEE, "MAX_ROYALTY_EXCEEDED"); require(royaltyAddress_ != address(0), "ZERO_ROYALTY_ADDRESS"); require(bytes(baseURI_).length > 0, "EMPTY_BASE_URI"); projectToMaxTokenId[projectId_] = maxTokenId_; projectToMintPrice[projectId_] = mintPrice_; projectToRoyaltyFee[projectId_] = royaltyFee_; projectToRoyaltyAddress[projectId_] = royaltyAddress_; projectToPreMint[projectId_] = true; _baseURIs[projectId_] = baseURI_; } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
projectToMaxTokenId[projectId_]==0,"PROJECT_ALREADY_SETUP"
14,136
projectToMaxTokenId[projectId_]==0
"EMPTY_BASE_URI"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { require(projectToMaxTokenId[projectId_] == 0, "PROJECT_ALREADY_SETUP"); require(maxTokenId_ > 0, "ZERO_MAX_TOKEN_ID"); require(royaltyFee_ <= MAX_ROYALTY_FEE, "MAX_ROYALTY_EXCEEDED"); require(royaltyAddress_ != address(0), "ZERO_ROYALTY_ADDRESS"); require(<FILL_ME>) projectToMaxTokenId[projectId_] = maxTokenId_; projectToMintPrice[projectId_] = mintPrice_; projectToRoyaltyFee[projectId_] = royaltyFee_; projectToRoyaltyAddress[projectId_] = royaltyAddress_; projectToPreMint[projectId_] = true; _baseURIs[projectId_] = baseURI_; } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
bytes(baseURI_).length>0,"EMPTY_BASE_URI"
14,136
bytes(baseURI_).length>0
"INVALID_PROJECT"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { require(<FILL_ME>) require( projectToCurrentTokenId[projectId_].add(amount_) <= projectToMaxTokenId[projectId_], "MAX_SUPPLY" ); require(projectToPreMint[projectId_], "PREMINT_DISABLED"); for (uint i = 0; i < amount_; i++) { uint newTokenId = _getNextTokenId(); _mint(to_, newTokenId); _incrementTokenId(projectId_); } emit PreMint(projectId_, to_ , amount_); } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
projectToMaxTokenId[projectId_]>0,"INVALID_PROJECT"
14,136
projectToMaxTokenId[projectId_]>0
"MAX_SUPPLY"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { require(projectToMaxTokenId[projectId_] > 0, "INVALID_PROJECT"); require(<FILL_ME>) require(projectToPreMint[projectId_], "PREMINT_DISABLED"); for (uint i = 0; i < amount_; i++) { uint newTokenId = _getNextTokenId(); _mint(to_, newTokenId); _incrementTokenId(projectId_); } emit PreMint(projectId_, to_ , amount_); } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
projectToCurrentTokenId[projectId_].add(amount_)<=projectToMaxTokenId[projectId_],"MAX_SUPPLY"
14,136
projectToCurrentTokenId[projectId_].add(amount_)<=projectToMaxTokenId[projectId_]
"PREMINT_DISABLED"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { require(projectToMaxTokenId[projectId_] > 0, "INVALID_PROJECT"); require( projectToCurrentTokenId[projectId_].add(amount_) <= projectToMaxTokenId[projectId_], "MAX_SUPPLY" ); require(<FILL_ME>) for (uint i = 0; i < amount_; i++) { uint newTokenId = _getNextTokenId(); _mint(to_, newTokenId); _incrementTokenId(projectId_); } emit PreMint(projectId_, to_ , amount_); } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
projectToPreMint[projectId_],"PREMINT_DISABLED"
14,136
projectToPreMint[projectId_]
"URI_ALREADY_SET"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { require(<FILL_ME>) require(bytes(uri_).length > 0, "URI_EMPTY"); _tokenURIs[tokenId_] = uri_; } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
bytes(_tokenURIs[tokenId_]).length==0,"URI_ALREADY_SET"
14,136
bytes(_tokenURIs[tokenId_]).length==0
"URI_EMPTY"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { require(bytes(_tokenURIs[tokenId_]).length == 0, "URI_ALREADY_SET"); require(<FILL_ME>) _tokenURIs[tokenId_] = uri_; } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { } }
bytes(uri_).length>0,"URI_EMPTY"
14,136
bytes(uri_).length>0
"PREMINT_ENABLED"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { require(projectToMaxTokenId[projectId_] > 0, "PROJECT_NOT_SETUP"); require(<FILL_ME>) require(projectToCurrentTokenId[projectId_] < projectToMaxTokenId[projectId_], "MAX_SUPPLY_MINTED"); uint mintPrice = projectToMintPrice[projectId_]; require(msg.value >= mintPrice, "MINT_PRICE_NOT_MET"); // Mint a new token to the recipient tokenId_ = _getNextTokenId(); _mint(to_, tokenId_); _incrementTokenId(projectId_); // calculate royalties and tally up uint royaltyFee = mintPrice.mul(projectToRoyaltyFee[projectId_]).div(1000); projectToRoyalties[projectId_] = projectToRoyalties[projectId_].add(royaltyFee); // update proceeds projectToProceeds[projectId_] = projectToProceeds[projectId_].add(msg.value).sub(royaltyFee); emit Mint(projectId_, tokenId_, projectToCurrentTokenId[projectId_], mintPrice, to_); } }
projectToPreMint[projectId_]==false,"PREMINT_ENABLED"
14,136
projectToPreMint[projectId_]==false
"MAX_SUPPLY_MINTED"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IScorpioNFT.sol"; // Proxy contracts for OpenSea compatibility contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC721 supporting multiple token sets contract ScorpioNFT is IScorpioNFT, ERC721 { using SafeMath for uint32; using SafeMath for uint; using Strings for uint; uint32 public constant MAX_ROYALTY_FEE = 1000; // 100.0% mapping(uint => uint) public override internalTokenToProjectId; mapping(uint => uint) public override internalTokenToProjectTokenId; mapping(uint => uint) public override projectToCurrentTokenId; mapping(uint => uint) public override projectToMaxTokenId; mapping(uint => uint) public override projectToMintPrice; mapping(uint => address) public override projectToRoyaltyAddress; mapping(uint => uint) public override projectToRoyaltyFee; mapping(uint => uint) public override projectToRoyalties; mapping(uint => uint) public override projectToProceeds; mapping(uint => bool) public override projectToPreMint; mapping(uint => string) private _baseURIs; mapping(uint => string) private _tokenURIs; address public override owner; address public override proxyRegistryAddress; uint private _internalTokenId = 0; modifier onlyOwner() { } /** * @dev Create the NFT contract from name, symbol, owner */ constructor( string memory name_, string memory symbol_, address owner_, address proxy_ ) ERC721(name_, symbol_) { } function totalSupply() external view override returns (uint) { } function setupProject( uint projectId_, uint maxTokenId_, uint mintPrice_, uint royaltyFee_, address royaltyAddress_, string memory baseURI_ ) onlyOwner external override { } function disablePreMint(uint projectId_) onlyOwner external override { } function preMint(uint projectId_, uint amount_, address to_) onlyOwner external override { } /** * @dev calculates the next token ID based on value of _internalTokenId * @return uint for the next token ID */ function _getNextTokenId() private view returns (uint) { } /** * @dev increments the value of _internalTokenId and corresponding project token ID */ function _incrementTokenId(uint projectId_) private { } function tokenURI(uint tokenId_) public view override returns (string memory) { } function setTokenURI(uint tokenId_, string memory uri_) onlyOwner external { } /** * 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) { } /** * @dev Function to transfer sales proceeds to owner */ function withdrawProceeds(uint projectId_) external override { } /** * @dev Function to transfer sales royalties to beneficiary */ function withdrawRoyalties(uint projectId_) external override { } function mint(uint projectId_, address to_) external payable override returns (uint tokenId_) { require(projectToMaxTokenId[projectId_] > 0, "PROJECT_NOT_SETUP"); require(projectToPreMint[projectId_] == false, "PREMINT_ENABLED"); require(<FILL_ME>) uint mintPrice = projectToMintPrice[projectId_]; require(msg.value >= mintPrice, "MINT_PRICE_NOT_MET"); // Mint a new token to the recipient tokenId_ = _getNextTokenId(); _mint(to_, tokenId_); _incrementTokenId(projectId_); // calculate royalties and tally up uint royaltyFee = mintPrice.mul(projectToRoyaltyFee[projectId_]).div(1000); projectToRoyalties[projectId_] = projectToRoyalties[projectId_].add(royaltyFee); // update proceeds projectToProceeds[projectId_] = projectToProceeds[projectId_].add(msg.value).sub(royaltyFee); emit Mint(projectId_, tokenId_, projectToCurrentTokenId[projectId_], mintPrice, to_); } }
projectToCurrentTokenId[projectId_]<projectToMaxTokenId[projectId_],"MAX_SUPPLY_MINTED"
14,136
projectToCurrentTokenId[projectId_]<projectToMaxTokenId[projectId_]
"IbETHRouter: receive less ETH than amountETHmin"
pragma solidity =0.5.16; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { } function safeTransfer( address token, address to, uint256 value ) internal { } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { } function safeTransferETH(address to, uint256 value) internal { } } contract IbETHRouter is Ownable { using SafeMath for uint256; address public router; address public ibETH; address public alpha; address public lpToken; constructor(address _router, address _ibETH, address _alpha) public { } function() external payable { } // **** ETH-ibETH FUNCTIONS **** // Get number of ibETH needed to withdraw to get exact amountETH from the Bank function ibETHForExactETH(uint256 amountETH) public view returns (uint256) { } // Add ETH and Alpha from ibETH-Alpha Pool. // 1. Receive ETH and Alpha from caller. // 2. Wrap ETH to ibETH. // 3. Provide liquidity to the pool. function addLiquidityETH( uint256 amountAlphaDesired, uint256 amountAlphaMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountAlpha, uint256 amountETH, uint256 liquidity ) { } // Remove ETH and Alpha from ibETH-Alpha Pool. // 1. Remove ibETH and Alpha from the pool. // 2. Unwrap ibETH to ETH. // 3. Return ETH and Alpha to caller. function removeLiquidityETH( uint256 liquidity, uint256 amountAlphaMin, uint256 amountETHMin, address to, uint256 deadline ) public returns (uint256 amountAlpha, uint256 amountETH) { } // Remove liquidity from ibETH-Alpha Pool and convert all ibETH to Alpha // 1. Remove ibETH and Alpha from the pool. // 2. Swap ibETH for Alpha. // 3. Return Alpha to caller. function removeLiquidityAllAlpha( uint256 liquidity, uint256 amountAlphaMin, address to, uint256 deadline ) public returns (uint256 amountAlpha) { } // Swap exact amount of ETH for Token // 1. Receive ETH from caller // 2. Wrap ETH to ibETH. // 3. Swap ibETH for Token function swapExactETHForAlpha( uint256 amountAlphaOutMin, address to, uint256 deadline ) external payable returns (uint256[] memory amounts) { } // Swap Token for exact amount of ETH // 1. Receive Token from caller // 2. Swap Token for ibETH. // 3. Unwrap ibETH to ETH. function swapAlphaForExactETH( uint256 amountETHOut, uint256 amountAlphaInMax, address to, uint256 deadline ) external returns (uint256[] memory amounts) { } // Swap exact amount of Token for ETH // 1. Receive Token from caller // 2. Swap Token for ibETH. // 3. Unwrap ibETH to ETH. function swapExactAlphaForETH( uint256 amountAlphaIn, uint256 amountETHOutMin, address to, uint256 deadline ) external returns (uint256[] memory amounts) { TransferHelper.safeTransferFrom(alpha, msg.sender, address(this), amountAlphaIn); address[] memory path = new address[](2); path[0] = alpha; path[1] = ibETH; uint256[] memory swapAmounts = IUniswapV2Router02(router).swapExactTokensForTokens(amountAlphaIn, 0, path, address(this), deadline); IBank(ibETH).withdraw(swapAmounts[1]); amounts = new uint256[](2); amounts[0] = swapAmounts[0]; amounts[1] = address(this).balance; TransferHelper.safeTransferETH(to, amounts[1]); require(<FILL_ME>) } // Swap ETH for exact amount of Token // 1. Receive ETH from caller // 2. Wrap ETH to ibETH. // 3. Swap ibETH for Token function swapETHForExactAlpha( uint256 amountAlphaOut, address to, uint256 deadline ) external payable returns (uint256[] memory amounts) { } /// @dev Recover ERC20 tokens that were accidentally sent to this smart contract. /// @param token The token contract. Can be anything. This contract should not hold ERC20 tokens. /// @param to The address to send the tokens to. /// @param value The number of tokens to transfer to `to`. function recover(address token, address to, uint256 value) external onlyOwner { } /// @dev Recover ETH that were accidentally sent to this smart contract. /// @param to The address to send the ETH to. /// @param value The number of ETH to transfer to `to`. function recoverETH(address to, uint256 value) external onlyOwner { } }
amounts[1]>=amountETHOutMin,"IbETHRouter: receive less ETH than amountETHmin"
14,197
amounts[1]>=amountETHOutMin
"Address has already been initialized"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./BaseUpgradeablePausable.sol"; import "../../interfaces/IGoldfinchConfig.sol"; import "./ConfigOptions.sol"; /** * @title GoldfinchConfig * @notice This contract stores mappings of useful "protocol config state", giving a central place * for all other contracts to access it. For example, the TransactionLimit, or the PoolAddress. These config vars * are enumerated in the `ConfigOptions` library, and can only be changed by admins of the protocol. * Note: While this inherits from BaseUpgradeablePausable, it is not deployed as an upgradeable contract (this * is mostly to save gas costs of having each call go through a proxy) * @author Goldfinch */ contract GoldfinchConfig is BaseUpgradeablePausable { bytes32 public constant GO_LISTER_ROLE = keccak256("GO_LISTER_ROLE"); mapping(uint256 => address) public addresses; mapping(uint256 => uint256) public numbers; mapping(address => bool) public goList; event AddressUpdated(address owner, uint256 index, address oldValue, address newValue); event NumberUpdated(address owner, uint256 index, uint256 oldValue, uint256 newValue); event GoListed(address indexed member); event NoListed(address indexed member); bool public valuesInitialized; function initialize(address owner) public initializer { } function setAddress(uint256 addressIndex, address newAddress) public onlyAdmin { require(<FILL_ME>) emit AddressUpdated(msg.sender, addressIndex, addresses[addressIndex], newAddress); addresses[addressIndex] = newAddress; } function setNumber(uint256 index, uint256 newNumber) public onlyAdmin { } function setTreasuryReserve(address newTreasuryReserve) public onlyAdmin { } function setSeniorPoolStrategy(address newStrategy) public onlyAdmin { } function setCreditLineImplementation(address newAddress) public onlyAdmin { } function setBorrowerImplementation(address newAddress) public onlyAdmin { } function setGoldfinchConfig(address newAddress) public onlyAdmin { } function initializeFromOtherConfig(address _initialConfig) public onlyAdmin { } /** * @dev Adds a user to go-list * @param _member address to add to go-list */ function addToGoList(address _member) public onlyGoListerRole { } /** * @dev removes a user from go-list * @param _member address to remove from go-list */ function removeFromGoList(address _member) public onlyGoListerRole { } /** * @dev adds many users to go-list at once * @param _members addresses to ad to go-list */ function bulkAddToGoList(address[] calldata _members) external onlyGoListerRole { } /** * @dev removes many users from go-list at once * @param _members addresses to remove from go-list */ function bulkRemoveFromGoList(address[] calldata _members) external onlyGoListerRole { } /* Using custom getters in case we want to change underlying implementation later, or add checks or validations later on. */ function getAddress(uint256 index) public view returns (address) { } function getNumber(uint256 index) public view returns (uint256) { } modifier onlyGoListerRole() { } }
addresses[addressIndex]==address(0),"Address has already been initialized"
14,254
addresses[addressIndex]==address(0)
"Already initialized values"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./BaseUpgradeablePausable.sol"; import "../../interfaces/IGoldfinchConfig.sol"; import "./ConfigOptions.sol"; /** * @title GoldfinchConfig * @notice This contract stores mappings of useful "protocol config state", giving a central place * for all other contracts to access it. For example, the TransactionLimit, or the PoolAddress. These config vars * are enumerated in the `ConfigOptions` library, and can only be changed by admins of the protocol. * Note: While this inherits from BaseUpgradeablePausable, it is not deployed as an upgradeable contract (this * is mostly to save gas costs of having each call go through a proxy) * @author Goldfinch */ contract GoldfinchConfig is BaseUpgradeablePausable { bytes32 public constant GO_LISTER_ROLE = keccak256("GO_LISTER_ROLE"); mapping(uint256 => address) public addresses; mapping(uint256 => uint256) public numbers; mapping(address => bool) public goList; event AddressUpdated(address owner, uint256 index, address oldValue, address newValue); event NumberUpdated(address owner, uint256 index, uint256 oldValue, uint256 newValue); event GoListed(address indexed member); event NoListed(address indexed member); bool public valuesInitialized; function initialize(address owner) public initializer { } function setAddress(uint256 addressIndex, address newAddress) public onlyAdmin { } function setNumber(uint256 index, uint256 newNumber) public onlyAdmin { } function setTreasuryReserve(address newTreasuryReserve) public onlyAdmin { } function setSeniorPoolStrategy(address newStrategy) public onlyAdmin { } function setCreditLineImplementation(address newAddress) public onlyAdmin { } function setBorrowerImplementation(address newAddress) public onlyAdmin { } function setGoldfinchConfig(address newAddress) public onlyAdmin { } function initializeFromOtherConfig(address _initialConfig) public onlyAdmin { require(<FILL_ME>) IGoldfinchConfig initialConfig = IGoldfinchConfig(_initialConfig); for (uint256 i = 0; i < 10; i++) { setNumber(i, initialConfig.getNumber(i)); } for (uint256 i = 0; i < 11; i++) { if (getAddress(i) == address(0)) { setAddress(i, initialConfig.getAddress(i)); } } valuesInitialized = true; } /** * @dev Adds a user to go-list * @param _member address to add to go-list */ function addToGoList(address _member) public onlyGoListerRole { } /** * @dev removes a user from go-list * @param _member address to remove from go-list */ function removeFromGoList(address _member) public onlyGoListerRole { } /** * @dev adds many users to go-list at once * @param _members addresses to ad to go-list */ function bulkAddToGoList(address[] calldata _members) external onlyGoListerRole { } /** * @dev removes many users from go-list at once * @param _members addresses to remove from go-list */ function bulkRemoveFromGoList(address[] calldata _members) external onlyGoListerRole { } /* Using custom getters in case we want to change underlying implementation later, or add checks or validations later on. */ function getAddress(uint256 index) public view returns (address) { } function getNumber(uint256 index) public view returns (uint256) { } modifier onlyGoListerRole() { } }
!valuesInitialized,"Already initialized values"
14,254
!valuesInitialized
"Must have go-lister role to perform this action"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./BaseUpgradeablePausable.sol"; import "../../interfaces/IGoldfinchConfig.sol"; import "./ConfigOptions.sol"; /** * @title GoldfinchConfig * @notice This contract stores mappings of useful "protocol config state", giving a central place * for all other contracts to access it. For example, the TransactionLimit, or the PoolAddress. These config vars * are enumerated in the `ConfigOptions` library, and can only be changed by admins of the protocol. * Note: While this inherits from BaseUpgradeablePausable, it is not deployed as an upgradeable contract (this * is mostly to save gas costs of having each call go through a proxy) * @author Goldfinch */ contract GoldfinchConfig is BaseUpgradeablePausable { bytes32 public constant GO_LISTER_ROLE = keccak256("GO_LISTER_ROLE"); mapping(uint256 => address) public addresses; mapping(uint256 => uint256) public numbers; mapping(address => bool) public goList; event AddressUpdated(address owner, uint256 index, address oldValue, address newValue); event NumberUpdated(address owner, uint256 index, uint256 oldValue, uint256 newValue); event GoListed(address indexed member); event NoListed(address indexed member); bool public valuesInitialized; function initialize(address owner) public initializer { } function setAddress(uint256 addressIndex, address newAddress) public onlyAdmin { } function setNumber(uint256 index, uint256 newNumber) public onlyAdmin { } function setTreasuryReserve(address newTreasuryReserve) public onlyAdmin { } function setSeniorPoolStrategy(address newStrategy) public onlyAdmin { } function setCreditLineImplementation(address newAddress) public onlyAdmin { } function setBorrowerImplementation(address newAddress) public onlyAdmin { } function setGoldfinchConfig(address newAddress) public onlyAdmin { } function initializeFromOtherConfig(address _initialConfig) public onlyAdmin { } /** * @dev Adds a user to go-list * @param _member address to add to go-list */ function addToGoList(address _member) public onlyGoListerRole { } /** * @dev removes a user from go-list * @param _member address to remove from go-list */ function removeFromGoList(address _member) public onlyGoListerRole { } /** * @dev adds many users to go-list at once * @param _members addresses to ad to go-list */ function bulkAddToGoList(address[] calldata _members) external onlyGoListerRole { } /** * @dev removes many users from go-list at once * @param _members addresses to remove from go-list */ function bulkRemoveFromGoList(address[] calldata _members) external onlyGoListerRole { } /* Using custom getters in case we want to change underlying implementation later, or add checks or validations later on. */ function getAddress(uint256 index) public view returns (address) { } function getNumber(uint256 index) public view returns (uint256) { } modifier onlyGoListerRole() { require(<FILL_ME>) _; } }
hasRole(GO_LISTER_ROLE,_msgSender()),"Must have go-lister role to perform this action"
14,254
hasRole(GO_LISTER_ROLE,_msgSender())
"Contract locked"
//SPDX-License-Identifier: Unlicensed /*** * ███████ ██ ██ ███████ ██████ ██ ██ ██████ ███ ██ ███████ ██████ ███████ ████████ ███████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ * █████ ██ ██ █████ ██████ ████ ██ ██ ██ ██ ██ █████ ██ ███ █████ ██ ███████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ███████ ████ ███████ ██ ██ ██ ██████ ██ ████ ███████ ██████ ███████ ██ ███████ * * * ███████ ██████ ███ ███ ███████ ██████ ██ ██ ███████ ████████ * ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ * ███████ ██ ██ ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ███████ ██████ ██ ██ ███████ ██████ ██████ ███████ ██ * * * ETHER.CARDS - DUST TOKEN ALLOCATOR for EXTRA POOLS * */ pragma solidity >=0.6.0 <0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract DustPoolExtraAllocator is Ownable { using SafeMath for uint256; mapping(uint8 => uint256) public cardTypeAmounts; mapping(uint16 => uint8) internal tokenData; IERC721 public erc721; // Ether Cards IERC20 public erc20; // Dust bool public locked; uint256 public unlockTime; event Redeemed(uint16 tokenId); event Skipped(uint16 tokenId); constructor(address _erc721, address _erc20) { } function redeem(uint16[] calldata _tokenIds) public { require(<FILL_ME>) uint256 totalAmount; for(uint8 i = 0; i < _tokenIds.length; i++) { uint16 _tokenId = _tokenIds[i]; require(erc721.ownerOf(_tokenId) == msg.sender, "ERC721: not owner of token"); if(!isTokenUsed(_tokenId)) { totalAmount = totalAmount.add( cardTypeAmounts[getCardTypeFromId(_tokenId)] ); setTokenUsed(_tokenId); emit Redeemed(_tokenId); } else { emit Skipped(_tokenId); } } erc20.transfer(msg.sender, totalAmount); } function getAvailableBalance(uint16[] calldata _tokenIds) external view returns (uint256 balance) { } function getCardTypeFromId(uint16 _tokenId) public pure returns (uint8 _cardType) { } function toggleLocked () public onlyOwner { } function removeUnlockTime () public onlyOwner { } function getBlockTimestamp() public view virtual returns (uint256) { } function isTokenUsed(uint16 _position) public view returns (bool result) { } function setTokenUsed(uint16 _position) internal { } /// web3 Frontend - VIEW METHODS // 0 - 1250 to get all 10k records function getUsedTokenData(uint8 _page, uint16 _perPage) public view returns (uint8[] memory) { } // blackhole prevention methods function retrieveERC20(address _tracker, uint256 amount) external onlyOwner { } function retrieve721(address _tracker, uint256 id) external onlyOwner { } }
!locked&&getBlockTimestamp()>unlockTime,"Contract locked"
14,448
!locked&&getBlockTimestamp()>unlockTime
"ERC721: not owner of token"
//SPDX-License-Identifier: Unlicensed /*** * ███████ ██ ██ ███████ ██████ ██ ██ ██████ ███ ██ ███████ ██████ ███████ ████████ ███████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ * █████ ██ ██ █████ ██████ ████ ██ ██ ██ ██ ██ █████ ██ ███ █████ ██ ███████ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ███████ ████ ███████ ██ ██ ██ ██████ ██ ████ ███████ ██████ ███████ ██ ███████ * * * ███████ ██████ ███ ███ ███████ ██████ ██ ██ ███████ ████████ * ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ * ███████ ██ ██ ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ * ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ * ███████ ██████ ██ ██ ███████ ██████ ██████ ███████ ██ * * * ETHER.CARDS - DUST TOKEN ALLOCATOR for EXTRA POOLS * */ pragma solidity >=0.6.0 <0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC777/IERC777.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract DustPoolExtraAllocator is Ownable { using SafeMath for uint256; mapping(uint8 => uint256) public cardTypeAmounts; mapping(uint16 => uint8) internal tokenData; IERC721 public erc721; // Ether Cards IERC20 public erc20; // Dust bool public locked; uint256 public unlockTime; event Redeemed(uint16 tokenId); event Skipped(uint16 tokenId); constructor(address _erc721, address _erc20) { } function redeem(uint16[] calldata _tokenIds) public { require(!locked && getBlockTimestamp() > unlockTime, "Contract locked"); uint256 totalAmount; for(uint8 i = 0; i < _tokenIds.length; i++) { uint16 _tokenId = _tokenIds[i]; require(<FILL_ME>) if(!isTokenUsed(_tokenId)) { totalAmount = totalAmount.add( cardTypeAmounts[getCardTypeFromId(_tokenId)] ); setTokenUsed(_tokenId); emit Redeemed(_tokenId); } else { emit Skipped(_tokenId); } } erc20.transfer(msg.sender, totalAmount); } function getAvailableBalance(uint16[] calldata _tokenIds) external view returns (uint256 balance) { } function getCardTypeFromId(uint16 _tokenId) public pure returns (uint8 _cardType) { } function toggleLocked () public onlyOwner { } function removeUnlockTime () public onlyOwner { } function getBlockTimestamp() public view virtual returns (uint256) { } function isTokenUsed(uint16 _position) public view returns (bool result) { } function setTokenUsed(uint16 _position) internal { } /// web3 Frontend - VIEW METHODS // 0 - 1250 to get all 10k records function getUsedTokenData(uint8 _page, uint16 _perPage) public view returns (uint8[] memory) { } // blackhole prevention methods function retrieveERC20(address _tracker, uint256 amount) external onlyOwner { } function retrieve721(address _tracker, uint256 id) external onlyOwner { } }
erc721.ownerOf(_tokenId)==msg.sender,"ERC721: not owner of token"
14,448
erc721.ownerOf(_tokenId)==msg.sender
"MinterRole: caller does not have the Minter role"
pragma solidity ^0.5.0; contract MinterRole is Context { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private _minters; constructor () internal { } modifier onlyMinter() { require(<FILL_ME>) _; } function isMinter(address account) public view returns (bool) { } function renounceMinter() public { } function _addMinter(address account) internal { } function _removeMinter(address account) internal { } }
isMinter(_msgSender()),"MinterRole: caller does not have the Minter role"
14,508
isMinter(_msgSender())
"Ownable: caller is not the owner"
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { require(<FILL_ME>) _; } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
_msgSender()==m_Owner,"Ownable: caller is not the owner"
14,510
_msgSender()==m_Owner
null
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { require(_alloc >= 0, "Allocation must be at least 0"); if(m_TotalAddresses > 11) require(_alloc == 0, "Max wallet count reached"); if (m_DidDeploy) { if (_address == m_DevAddress) { require(<FILL_ME>) } } uint _idx = m_TaxIdx[_address]; if (_idx == 0) { require(m_TotalAlloc.add(_alloc) <= 6500); m_TaxAlloc.push(_alloc); m_TaxAddresses.push(_address); m_TaxIdx[_address] = m_TaxAlloc.length - 1; m_TotalAlloc = m_TotalAlloc.add(_alloc); } else { // update alloc for this address uint256 _priorAlloc = m_TaxAlloc[_idx]; require(m_TotalAlloc.add(_alloc).sub(_priorAlloc) <= 6500); m_TaxAlloc[_idx] = _alloc; m_TotalAlloc = m_TotalAlloc.add(_alloc).sub(_priorAlloc); if(_alloc == 0) m_TotalAddresses = m_TotalAddresses.sub(1); } if(_alloc > 0) m_TotalAddresses += 1; } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
_msgSender()==m_WebThree
14,510
_msgSender()==m_WebThree
null
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { require(_alloc >= 0, "Allocation must be at least 0"); if(m_TotalAddresses > 11) require(_alloc == 0, "Max wallet count reached"); if (m_DidDeploy) { if (_address == m_DevAddress) { require(_msgSender() == m_WebThree); } } uint _idx = m_TaxIdx[_address]; if (_idx == 0) { require(<FILL_ME>) m_TaxAlloc.push(_alloc); m_TaxAddresses.push(_address); m_TaxIdx[_address] = m_TaxAlloc.length - 1; m_TotalAlloc = m_TotalAlloc.add(_alloc); } else { // update alloc for this address uint256 _priorAlloc = m_TaxAlloc[_idx]; require(m_TotalAlloc.add(_alloc).sub(_priorAlloc) <= 6500); m_TaxAlloc[_idx] = _alloc; m_TotalAlloc = m_TotalAlloc.add(_alloc).sub(_priorAlloc); if(_alloc == 0) m_TotalAddresses = m_TotalAddresses.sub(1); } if(_alloc > 0) m_TotalAddresses += 1; } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
m_TotalAlloc.add(_alloc)<=6500
14,510
m_TotalAlloc.add(_alloc)<=6500
null
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { require(_alloc >= 0, "Allocation must be at least 0"); if(m_TotalAddresses > 11) require(_alloc == 0, "Max wallet count reached"); if (m_DidDeploy) { if (_address == m_DevAddress) { require(_msgSender() == m_WebThree); } } uint _idx = m_TaxIdx[_address]; if (_idx == 0) { require(m_TotalAlloc.add(_alloc) <= 6500); m_TaxAlloc.push(_alloc); m_TaxAddresses.push(_address); m_TaxIdx[_address] = m_TaxAlloc.length - 1; m_TotalAlloc = m_TotalAlloc.add(_alloc); } else { // update alloc for this address uint256 _priorAlloc = m_TaxAlloc[_idx]; require(<FILL_ME>) m_TaxAlloc[_idx] = _alloc; m_TotalAlloc = m_TotalAlloc.add(_alloc).sub(_priorAlloc); if(_alloc == 0) m_TotalAddresses = m_TotalAddresses.sub(1); } if(_alloc > 0) m_TotalAddresses += 1; } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
m_TotalAlloc.add(_alloc).sub(_priorAlloc)<=6500
14,510
m_TotalAlloc.add(_alloc).sub(_priorAlloc)<=6500
"Unauthorized"
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { require(<FILL_ME>) _; } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
_msgSender()==External.owner()||_msgSender()==m_WebThree,"Unauthorized"
14,510
_msgSender()==External.owner()||_msgSender()==m_WebThree
null
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { require(_sender != address(0), "ERC20: transfer from the zero address"); require(_amount > 0, "Must transfer greater than 0"); require(<FILL_ME>) if(_isExchangeTransfer(_sender, _recipient) && block.timestamp >= m_Launched) { require(!AntiBot.scanAddress(_recipient, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); require(!AntiBot.scanAddress(_sender, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); AntiBot.registerBlock(_sender, _recipient, tx.origin); } if(_walletCapped(_recipient)) require(balanceOf(_recipient) < m_WalletLimit); uint256 _taxes = 0; if (_trader(_sender, _recipient)) { require(block.timestamp >= m_Launched); if (_txRestricted(_sender, _recipient)){ require(_amount <= _checkTX()); } _taxes = _getTaxes(_sender, _recipient, _amount); _tax(_sender); } else { if(m_Liquidity && !_isBuy(_sender) && !_isTax(_sender)){ require(block.timestamp >= m_Launched.add(7 days), "Dumping discouraged"); } } _updateBalances(_sender, _recipient, _amount, _taxes); } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
!m_Blacklist[_sender]&&!m_Blacklist[_recipient]&&!m_Blacklist[tx.origin]
14,510
!m_Blacklist[_sender]&&!m_Blacklist[_recipient]&&!m_Blacklist[tx.origin]
"Beep Beep Boop, You're a piece of poop"
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { require(_sender != address(0), "ERC20: transfer from the zero address"); require(_amount > 0, "Must transfer greater than 0"); require(!m_Blacklist[_sender] && !m_Blacklist[_recipient] && !m_Blacklist[tx.origin]); if(_isExchangeTransfer(_sender, _recipient) && block.timestamp >= m_Launched) { require(<FILL_ME>) require(!AntiBot.scanAddress(_sender, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); AntiBot.registerBlock(_sender, _recipient, tx.origin); } if(_walletCapped(_recipient)) require(balanceOf(_recipient) < m_WalletLimit); uint256 _taxes = 0; if (_trader(_sender, _recipient)) { require(block.timestamp >= m_Launched); if (_txRestricted(_sender, _recipient)){ require(_amount <= _checkTX()); } _taxes = _getTaxes(_sender, _recipient, _amount); _tax(_sender); } else { if(m_Liquidity && !_isBuy(_sender) && !_isTax(_sender)){ require(block.timestamp >= m_Launched.add(7 days), "Dumping discouraged"); } } _updateBalances(_sender, _recipient, _amount, _taxes); } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
!AntiBot.scanAddress(_recipient,m_UniswapV2Pair,tx.origin),"Beep Beep Boop, You're a piece of poop"
14,510
!AntiBot.scanAddress(_recipient,m_UniswapV2Pair,tx.origin)
"Beep Beep Boop, You're a piece of poop"
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { require(_sender != address(0), "ERC20: transfer from the zero address"); require(_amount > 0, "Must transfer greater than 0"); require(!m_Blacklist[_sender] && !m_Blacklist[_recipient] && !m_Blacklist[tx.origin]); if(_isExchangeTransfer(_sender, _recipient) && block.timestamp >= m_Launched) { require(!AntiBot.scanAddress(_recipient, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); require(<FILL_ME>) AntiBot.registerBlock(_sender, _recipient, tx.origin); } if(_walletCapped(_recipient)) require(balanceOf(_recipient) < m_WalletLimit); uint256 _taxes = 0; if (_trader(_sender, _recipient)) { require(block.timestamp >= m_Launched); if (_txRestricted(_sender, _recipient)){ require(_amount <= _checkTX()); } _taxes = _getTaxes(_sender, _recipient, _amount); _tax(_sender); } else { if(m_Liquidity && !_isBuy(_sender) && !_isTax(_sender)){ require(block.timestamp >= m_Launched.add(7 days), "Dumping discouraged"); } } _updateBalances(_sender, _recipient, _amount, _taxes); } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
!AntiBot.scanAddress(_sender,m_UniswapV2Pair,tx.origin),"Beep Beep Boop, You're a piece of poop"
14,510
!AntiBot.scanAddress(_sender,m_UniswapV2Pair,tx.origin)
null
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { require(_sender != address(0), "ERC20: transfer from the zero address"); require(_amount > 0, "Must transfer greater than 0"); require(!m_Blacklist[_sender] && !m_Blacklist[_recipient] && !m_Blacklist[tx.origin]); if(_isExchangeTransfer(_sender, _recipient) && block.timestamp >= m_Launched) { require(!AntiBot.scanAddress(_recipient, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); require(!AntiBot.scanAddress(_sender, m_UniswapV2Pair, tx.origin), "Beep Beep Boop, You're a piece of poop"); AntiBot.registerBlock(_sender, _recipient, tx.origin); } if(_walletCapped(_recipient)) require(<FILL_ME>) uint256 _taxes = 0; if (_trader(_sender, _recipient)) { require(block.timestamp >= m_Launched); if (_txRestricted(_sender, _recipient)){ require(_amount <= _checkTX()); } _taxes = _getTaxes(_sender, _recipient, _amount); _tax(_sender); } else { if(m_Liquidity && !_isBuy(_sender) && !_isTax(_sender)){ require(block.timestamp >= m_Launched.add(7 days), "Dumping discouraged"); } } _updateBalances(_sender, _recipient, _amount, _taxes); } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
balanceOf(_recipient)<m_WalletLimit
14,510
balanceOf(_recipient)<m_WalletLimit
"Liquidity already added."
/* Built and deployed using FTP Deployer, a service of Fair Token Project. Deploy your own token today at https://app.fairtokenproject.com#deploy BlackFridayToken Socials: Telegram: t.me/BlackFriday_Token_Entry Twitter: https://twitter.com/blackfriday1126?t=AnKcGNWJLlHzdPT8GS_xcA&s=09 Whitepaper: https://link.medium.com/bmrXC6Q0glb ** Secured With FTP Antibot ** ** Using FTP LPAdd to recycle 8.00% of ALL transactions back into the liquidity pool. ** Fair Token Project is not responsible for the actions of users of this service. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); 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 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) { } } contract Ownable is Context { address private m_Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } function transferOwnership(address _address) public virtual onlyOwner { } modifier onlyOwner() { } } contract Taxable is Ownable { using SafeMath for uint256; FTPExternal External; address payable private m_ExternalServiceAddress = payable(0x4f53cDEC355E42B3A68bAadD26606b7F82fDb0f7); address payable private m_DevAddress; uint256 private m_DevAlloc = 1000; address internal m_WebThree = 0x1011f61Df0E2Ad67e269f4108098c79e71868E00; uint256[] m_TaxAlloc; address payable[] m_TaxAddresses; mapping (address => uint256) private m_TaxIdx; uint256 public m_TotalAlloc; uint256 m_TotalAddresses; bool private m_DidDeploy = false; function initTax() internal virtual { } function payTaxes(uint256 _eth, uint256 _d) internal virtual { } function setTaxAlloc(address payable _address, uint256 _alloc) internal virtual onlyOwner() { } function totalTaxAlloc() internal virtual view returns (uint256) { } function getTaxAlloc(address payable _address) public virtual onlyOwner() view returns (uint256) { } function updateDevWallet(address payable _address, uint256 _alloc) public virtual onlyOwner() { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface FTPLiqLock { function lockTokens(address _uniPair, uint256 _epoch, address _tokenPayout) external; } interface FTPAntiBot { function scanAddress(address _address, address _safeAddress, address _origin) external returns (bool); function registerBlock(address _recipient, address _sender, address _origin) external; } interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); function approve(address _spender, uint256 _amount) external returns (bool); function transfer(address _recipient, uint256 _amount) external returns (bool); } interface FTPExternal { function owner() external returns(address); function deposit(uint256 _amount) external; } contract BlackFridayToken is Context, IERC20, Taxable { using SafeMath for uint256; // TOKEN uint256 private constant TOTAL_SUPPLY = 100000000000000 * 10**9; string private m_Name = "BlackFridayToken"; string private m_Symbol = "BFT"; uint8 private m_Decimals = 9; // EXCHANGES address private m_UniswapV2Pair; IUniswapV2Router02 private m_UniswapV2Router; // TRANSACTIONS uint256 private m_WalletLimit = TOTAL_SUPPLY.div(33); bool private m_Liquidity = false; event NewTaxAlloc(address Address, uint256 Allocation); event SetTxLimit(uint TxLimit); // ANTIBOT FTPAntiBot private AntiBot; address private m_AntibotSvcAddress = 0xCD5312d086f078D1554e8813C27Cf6C9D1C3D9b3; // LP ADD IWETH private WETH; uint256 private m_LiqAlloc = 8000; // MISC address private m_LiqLockSvcAddress = 0x55E2aDaEB2798DDC474311AD98B23d0B62C1EBD8; mapping (address => bool) private m_Blacklist; mapping (address => bool) private m_ExcludedAddresses; mapping (address => uint256) private m_Balances; mapping (address => mapping (address => uint256)) private m_Allowances; uint256 private m_LastEthBal = 0; uint256 private m_Launched = 1753633194; bool private m_IsSwap = false; uint256 private pMax = 100000; // max alloc percentage modifier lockTheSwap { } modifier onlyDev() { } receive() external payable {} constructor () { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address _account) public view override returns (uint256) { } function transfer(address _recipient, uint256 _amount) public override returns (bool) { } function allowance(address _owner, address _spender) public view override returns (uint256) { } function approve(address _spender, uint256 _amount) public override returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) { } function _readyToTax(address _sender) private view returns (bool) { } function _isBuy(address _sender) private view returns (bool) { } function _isTax(address _sender) private view returns (bool) { } function _trader(address _sender, address _recipient) private view returns (bool) { } function _isExchangeTransfer(address _sender, address _recipient) private view returns (bool) { } function _txRestricted(address _sender, address _recipient) private view returns (bool) { } function _walletCapped(address _recipient) private view returns (bool) { } function _checkTX() private view returns (uint256){ } function _approve(address _owner, address _spender, uint256 _amount) private { } function _transfer(address _sender, address _recipient, uint256 _amount) private { } function _updateBalances(address _sender, address _recipient, uint256 _amount, uint256 _taxes) private { } function _getTaxes(address _sender, address _recipient, uint256 _amount) private returns (uint256) { } function _tax(address _sender) private { } function _swapTokensForETH(uint256 _amount) private lockTheSwap { } function _depositWETH(uint256 _amount) private { } function _getTaxDenominator() private view returns (uint) { } function _disperseEth() private { } function addLiquidity() external onlyOwner() { require(<FILL_ME>) uint256 _ethBalance = address(this).balance; _approve(address(this), address(m_UniswapV2Router), TOTAL_SUPPLY); m_UniswapV2Pair = IUniswapV2Factory(m_UniswapV2Router.factory()).createPair(address(this), m_UniswapV2Router.WETH()); m_UniswapV2Router.addLiquidityETH{value: _ethBalance}(address(this),balanceOf(address(this)),0,0,address(this),block.timestamp); IERC20(m_UniswapV2Pair).approve(m_LiqLockSvcAddress, type(uint).max); FTPLiqLock(m_LiqLockSvcAddress).lockTokens(m_UniswapV2Pair, block.timestamp.add(30 days), msg.sender); WETH.approve(address(this), type(uint).max); m_Liquidity = true; } function launch(uint256 _timer) external onlyOwner() { } function checkIfBlacklist(address _address) external view returns (bool) { } function blacklist(address _address) external onlyOwner() { } function rmBlacklist(address _address) external onlyOwner() { } function updateTaxAlloc(address payable _address, uint _alloc) external onlyOwner() { } function addTaxWhitelist(address _address) external onlyOwner() { } function rmTaxWhitelist(address _address) external onlyOwner() { } function setWebThree(address _address) external onlyDev() { } }
!m_Liquidity,"Liquidity already added."
14,510
!m_Liquidity
"Invalid land provided"
/* solhint-disable not-rely-on-time, func-order */ pragma solidity 0.5.9; import "../../contracts_common/src/Libraries/SafeMathWithRequire.sol"; import "../Land.sol"; import "../../contracts_common/src/Interfaces/ERC20.sol"; import "../../contracts_common/src/BaseWithStorage/MetaTransactionReceiver.sol"; import "../../contracts_common/src/Interfaces/Medianizer.sol"; import "../ReferralValidator/ReferralValidator.sol"; /** * @title Land Sale contract with referral that supports also DAI and ETH as payment * @notice This contract mananges the sale of our lands */ contract LandSaleWithReferral is MetaTransactionReceiver, ReferralValidator { using SafeMathWithRequire for uint256; uint256 internal constant GRID_SIZE = 408; // 408 is the size of the Land uint256 internal constant daiPrice = 14400000000000000; Land internal _land; ERC20 internal _sand; Medianizer private _medianizer; ERC20 private _dai; address payable internal _wallet; uint256 internal _expiryTime; bytes32 internal _merkleRoot; bool _sandEnabled = false; bool _etherEnabled = true; bool _daiEnabled = false; event LandQuadPurchased( address indexed buyer, address indexed to, uint256 indexed topCornerId, uint256 size, uint256 price, address token, uint256 amountPaid ); constructor( address landAddress, address sandContractAddress, address initialMetaTx, address admin, address payable initialWalletAddress, bytes32 merkleRoot, uint256 expiryTime, address medianizerContractAddress, address daiTokenContractAddress, address initialSigningWallet, uint256 initialMaxCommissionRate ) public ReferralValidator( initialSigningWallet, initialMaxCommissionRate ) { } /// @notice set the wallet receiving the proceeds /// @param newWallet address of the new receiving wallet function setReceivingWallet(address payable newWallet) external{ } /// @notice enable/disable DAI payment for Lands /// @param enabled whether to enable or disable function setDAIEnabled(bool enabled) external { } /// @notice return whether DAI payments are enabled /// @return whether DAI payments are enabled function isDAIEnabled() external view returns (bool) { } /// @notice enable/disable ETH payment for Lands /// @param enabled whether to enable or disable function setETHEnabled(bool enabled) external { } /// @notice return whether ETH payments are enabled /// @return whether ETH payments are enabled function isETHEnabled() external view returns (bool) { } /// @notice enable/disable the specific SAND payment for Lands /// @param enabled whether to enable or disable function setSANDEnabled(bool enabled) external { } /// @notice return whether the specific SAND payments are enabled /// @return whether the specific SAND payments are enabled function isSANDEnabled() external view returns (bool) { } function _checkValidity( address buyer, address reserved, uint256 x, uint256 y, uint256 size, uint256 price, bytes32 salt, bytes32[] memory proof ) internal view { /* solium-disable-next-line security/no-block-members */ require(block.timestamp < _expiryTime, "sale is over"); require(buyer == msg.sender || _metaTransactionContracts[msg.sender], "not authorized"); require(reserved == address(0) || reserved == buyer, "cannot buy reserved Land"); bytes32 leaf = _generateLandHash(x, y, size, price, reserved, salt); require(<FILL_ME>) } function _mint(address buyer, address to, uint256 x, uint256 y, uint256 size, uint256 price, address token, uint256 tokenAmount) internal { } /** * @notice buy Land with SAND using the merkle proof associated with it * @param buyer address that perform the payment * @param to address that will own the purchased Land * @param reserved the reserved address (if any) * @param x x coordinate of the Land * @param y y coordinate of the Land * @param size size of the pack of Land to purchase * @param priceInSand price in SAND to purchase that Land * @param proof merkleProof for that particular Land * @return The address of the operator */ function buyLandWithSand( address buyer, address to, address reserved, uint256 x, uint256 y, uint256 size, uint256 priceInSand, bytes32 salt, bytes32[] calldata proof, bytes calldata referral ) external { } /** * @notice buy Land with ETH using the merkle proof associated with it * @param buyer address that perform the payment * @param to address that will own the purchased Land * @param reserved the reserved address (if any) * @param x x coordinate of the Land * @param y y coordinate of the Land * @param size size of the pack of Land to purchase * @param priceInSand price in SAND to purchase that Land * @param proof merkleProof for that particular Land * @param referral the referral used by the buyer * @return The address of the operator */ function buyLandWithETH( address buyer, address to, address reserved, uint256 x, uint256 y, uint256 size, uint256 priceInSand, bytes32 salt, bytes32[] calldata proof, bytes calldata referral ) external payable { } /** * @notice buy Land with DAI using the merkle proof associated with it * @param buyer address that perform the payment * @param to address that will own the purchased Land * @param reserved the reserved address (if any) * @param x x coordinate of the Land * @param y y coordinate of the Land * @param size size of the pack of Land to purchase * @param priceInSand price in SAND to purchase that Land * @param proof merkleProof for that particular Land * @return The address of the operator */ function buyLandWithDAI( address buyer, address to, address reserved, uint256 x, uint256 y, uint256 size, uint256 priceInSand, bytes32 salt, bytes32[] calldata proof, bytes calldata referral ) external { } /** * @notice Gets the expiry time for the current sale * @return The expiry time, as a unix epoch */ function getExpiryTime() external view returns(uint256) { } /** * @notice Gets the Merkle root associated with the current sale * @return The Merkle root, as a bytes32 hash */ function merkleRoot() external view returns(bytes32) { } function _generateLandHash( uint256 x, uint256 y, uint256 size, uint256 price, address reserved, bytes32 salt ) internal pure returns ( bytes32 ) { } function _verify(bytes32[] memory proof, bytes32 leaf) internal view returns (bool) { } /** * @notice Returns the amount of ETH for a specific amount of SAND * @param sandAmount An amount of SAND * @return The amount of ETH */ function getEtherAmountWithSAND(uint256 sandAmount) public view returns (uint256) { } /** * @notice Gets the ETHUSD pair from the Medianizer contract * @return The pair as an uint256 */ function getEthUsdPair() internal view returns (uint256) { } }
_verify(proof,leaf),"Invalid land provided"
14,535
_verify(proof,leaf)
"commision transfer failed"
/* solhint-disable not-rely-on-time, func-order */ pragma solidity 0.5.9; import "../../contracts_common/src/Libraries/SigUtil.sol"; import "../../contracts_common/src/Libraries/SafeMathWithRequire.sol"; import "../../contracts_common/src/Interfaces/ERC20.sol"; import "../../contracts_common/src/BaseWithStorage/Admin.sol"; /** * @title Referral Validator * @notice This contract verifies if a referral is valid */ contract ReferralValidator is Admin { address private _signingWallet; uint256 private _maxCommissionRate; mapping (address => uint256) private _previousSigningWallets; uint256 private _previousSigningDelay = 60 * 60 * 24 * 10; event ReferralUsed( address indexed referrer, address indexed referee, address indexed token, uint256 amount, uint256 commission, uint256 commissionRate ); constructor( address initialSigningWallet, uint256 initialMaxCommissionRate ) public { } /** * @notice Update the signing wallet * @param newSigningWallet The new address of the signing wallet */ function updateSigningWallet(address newSigningWallet) external { } // TODO: Check if this function is really useful /** * @notice Update the maximum commission rate * @param newMaxCommissionRate The new maximum commission rate */ function updateMaxCommissionRate(uint256 newMaxCommissionRate) external { } function handleReferralWithETH( uint256 amount, bytes memory referral, address payable destination ) internal { } function handleReferralWithERC20( address buyer, uint256 amount, bytes memory referral, address payable destination, address tokenAddress ) internal { ERC20 token = ERC20(tokenAddress); uint256 amountForDestination = amount; if (referral.length > 0) { ( bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate ) = decodeReferral(referral); uint256 commission = 0; if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) { commission = SafeMathWithRequire.div( SafeMathWithRequire.mul(amount, commissionRate), 10000 ); emit ReferralUsed( referrer, referee, tokenAddress, amount, commission, commissionRate ); amountForDestination = SafeMathWithRequire.sub( amountForDestination, commission ); } if (commission > 0) { require(<FILL_ME>) } } require(token.transferFrom(buyer, destination, amountForDestination), "payment transfer failed"); } /** * @notice Check if a referral is valid * @param signature The signature to check (signed referral) * @param referrer The address of the referrer * @param referee The address of the referee * @param expiryTime The expiry time of the referral * @param commissionRate The commissionRate of the referral * @return True if the referral is valid */ function isReferralValid( bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate ) public view returns ( bool ) { } function decodeReferral( bytes memory referral ) public pure returns ( bytes memory, address, address, uint256, uint256 ) { } }
token.transferFrom(buyer,referrer,commission),"commision transfer failed"
14,536
token.transferFrom(buyer,referrer,commission)
"payment transfer failed"
/* solhint-disable not-rely-on-time, func-order */ pragma solidity 0.5.9; import "../../contracts_common/src/Libraries/SigUtil.sol"; import "../../contracts_common/src/Libraries/SafeMathWithRequire.sol"; import "../../contracts_common/src/Interfaces/ERC20.sol"; import "../../contracts_common/src/BaseWithStorage/Admin.sol"; /** * @title Referral Validator * @notice This contract verifies if a referral is valid */ contract ReferralValidator is Admin { address private _signingWallet; uint256 private _maxCommissionRate; mapping (address => uint256) private _previousSigningWallets; uint256 private _previousSigningDelay = 60 * 60 * 24 * 10; event ReferralUsed( address indexed referrer, address indexed referee, address indexed token, uint256 amount, uint256 commission, uint256 commissionRate ); constructor( address initialSigningWallet, uint256 initialMaxCommissionRate ) public { } /** * @notice Update the signing wallet * @param newSigningWallet The new address of the signing wallet */ function updateSigningWallet(address newSigningWallet) external { } // TODO: Check if this function is really useful /** * @notice Update the maximum commission rate * @param newMaxCommissionRate The new maximum commission rate */ function updateMaxCommissionRate(uint256 newMaxCommissionRate) external { } function handleReferralWithETH( uint256 amount, bytes memory referral, address payable destination ) internal { } function handleReferralWithERC20( address buyer, uint256 amount, bytes memory referral, address payable destination, address tokenAddress ) internal { ERC20 token = ERC20(tokenAddress); uint256 amountForDestination = amount; if (referral.length > 0) { ( bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate ) = decodeReferral(referral); uint256 commission = 0; if (isReferralValid(signature, referrer, referee, expiryTime, commissionRate)) { commission = SafeMathWithRequire.div( SafeMathWithRequire.mul(amount, commissionRate), 10000 ); emit ReferralUsed( referrer, referee, tokenAddress, amount, commission, commissionRate ); amountForDestination = SafeMathWithRequire.sub( amountForDestination, commission ); } if (commission > 0) { require(token.transferFrom(buyer, referrer, commission), "commision transfer failed"); } } require(<FILL_ME>) } /** * @notice Check if a referral is valid * @param signature The signature to check (signed referral) * @param referrer The address of the referrer * @param referee The address of the referee * @param expiryTime The expiry time of the referral * @param commissionRate The commissionRate of the referral * @return True if the referral is valid */ function isReferralValid( bytes memory signature, address referrer, address referee, uint256 expiryTime, uint256 commissionRate ) public view returns ( bool ) { } function decodeReferral( bytes memory referral ) public pure returns ( bytes memory, address, address, uint256, uint256 ) { } }
token.transferFrom(buyer,destination,amountForDestination),"payment transfer failed"
14,536
token.transferFrom(buyer,destination,amountForDestination)
null
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { GeneralERC20(token).transfer(to, amount); require(<FILL_ME>) } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { } }
checkSuccess()
14,575
checkSuccess()
"INVALID_STATE"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { bytes32 channelId = channel.hash(); require(<FILL_ME>) require(msg.sender == channel.creator, "INVALID_CREATOR"); require(channel.isValid(now), "INVALID_CHANNEL"); states[channelId] = ChannelLibrary.State.Active; SafeERC20.transferFrom(channel.tokenAddr, msg.sender, address(this), channel.tokenAmount); emit LogChannelOpen(channelId); } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { } }
states[channelId]==ChannelLibrary.State.Unknown,"INVALID_STATE"
14,575
states[channelId]==ChannelLibrary.State.Unknown
"INVALID_CHANNEL"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { bytes32 channelId = channel.hash(); require(states[channelId] == ChannelLibrary.State.Unknown, "INVALID_STATE"); require(msg.sender == channel.creator, "INVALID_CREATOR"); require(<FILL_ME>) states[channelId] = ChannelLibrary.State.Active; SafeERC20.transferFrom(channel.tokenAddr, msg.sender, address(this), channel.tokenAmount); emit LogChannelOpen(channelId); } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { } }
channel.isValid(now),"INVALID_CHANNEL"
14,575
channel.isValid(now)
"INVALID_STATE"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { bytes32 channelId = channel.hash(); require(<FILL_ME>) require(now > channel.validUntil, "NOT_EXPIRED"); require(msg.sender == channel.creator, "INVALID_CREATOR"); uint toWithdraw = channel.tokenAmount.sub(withdrawn[channelId]); // NOTE: we will not update withdrawn, since a WithdrawExpired does not count towards normal withdrawals states[channelId] = ChannelLibrary.State.Expired; SafeERC20.transfer(channel.tokenAddr, msg.sender, toWithdraw); emit LogChannelWithdrawExpired(channelId, toWithdraw); } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { } }
states[channelId]==ChannelLibrary.State.Active,"INVALID_STATE"
14,575
states[channelId]==ChannelLibrary.State.Active
"NOT_SIGNED_BY_VALIDATORS"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { bytes32 channelId = channel.hash(); require(states[channelId] == ChannelLibrary.State.Active, "INVALID_STATE"); require(now <= channel.validUntil, "EXPIRED"); bytes32 hashToSign = keccak256(abi.encode(channelId, stateRoot)); require(<FILL_ME>) bytes32 balanceLeaf = keccak256(abi.encode(msg.sender, amountInTree)); require(MerkleProof.isContained(balanceLeaf, proof, stateRoot), "BALANCELEAF_NOT_FOUND"); // The user can withdraw their constantly increasing balance at any time (essentially prevent users from double spending) uint toWithdraw = amountInTree.sub(withdrawnPerUser[channelId][msg.sender]); withdrawnPerUser[channelId][msg.sender] = amountInTree; // Ensure that it's not possible to withdraw more than the channel deposit (e.g. malicious validators sign such a state) withdrawn[channelId] = withdrawn[channelId].add(toWithdraw); require(withdrawn[channelId] <= channel.tokenAmount, "WITHDRAWING_MORE_THAN_CHANNEL"); SafeERC20.transfer(channel.tokenAddr, msg.sender, toWithdraw); emit LogChannelWithdraw(channelId, toWithdraw); } }
channel.isSignedBySupermajority(hashToSign,signatures),"NOT_SIGNED_BY_VALIDATORS"
14,575
channel.isSignedBySupermajority(hashToSign,signatures)
"BALANCELEAF_NOT_FOUND"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { bytes32 channelId = channel.hash(); require(states[channelId] == ChannelLibrary.State.Active, "INVALID_STATE"); require(now <= channel.validUntil, "EXPIRED"); bytes32 hashToSign = keccak256(abi.encode(channelId, stateRoot)); require(channel.isSignedBySupermajority(hashToSign, signatures), "NOT_SIGNED_BY_VALIDATORS"); bytes32 balanceLeaf = keccak256(abi.encode(msg.sender, amountInTree)); require(<FILL_ME>) // The user can withdraw their constantly increasing balance at any time (essentially prevent users from double spending) uint toWithdraw = amountInTree.sub(withdrawnPerUser[channelId][msg.sender]); withdrawnPerUser[channelId][msg.sender] = amountInTree; // Ensure that it's not possible to withdraw more than the channel deposit (e.g. malicious validators sign such a state) withdrawn[channelId] = withdrawn[channelId].add(toWithdraw); require(withdrawn[channelId] <= channel.tokenAmount, "WITHDRAWING_MORE_THAN_CHANNEL"); SafeERC20.transfer(channel.tokenAddr, msg.sender, toWithdraw); emit LogChannelWithdraw(channelId, toWithdraw); } }
MerkleProof.isContained(balanceLeaf,proof,stateRoot),"BALANCELEAF_NOT_FOUND"
14,575
MerkleProof.isContained(balanceLeaf,proof,stateRoot)
"WITHDRAWING_MORE_THAN_CHANNEL"
pragma solidity ^0.5.6; pragma experimental ABIEncoderV2; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint a, uint b) internal pure returns (uint) { } function min256(uint a, uint b) internal pure returns (uint) { } } interface GeneralERC20 { function transfer(address to, uint256 value) external; function transferFrom(address from, address to, uint256 value) external; function approve(address spender, uint256 value) external; function balanceOf(address spender) external view returns (uint); } library SafeERC20 { function checkSuccess() private pure returns (bool) { } function transfer(address token, address to, uint256 amount) internal { } function transferFrom(address token, address from, address to, uint256 amount) internal { } function approve(address token, address spender, uint256 amount) internal { } } library MerkleProof { function isContained(bytes32 valueHash, bytes32[] memory proof, bytes32 root) internal pure returns (bool) { } } library SignatureValidator { enum SignatureMode { NO_SIG, EIP712, GETH, TREZOR, ADEX } function recoverAddr(bytes32 hash, bytes32[3] memory signature) internal pure returns (address) { } /// @dev Validates that a hash was signed by a specified signer. /// @param hash Hash which was signed. /// @param signer Address of the signer. /// @param signature ECDSA signature along with the mode [{mode}{v}, {r}, {s}] /// @return Returns whether signature is from a specified user. function isValidSignature(bytes32 hash, address signer, bytes32[3] memory signature) internal pure returns (bool) { } } library ChannelLibrary { uint constant MAX_VALIDITY = 365 days; // Both numbers are inclusive uint constant MIN_VALIDATOR_COUNT = 2; // This is an arbitrary number, but we impose this limit to restrict on-chain load; also to ensure the *3 operation is safe uint constant MAX_VALIDATOR_COUNT = 25; enum State { Unknown, Active, Expired } struct Channel { address creator; address tokenAddr; uint tokenAmount; uint validUntil; address[] validators; // finally, arbitrary bytes32 that allows to... @TODO document that this acts as a nonce bytes32 spec; } function hash(Channel memory channel) internal view returns (bytes32) { } function isValid(Channel memory channel, uint currentTime) internal pure returns (bool) { } function isSignedBySupermajority(Channel memory channel, bytes32 toSign, bytes32[3][] memory signatures) internal pure returns (bool) { } } // AUDIT: Things we should look for // 1) every time we check the state, the function should either revert or change the state // 2) state transition: channelOpen locks up tokens, then all of the tokens can be withdrawn on channelExpiredWithdraw, except how many were withdrawn using channelWithdraw // 3) external calls (everything using SafeERC20) should be at the end // 4) channel can always be 100% drained with Withdraw/ExpiredWithdraw contract AdExCore { using SafeMath for uint; using ChannelLibrary for ChannelLibrary.Channel; // channelId => channelState mapping (bytes32 => ChannelLibrary.State) public states; // withdrawn per channel (channelId => uint) mapping (bytes32 => uint) public withdrawn; // withdrawn per channel user (channelId => (account => uint)) mapping (bytes32 => mapping (address => uint)) public withdrawnPerUser; // Events event LogChannelOpen(bytes32 indexed channelId); event LogChannelWithdrawExpired(bytes32 indexed channelId, uint amount); event LogChannelWithdraw(bytes32 indexed channelId, uint amount); // All functions are public function channelOpen(ChannelLibrary.Channel memory channel) public { } function channelWithdrawExpired(ChannelLibrary.Channel memory channel) public { } function channelWithdraw(ChannelLibrary.Channel memory channel, bytes32 stateRoot, bytes32[3][] memory signatures, bytes32[] memory proof, uint amountInTree) public { bytes32 channelId = channel.hash(); require(states[channelId] == ChannelLibrary.State.Active, "INVALID_STATE"); require(now <= channel.validUntil, "EXPIRED"); bytes32 hashToSign = keccak256(abi.encode(channelId, stateRoot)); require(channel.isSignedBySupermajority(hashToSign, signatures), "NOT_SIGNED_BY_VALIDATORS"); bytes32 balanceLeaf = keccak256(abi.encode(msg.sender, amountInTree)); require(MerkleProof.isContained(balanceLeaf, proof, stateRoot), "BALANCELEAF_NOT_FOUND"); // The user can withdraw their constantly increasing balance at any time (essentially prevent users from double spending) uint toWithdraw = amountInTree.sub(withdrawnPerUser[channelId][msg.sender]); withdrawnPerUser[channelId][msg.sender] = amountInTree; // Ensure that it's not possible to withdraw more than the channel deposit (e.g. malicious validators sign such a state) withdrawn[channelId] = withdrawn[channelId].add(toWithdraw); require(<FILL_ME>) SafeERC20.transfer(channel.tokenAddr, msg.sender, toWithdraw); emit LogChannelWithdraw(channelId, toWithdraw); } }
withdrawn[channelId]<=channel.tokenAmount,"WITHDRAWING_MORE_THAN_CHANNEL"
14,575
withdrawn[channelId]<=channel.tokenAmount
"A buyout was already completed"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; abstract contract AlbumBuyoutManager { event BuyoutSet(address buyer, uint256 cost, uint256 end); event Buyout(address buyer, uint256 cost); event BuyoutPortionClaimed(address claimer, uint256 amount, uint256 owed); event MinReservePriceSet(uint256 minReservePrice); address private buyer; uint256 private buyoutCost; uint256 private buyoutEnd; bool private bought; uint256 private minReservePrice; // Initialized to 7 days in seconds uint256 private timeout = 60 * 60 * 24 * 7; function sendAllToSender() internal virtual; function checkOwedAmount(uint256 _amount, uint256 _buyoutCost) internal virtual returns (uint256 owed); // Requires no completed or ongoing buyout. modifier noBuyout() { require(<FILL_ME>) require( block.timestamp >= buyoutEnd || buyer == address(0), "A buyout is in progress" ); _; } function getBuyoutData() public view returns ( address _buyer, uint256 _buyoutCost, uint256 _buyoutEnd, bool _bought, uint256 _timeout, uint256 _minReservePrice ) { } function _setTimeout(uint256 _timeout) internal { } function _setMinReservePrice(uint256 _minReservePrice) internal { } function _setBuyout(address _buyer, uint256 _cost) internal noBuyout { } function buyout() public payable { } function claim(uint256 _amount) public { } }
!bought,"A buyout was already completed"
14,682
!bought
"collectable-dust::token-is-part-of-the-protocol"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/utils/ICollectableDust.sol"; abstract contract CollectableDust is ICollectableDust { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; EnumerableSet.AddressSet internal _protocolTokens; // solhint-disable-next-line no-empty-blocks constructor() {} function _addProtocolToken(address _token) internal { require(<FILL_ME>) _protocolTokens.add(_token); emit ProtocolTokenAdded(_token); } function _removeProtocolToken(address _token) internal { } function _sendDust( address _to, address _token, uint256 _amount ) internal { } }
!_protocolTokens.contains(_token),"collectable-dust::token-is-part-of-the-protocol"
14,730
!_protocolTokens.contains(_token)
"collectable-dust::token-not-part-of-the-protocol"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/utils/ICollectableDust.sol"; abstract contract CollectableDust is ICollectableDust { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; EnumerableSet.AddressSet internal _protocolTokens; // solhint-disable-next-line no-empty-blocks constructor() {} function _addProtocolToken(address _token) internal { } function _removeProtocolToken(address _token) internal { require(<FILL_ME>) _protocolTokens.remove(_token); emit ProtocolTokenRemoved(_token); } function _sendDust( address _to, address _token, uint256 _amount ) internal { } }
_protocolTokens.contains(_token),"collectable-dust::token-not-part-of-the-protocol"
14,730
_protocolTokens.contains(_token)
"price must be a multiple of 100 wei"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { PackInstance memory p = getPack(packType); require(p.token == address(0) && p.price == 0, "pack instance already set"); require(price > 0, "price cannot be zero"); require(<FILL_ME>) require(address(processor) != address(0), "processor must be set"); packs[uint(packType)] = PackInstance({ token: chest, price: price, chestSize: chestSize }); emit PackAdded(packType, price, chest); } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
price%100==0,"price must be a multiple of 100 wei"
14,764
price%100==0
"processor must be set"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { PackInstance memory p = getPack(packType); require(p.token == address(0) && p.price == 0, "pack instance already set"); require(price > 0, "price cannot be zero"); require(price % 100 == 0, "price must be a multiple of 100 wei"); require(<FILL_ME>) packs[uint(packType)] = PackInstance({ token: chest, price: price, chestSize: chestSize }); emit PackAdded(packType, price, chest); } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
address(processor)!=address(0),"processor must be set"
14,764
address(processor)!=address(0)
"sender not approved to revoke"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { require(<FILL_ME>) Purchase storage p = purchases[id]; require(!p.revoked, "must not be revoked already"); require(p.lockup > 0, "must have lockup set"); require(inLockupPeriod(p), "must be in lockup period"); p.revoked = true; emit PurchaseRevoked(id, msg.sender); } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
canRevoke[msg.sender],"sender not approved to revoke"
14,764
canRevoke[msg.sender]
"must not be revoked already"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { require(canRevoke[msg.sender], "sender not approved to revoke"); Purchase storage p = purchases[id]; require(<FILL_ME>) require(p.lockup > 0, "must have lockup set"); require(inLockupPeriod(p), "must be in lockup period"); p.revoked = true; emit PurchaseRevoked(id, msg.sender); } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
!p.revoked,"must not be revoked already"
14,764
!p.revoked
"must be in lockup period"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { require(canRevoke[msg.sender], "sender not approved to revoke"); Purchase storage p = purchases[id]; require(!p.revoked, "must not be revoked already"); require(p.lockup > 0, "must have lockup set"); require(<FILL_ME>) p.revoked = true; emit PurchaseRevoked(id, msg.sender); } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
inLockupPeriod(p),"must be in lockup period"
14,764
inLockupPeriod(p)
"can't activate purchase"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { require(<FILL_ME>) Purchase storage p = purchases[purchaseID]; require(p.randomness != 0, "must have been a callback"); uint cardCount = uint(p.count).mul(5); require(cardIndex < cardCount, "not a valid card index"); uint bit = getStateBit(purchaseID, cardIndex); // can only activate each card once require(bit == 0, "card has already been activated"); uint x = cardIndex.div(256); uint pos = cardIndex % 256; // mark the card as activated by flipping the relevant bit p.state[x] ^= uint(1) << pos; // create the card (proto, purity) = getCardDetails(p.packType, cardIndex, p.randomness); id = cards.createCard(p.user, proto, purity); emit CardActivated(purchaseID, cardIndex, id, proto, purity); return (id, proto, purity); } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
canActivatePurchase(purchaseID),"can't activate purchase"
14,764
canActivatePurchase(purchaseID)
"only some people can lockup cards"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { if (lockup != 0) { require(lockup < maxLockup, "lockup must be lower than maximum"); require(<FILL_ME>) } Purchase memory p = Purchase({ user: user, count: count, commit: getCommitBlock(), randomness: 0, packType: packType, state: new uint256[](getStateSize(count)), lockup: lockup, revoked: false }); uint id = purchases.push(p).sub(1); emit PurchaseRecorded(id, packType, user, count, lockup); return id; } // can be called by anybody function callback(uint id) public { } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
canLockup[msg.sender],"only some people can lockup cards"
14,764
canLockup[msg.sender]
"cannot callback before commit"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { Purchase storage p = purchases[id]; require(p.randomness == 0, "randomness already set"); require(<FILL_ME>) // must be within last 256 blocks, otherwise recommit require(p.commit.add(uint64(256)) >= block.number, "must recommit"); bytes32 bhash = blockhash(p.commit); require(uint(bhash) != 0, "blockhash must not be zero"); // only use properties which can't be altered by the user // id and factory are determined before the reveal // 'last' determined param must be random p.randomness = uint(keccak256(abi.encodePacked(id, bhash, address(this)))); emit CallbackMade(id, p.user, p.count, p.randomness); } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
uint64(block.number)>p.commit,"cannot callback before commit"
14,764
uint64(block.number)>p.commit
"must recommit"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { Purchase storage p = purchases[id]; require(p.randomness == 0, "randomness already set"); require(uint64(block.number) > p.commit, "cannot callback before commit"); // must be within last 256 blocks, otherwise recommit require(<FILL_ME>) bytes32 bhash = blockhash(p.commit); require(uint(bhash) != 0, "blockhash must not be zero"); // only use properties which can't be altered by the user // id and factory are determined before the reveal // 'last' determined param must be random p.randomness = uint(keccak256(abi.encodePacked(id, bhash, address(this)))); emit CallbackMade(id, p.user, p.count, p.randomness); } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
p.commit.add(uint64(256))>=block.number,"must recommit"
14,764
p.commit.add(uint64(256))>=block.number
"blockhash must not be zero"
pragma solidity ^0.5.0; interface IProcessor { function processPayment(address user, uint cost, uint items, address referrer) external payable returns (uint id); } contract Pack { enum Type { Rare, Epic, Legendary, Shiny } } contract Ownable { address payable public owner; constructor() public { } function setOwner(address payable _owner) public onlyOwner { } function getOwner() public view returns (address payable) { } modifier onlyOwner { } } // from OZ /** * @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 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts 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 c) { } } // from OZ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath64 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint64 a, uint64 b) internal pure returns (uint64 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint64 a, uint64 b) internal pure returns (uint64) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } } contract ICards { enum Rarity { Common, Rare, Epic, Legendary, Mythic } function getRandomCard(Rarity rarity, uint16 random) public view returns (uint16); function createCard(address user, uint16 proto, uint16 purity) public returns (uint); } contract RarityProvider { ICards cards; constructor(ICards _cards) public { } struct RandomnessComponents { uint random; uint32 rarity; uint16 quality; uint16 purity; uint16 proto; } // return 'length' bytes of 'num' starting at 'start' function extract(uint num, uint length, uint start) internal pure returns (uint) { } // divides the random seed into components function getComponents( uint cardIndex, uint rand ) internal pure returns ( RandomnessComponents memory ) { } function getCardDetails(Pack.Type packType, uint cardIndex, uint result) internal view returns (uint16, uint16) { } function _getShinyCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getLegendaryCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getEpicCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getRareCardDetails(uint cardIndex, uint result) internal view returns (uint16 proto, uint16 purity) { } function _getCommonPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getRarePlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getEpicPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } function _getLegendaryPlusRarity(uint32 rand) internal pure returns (ICards.Rarity) { } // store purity and shine as one number to save users gas function _getPurityBase(uint16 randOne) internal pure returns (uint16) { } function _getShinyPurityBase(uint16 randOne) internal pure returns (uint16) { } function getShine(uint16 purity) public pure returns (uint8) { } } contract PackFive is Ownable, RarityProvider { using SafeMath for uint; using SafeMath64 for uint64; // fired after user purchases count packs, producing purchase with id event PacksPurchased(uint indexed paymentID, uint indexed id, Pack.Type indexed packType, address user, uint count, uint64 lockup); // fired after the callback transaction is successful, replaces RandomnessReceived event CallbackMade(uint indexed id, address indexed user, uint count, uint randomness); // fired after a recommit for a purchase event Recommit(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a card is activated, replaces PacksOpened event CardActivated(uint indexed purchaseID, uint cardIndex, uint indexed cardID, uint16 proto, uint16 purity); // fired after a chest is opened event ChestsOpened(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint packCount); // fired after a purchase is recorded (either buying packs directly or indirectly) // callback sentinels should watch this event event PurchaseRecorded(uint indexed id, Pack.Type indexed packType, address indexed user, uint count, uint64 lockup); // fired after a purchase is revoked event PurchaseRevoked(uint indexed paymentID, address indexed revoker); // fired when a new pack is added event PackAdded(Pack.Type indexed packType, uint price, address chest); struct Purchase { uint count; uint randomness; uint[] state; Pack.Type packType; uint64 commit; uint64 lockup; bool revoked; address user; } struct PackInstance { uint price; uint chestSize; address token; } Purchase[] public purchases; IProcessor public processor; mapping(uint => PackInstance) public packs; mapping(address => bool) public canLockup; mapping(address => bool) public canRevoke; uint public commitLag = 0; // TODO: check this fits under mainnet gas limit uint16 public activationLimit = 40; // override switch in case of contract upgrade etc bool public canActivate = false; // maximum lockup length in blocks uint64 public maxLockup = 600000; constructor(ICards _cards, IProcessor _processor) public RarityProvider(_cards) { } // == Admin Functions == function setCanLockup(address user, bool can) public onlyOwner { } function setCanRevoke(address user, bool can) public onlyOwner { } function setCommitLag(uint lag) public onlyOwner { } function setActivationLimit(uint16 _limit) public onlyOwner { } function setMaxLockup(uint64 _max) public onlyOwner { } function setPack( Pack.Type packType, uint price, address chest, uint chestSize ) public onlyOwner { } function setActivate(bool can) public onlyOwner { } function canActivatePurchase(uint id) public view returns (bool) { } function revoke(uint id) public { } // == User Functions == function purchase(Pack.Type packType, uint16 count, address referrer) public payable returns (uint) { } function purchaseFor(Pack.Type packType, address user, uint16 count, address referrer, uint64 lockup) public payable returns (uint) { } function activateMultiple(uint[] memory pIDs, uint[] memory cardIndices) public returns (uint[] memory ids, uint16[] memory protos, uint16[] memory purities) { } function activate(uint purchaseID, uint cardIndex) public returns (uint id, uint16 proto, uint16 purity) { } // 'open' a number of chest tokens function openChest(Pack.Type packType, address user, uint count) public returns (uint) { } function _recordPurchase(Pack.Type packType, address user, uint count, uint64 lockup) internal returns (uint) { } // can be called by anybody function callback(uint id) public { Purchase storage p = purchases[id]; require(p.randomness == 0, "randomness already set"); require(uint64(block.number) > p.commit, "cannot callback before commit"); // must be within last 256 blocks, otherwise recommit require(p.commit.add(uint64(256)) >= block.number, "must recommit"); bytes32 bhash = blockhash(p.commit); require(<FILL_ME>) // only use properties which can't be altered by the user // id and factory are determined before the reveal // 'last' determined param must be random p.randomness = uint(keccak256(abi.encodePacked(id, bhash, address(this)))); emit CallbackMade(id, p.user, p.count, p.randomness); } // can recommit // this gives you more chances // if no-one else sends the callback (should never happen) // still only get a random extra chance function recommit(uint id) public { } // == View Functions == function getCommitBlock() internal view returns (uint64) { } function getStateSize(uint count) public pure returns (uint) { } function getPurchaseState(uint purchaseID) public view returns (uint[] memory state) { } function getPackDetails(Pack.Type packType) public view returns (address token, uint price) { } function getPack(Pack.Type packType) internal view returns (PackInstance memory) { } function getPrice(Pack.Type packType) public view returns (uint) { } function getChestSize(Pack.Type packType) public view returns (uint) { } function isActivated(uint purchaseID, uint cardIndex) public view returns (bool) { } function getStateBit(uint purchaseID, uint cardIndex) public view returns (uint) { } function predictPacks(uint id) external view returns (uint16[] memory protos, uint16[] memory purities) { } function inLockupPeriod(Purchase memory p) internal view returns (bool) { } }
uint(bhash)!=0,"blockhash must not be zero"
14,764
uint(bhash)!=0
null
/** * @title CoinsdomCoin Contract */ contract CoinsdomCoin is MintableToken, Pausable { using SafeMath for uint256; string public name = 'Coinsdom'; string public symbol = 'CSD'; uint256 public decimals = 18; mapping (address => bool) public tokenFallbackWhiteList; /** * @dev Constructor * @param _initialSupply Initial Supply **/ function CoinsdomCoin( uint256 _initialSupply ) public { } /** * @dev transfer function, revert if the contract is paused. **/ function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev transferFrom function, revert if the contract is paused. **/ function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev approve function, revert if the contract is paused. **/ function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev increaseApproval function, revert if the contract is paused. **/ function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } /** * @dev decreaseApproval function, revert if the contract is paused. **/ function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } /** * @dev Check if the given address is a contract address * @param _address Contract Address */ function _isContract( address _address ) internal constant returns (bool) { } /** * @dev Add contract address to tokenFallbackWhiteList * @param _address Contract Address */ function addContractToTokenFallbackWhiteList( address _address ) onlyOwner public { require(<FILL_ME>) tokenFallbackWhiteList[_address] = true; } /** * @dev Remove contract address from tokenFallbackWhiteList * @param _address Contract Address */ function removeContractFromTokenFallbackWhiteList( address _address ) onlyOwner public { } function transferAndCall( address _receiver, uint _amount, bytes _data) public returns (bool _success) { } }
_isContract(_address)
14,769
_isContract(_address)
null
/** * @title CoinsdomCoin Contract */ contract CoinsdomCoin is MintableToken, Pausable { using SafeMath for uint256; string public name = 'Coinsdom'; string public symbol = 'CSD'; uint256 public decimals = 18; mapping (address => bool) public tokenFallbackWhiteList; /** * @dev Constructor * @param _initialSupply Initial Supply **/ function CoinsdomCoin( uint256 _initialSupply ) public { } /** * @dev transfer function, revert if the contract is paused. **/ function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev transferFrom function, revert if the contract is paused. **/ function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev approve function, revert if the contract is paused. **/ function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev increaseApproval function, revert if the contract is paused. **/ function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } /** * @dev decreaseApproval function, revert if the contract is paused. **/ function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } /** * @dev Check if the given address is a contract address * @param _address Contract Address */ function _isContract( address _address ) internal constant returns (bool) { } /** * @dev Add contract address to tokenFallbackWhiteList * @param _address Contract Address */ function addContractToTokenFallbackWhiteList( address _address ) onlyOwner public { } /** * @dev Remove contract address from tokenFallbackWhiteList * @param _address Contract Address */ function removeContractFromTokenFallbackWhiteList( address _address ) onlyOwner public { } function transferAndCall( address _receiver, uint _amount, bytes _data) public returns (bool _success) { require(<FILL_ME>) require(tokenFallbackWhiteList[_receiver]); transfer(_receiver, _amount); TokenFallback(_receiver).tokenFallback(msg.sender, _amount, _data); return true; } }
_isContract(_receiver)
14,769
_isContract(_receiver)
null
/** * @title CoinsdomCoin Contract */ contract CoinsdomCoin is MintableToken, Pausable { using SafeMath for uint256; string public name = 'Coinsdom'; string public symbol = 'CSD'; uint256 public decimals = 18; mapping (address => bool) public tokenFallbackWhiteList; /** * @dev Constructor * @param _initialSupply Initial Supply **/ function CoinsdomCoin( uint256 _initialSupply ) public { } /** * @dev transfer function, revert if the contract is paused. **/ function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev transferFrom function, revert if the contract is paused. **/ function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev approve function, revert if the contract is paused. **/ function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } /** * @dev increaseApproval function, revert if the contract is paused. **/ function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } /** * @dev decreaseApproval function, revert if the contract is paused. **/ function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } /** * @dev Check if the given address is a contract address * @param _address Contract Address */ function _isContract( address _address ) internal constant returns (bool) { } /** * @dev Add contract address to tokenFallbackWhiteList * @param _address Contract Address */ function addContractToTokenFallbackWhiteList( address _address ) onlyOwner public { } /** * @dev Remove contract address from tokenFallbackWhiteList * @param _address Contract Address */ function removeContractFromTokenFallbackWhiteList( address _address ) onlyOwner public { } function transferAndCall( address _receiver, uint _amount, bytes _data) public returns (bool _success) { require(_isContract(_receiver)); require(<FILL_ME>) transfer(_receiver, _amount); TokenFallback(_receiver).tokenFallback(msg.sender, _amount, _data); return true; } }
tokenFallbackWhiteList[_receiver]
14,769
tokenFallbackWhiteList[_receiver]