comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Staking : Set allowance first!"
pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/StorksTokenstaking //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; contract StorksTokenStaking is Ownable { using SafeMath for uint256; using SafeMath for uint16; /** * * @dev User reflects the info of each user * * * @param {total_invested} how many tokens the user staked * @param {total_withdrawn} how many tokens withdrawn so far * @param {lastPayout} time at which last claim was done * @param {depositTime} Time of last deposit * @param {totalClaimed} Total claimed by the user * */ struct User { uint256 total_invested; uint256 total_withdrawn; uint256 lastPayout; uint256 depositTime; uint256 totalClaimed; } /** * * @dev PoolInfo reflects the info of each pools * * To improve precision, we provide APY with an additional zero. So if APY is 12%, we provide * 120 as input.lockPeriodInDays would be the number of days which the claim is locked. So if we want to * lock claim for 1 month, lockPeriodInDays would be 30. * * @param {apy} Percentage of yield produced by the pool * @param {lockPeriodInDays} Amount of time claim will be locked * @param {totalDeposit} Total deposit in the pool * @param {startDate} starting time of pool * @param {endDate} ending time of pool in unix timestamp * @param {minContrib} Minimum amount to be staked * */ struct Pool { uint16 apy; uint16 lockPeriodInDays; uint256 totalDeposit; uint256 startDate; uint256 endDate; uint256 minContrib; } IERC20 private token; //Token address mapping(uint256 => mapping(address => User)) public users; Pool[] public poolInfo; event Stake(address indexed addr, uint256 amount); event Claim(address indexed addr, uint256 amount); constructor(address _token) { } receive() external payable { } /** * * @dev get length of the pools * * @return {uint256} length of the pools * */ function poolLength() public view returns (uint256) { } /** * * @dev get info of all pools * * @return {PoolInfo[]} Pool info struct * */ function getPools() internal view returns (Pool[] memory) { } /** * * @dev add new period to the pool, only available for owner * */ function add( uint16 _apy, uint16 _lockPeriodInDays, uint256 _endDate, uint256 _minContrib ) public onlyOwner { } /** * * @dev update the given pool's Info * */ function set( uint256 _pid, uint16 _apy, uint16 _lockPeriodInDays, uint256 _endDate, uint256 _minContrib ) public onlyOwner { } /** * * @dev depsoit tokens to staking for allocation * * @param {_pid} Id of the pool * @param {_amount} Amount to be staked * * @return {bool} Status of stake * */ function stake(uint8 _pid, uint256 _amount) external returns (bool) { Pool memory pool = poolInfo[_pid]; require(_amount >= pool.minContrib, "Invalid amount!"); require(<FILL_ME>) bool success = token.transferFrom(msg.sender, address(this), _amount); require(success, "Staking : Transfer failed"); _amount = _amount - (_amount.div(20)); _stake(_pid, msg.sender, _amount); return success; } function _stake( uint8 _pid, address _sender, uint256 _amount ) internal { } /** * * @dev claim accumulated reward for a single pool * * @param {_pid} pool identifier * * @return {bool} status of claim */ function claim(uint8 _pid) public returns (bool) { } /** * * @dev claim accumulated reward from all pools * * Beware of gas fee! * */ function claimAll() public returns (bool) { } /** * * @dev check whether user can claim or not * * @param {_pid} id of the pool * @param {_addr} address of the user * * @return {bool} Status of claim * */ function canClaim(uint8 _pid, address _addr) public view returns (bool) { } /** * * @dev withdraw tokens from Staking * * @param {_pid} id of the pool * @param {_amount} amount to be unstaked * * @return {bool} Status of stake * */ function unStake(uint8 _pid, uint256 _amount) external returns (bool) { } function _claim(uint8 _pid, address _addr) internal { } function _payout(uint8 _pid, address _addr) public view returns (uint256 value) { } /** * * @dev safe transfer function, require to have enough to transfer * */ function safeTransfer(address _to, uint256 _amount) internal { } /**dev can claim stucked tokens or ETH from the smartcontract, if *accidently sent by somone. To claim native tokens, he has to wait *atleast 100 days from the deployment of this smartcontract **/ function claimStuckTokens(address _token) external onlyOwner { } }
token.allowance(msg.sender,address(this))>=_amount,"Staking : Set allowance first!"
39,509
token.allowance(msg.sender,address(this))>=_amount
"Stake still in locked state"
pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/StorksTokenstaking //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; contract StorksTokenStaking is Ownable { using SafeMath for uint256; using SafeMath for uint16; /** * * @dev User reflects the info of each user * * * @param {total_invested} how many tokens the user staked * @param {total_withdrawn} how many tokens withdrawn so far * @param {lastPayout} time at which last claim was done * @param {depositTime} Time of last deposit * @param {totalClaimed} Total claimed by the user * */ struct User { uint256 total_invested; uint256 total_withdrawn; uint256 lastPayout; uint256 depositTime; uint256 totalClaimed; } /** * * @dev PoolInfo reflects the info of each pools * * To improve precision, we provide APY with an additional zero. So if APY is 12%, we provide * 120 as input.lockPeriodInDays would be the number of days which the claim is locked. So if we want to * lock claim for 1 month, lockPeriodInDays would be 30. * * @param {apy} Percentage of yield produced by the pool * @param {lockPeriodInDays} Amount of time claim will be locked * @param {totalDeposit} Total deposit in the pool * @param {startDate} starting time of pool * @param {endDate} ending time of pool in unix timestamp * @param {minContrib} Minimum amount to be staked * */ struct Pool { uint16 apy; uint16 lockPeriodInDays; uint256 totalDeposit; uint256 startDate; uint256 endDate; uint256 minContrib; } IERC20 private token; //Token address mapping(uint256 => mapping(address => User)) public users; Pool[] public poolInfo; event Stake(address indexed addr, uint256 amount); event Claim(address indexed addr, uint256 amount); constructor(address _token) { } receive() external payable { } /** * * @dev get length of the pools * * @return {uint256} length of the pools * */ function poolLength() public view returns (uint256) { } /** * * @dev get info of all pools * * @return {PoolInfo[]} Pool info struct * */ function getPools() internal view returns (Pool[] memory) { } /** * * @dev add new period to the pool, only available for owner * */ function add( uint16 _apy, uint16 _lockPeriodInDays, uint256 _endDate, uint256 _minContrib ) public onlyOwner { } /** * * @dev update the given pool's Info * */ function set( uint256 _pid, uint16 _apy, uint16 _lockPeriodInDays, uint256 _endDate, uint256 _minContrib ) public onlyOwner { } /** * * @dev depsoit tokens to staking for allocation * * @param {_pid} Id of the pool * @param {_amount} Amount to be staked * * @return {bool} Status of stake * */ function stake(uint8 _pid, uint256 _amount) external returns (bool) { } function _stake( uint8 _pid, address _sender, uint256 _amount ) internal { } /** * * @dev claim accumulated reward for a single pool * * @param {_pid} pool identifier * * @return {bool} status of claim */ function claim(uint8 _pid) public returns (bool) { } /** * * @dev claim accumulated reward from all pools * * Beware of gas fee! * */ function claimAll() public returns (bool) { } /** * * @dev check whether user can claim or not * * @param {_pid} id of the pool * @param {_addr} address of the user * * @return {bool} Status of claim * */ function canClaim(uint8 _pid, address _addr) public view returns (bool) { } /** * * @dev withdraw tokens from Staking * * @param {_pid} id of the pool * @param {_amount} amount to be unstaked * * @return {bool} Status of stake * */ function unStake(uint8 _pid, uint256 _amount) external returns (bool) { User storage user = users[_pid][msg.sender]; Pool storage pool = poolInfo[_pid]; require(user.total_invested >= _amount, "You don't have enough funds"); require(<FILL_ME>) _claim(_pid, msg.sender); pool.totalDeposit = pool.totalDeposit.sub(_amount); user.total_invested = user.total_invested.sub(_amount); safeTransfer(msg.sender, _amount); return true; } function _claim(uint8 _pid, address _addr) internal { } function _payout(uint8 _pid, address _addr) public view returns (uint256 value) { } /** * * @dev safe transfer function, require to have enough to transfer * */ function safeTransfer(address _to, uint256 _amount) internal { } /**dev can claim stucked tokens or ETH from the smartcontract, if *accidently sent by somone. To claim native tokens, he has to wait *atleast 100 days from the deployment of this smartcontract **/ function claimStuckTokens(address _token) external onlyOwner { } }
canClaim(_pid,msg.sender),"Stake still in locked state"
39,509
canClaim(_pid,msg.sender)
null
pragma solidity ^0.4.18; contract NFTHouseGame { struct Listing { uint startPrice; uint endPrice; uint startedAt; uint endsAt; bool isAvailable; } enum HouseClasses { Shack, Apartment, Bungalow, House, Mansion, Estate, Penthouse, Ashes } struct House { address owner; uint streetNumber; string streetName; string streetType; string colorCode; uint numBedrooms; uint numBathrooms; uint squareFootage; uint propertyValue; uint statusValue; HouseClasses class; uint classVariant; } struct Trait { string name; bool isNegative; } address public gameOwner; address public gameDeveloper; uint public presaleSales; uint public presaleLimit = 5000; bool public presaleOngoing = true; uint presaleDevFee = 20; uint presaleProceeds; uint presaleDevPayout; uint public buildPrice = 150 finney; uint public additionPrice = 100 finney; uint public saleFee = 2; // percent House[] public houses; Trait[] public traits; mapping (uint => uint[4]) public houseTraits; mapping (uint => Listing) public listings; mapping (address => uint) public ownedHouses; mapping (uint => uint) public classVariants; mapping (uint => address) approvedTransfers; string[] colors = ["e96b63"]; string[] streetNames = ["Main"]; string[] streetTypes = ["Street"]; modifier onlyBy(address _authorized) { } modifier onlyByOwnerOrDev { } modifier onlyByAssetOwner(uint _tokenId) { } modifier onlyDuringPresale { } function NFTHouseGame() public { } /* ERC-20 Compatibility */ function name() pure public returns (string) { } function symbol() pure public returns (string) { } function totalSupply() view public returns (uint) { } function balanceOf(address _owner) constant public returns (uint) { } /* ERC-20 + ERC-721 Token Events */ event Transfer(address indexed _from, address indexed _to, uint _numTokens); event Approval(address indexed _owner, address indexed _approved, uint _tokenId); /* ERC-721 Token Ownership */ function ownerOf(uint _tokenId) constant public returns (address) { } function approve(address _to, uint _tokenId) onlyByAssetOwner(_tokenId) public { } function approveAndTransfer(address _to, uint _tokenId) internal { } function takeOwnership(uint _tokenId) public { House storage house = houses[_tokenId]; address oldOwner = house.owner; address newOwner = msg.sender; require(<FILL_ME>) ownedHouses[oldOwner] -= 1; ownedHouses[newOwner] += 1; house.owner = newOwner; Transfer(oldOwner, newOwner, 1); } function transfer(address _to, uint _tokenId) public { } /* Token-Specific Events */ event Minted(uint _tokenId); event Upgraded(uint _tokenId); event Destroyed(uint _tokenId); /* Public Functionality */ function buildHouse() payable public { } function buildAddition(uint _tokenId) onlyByAssetOwner(_tokenId) payable public { } function burnForInsurance(uint _tokenId) onlyByAssetOwner(_tokenId) public { } function purchaseAsset(uint _tokenId) payable public { } function listAsset(uint _tokenId, uint _startPrice, uint _endPrice, uint _numDays) onlyByAssetOwner(_tokenId) public { } function removeAssetListing(uint _tokenId) public onlyByAssetOwner(_tokenId) { } function getHouseTraits(uint _tokenId) public view returns (uint[4]) { } function getTraitCount() public view returns (uint) { } /* Admin Functionality */ function addNewColor(string _colorCode) public onlyByOwnerOrDev { } function addNewTrait(string _name, bool _isNegative) public onlyByOwnerOrDev { } function addNewStreetName(string _name) public onlyByOwnerOrDev { } function addNewStreetType(string _type) public onlyByOwnerOrDev { } function generatePresaleHouse() onlyByOwnerOrDev onlyDuringPresale public { } function setVariantCount(uint _houseClass, uint _variantCount) public onlyByOwnerOrDev { } function withdrawFees(address _destination) public onlyBy(gameOwner) { } function withdrawDevFees(address _destination) public onlyBy(gameDeveloper) { } function transferGameOwnership(address _newOwner) public onlyBy(gameOwner) { } /* Internal Functionality */ function generateHouse(address owner) internal returns (uint houseId) { } function createListing(uint tokenId, uint startPrice, uint endPrice, uint numDays) internal { } function calculateCurrentPrice(Listing listing) internal view returns (uint) { } function calculatePropertyValue(HouseClasses houseClass, uint squareFootage, uint numBathrooms, uint numBedrooms) pure internal returns (uint) { } function randomHouseClass() internal view returns (HouseClasses) { } function randomClassVariant(HouseClasses houseClass) internal view returns (uint) { } function randomBedrooms(HouseClasses houseClass) internal view returns (uint) { } function randomBathrooms(uint numBedrooms) internal view returns (uint) { } function calculateSquareFootage(HouseClasses houseClass, uint numBedrooms, uint numBathrooms) internal pure returns (uint) { } function upgradeAsset(uint tokenId) internal { } function processUpgrades(House storage house) internal { } function notRandom(uint lessThan) public view returns (uint) { } function notRandomWithSeed(uint lessThan, uint seed) public view returns (uint) { } }
approvedTransfers[_tokenId]==newOwner
39,556
approvedTransfers[_tokenId]==newOwner
null
pragma solidity ^0.4.18; contract NFTHouseGame { struct Listing { uint startPrice; uint endPrice; uint startedAt; uint endsAt; bool isAvailable; } enum HouseClasses { Shack, Apartment, Bungalow, House, Mansion, Estate, Penthouse, Ashes } struct House { address owner; uint streetNumber; string streetName; string streetType; string colorCode; uint numBedrooms; uint numBathrooms; uint squareFootage; uint propertyValue; uint statusValue; HouseClasses class; uint classVariant; } struct Trait { string name; bool isNegative; } address public gameOwner; address public gameDeveloper; uint public presaleSales; uint public presaleLimit = 5000; bool public presaleOngoing = true; uint presaleDevFee = 20; uint presaleProceeds; uint presaleDevPayout; uint public buildPrice = 150 finney; uint public additionPrice = 100 finney; uint public saleFee = 2; // percent House[] public houses; Trait[] public traits; mapping (uint => uint[4]) public houseTraits; mapping (uint => Listing) public listings; mapping (address => uint) public ownedHouses; mapping (uint => uint) public classVariants; mapping (uint => address) approvedTransfers; string[] colors = ["e96b63"]; string[] streetNames = ["Main"]; string[] streetTypes = ["Street"]; modifier onlyBy(address _authorized) { } modifier onlyByOwnerOrDev { } modifier onlyByAssetOwner(uint _tokenId) { } modifier onlyDuringPresale { } function NFTHouseGame() public { } /* ERC-20 Compatibility */ function name() pure public returns (string) { } function symbol() pure public returns (string) { } function totalSupply() view public returns (uint) { } function balanceOf(address _owner) constant public returns (uint) { } /* ERC-20 + ERC-721 Token Events */ event Transfer(address indexed _from, address indexed _to, uint _numTokens); event Approval(address indexed _owner, address indexed _approved, uint _tokenId); /* ERC-721 Token Ownership */ function ownerOf(uint _tokenId) constant public returns (address) { } function approve(address _to, uint _tokenId) onlyByAssetOwner(_tokenId) public { } function approveAndTransfer(address _to, uint _tokenId) internal { } function takeOwnership(uint _tokenId) public { } function transfer(address _to, uint _tokenId) public { House storage house = houses[_tokenId]; address oldOwner = house.owner; address newOwner = _to; require(oldOwner != newOwner); require(<FILL_ME>) ownedHouses[oldOwner]--; ownedHouses[newOwner]++; house.owner = newOwner; Transfer(oldOwner, newOwner, 1); } /* Token-Specific Events */ event Minted(uint _tokenId); event Upgraded(uint _tokenId); event Destroyed(uint _tokenId); /* Public Functionality */ function buildHouse() payable public { } function buildAddition(uint _tokenId) onlyByAssetOwner(_tokenId) payable public { } function burnForInsurance(uint _tokenId) onlyByAssetOwner(_tokenId) public { } function purchaseAsset(uint _tokenId) payable public { } function listAsset(uint _tokenId, uint _startPrice, uint _endPrice, uint _numDays) onlyByAssetOwner(_tokenId) public { } function removeAssetListing(uint _tokenId) public onlyByAssetOwner(_tokenId) { } function getHouseTraits(uint _tokenId) public view returns (uint[4]) { } function getTraitCount() public view returns (uint) { } /* Admin Functionality */ function addNewColor(string _colorCode) public onlyByOwnerOrDev { } function addNewTrait(string _name, bool _isNegative) public onlyByOwnerOrDev { } function addNewStreetName(string _name) public onlyByOwnerOrDev { } function addNewStreetType(string _type) public onlyByOwnerOrDev { } function generatePresaleHouse() onlyByOwnerOrDev onlyDuringPresale public { } function setVariantCount(uint _houseClass, uint _variantCount) public onlyByOwnerOrDev { } function withdrawFees(address _destination) public onlyBy(gameOwner) { } function withdrawDevFees(address _destination) public onlyBy(gameDeveloper) { } function transferGameOwnership(address _newOwner) public onlyBy(gameOwner) { } /* Internal Functionality */ function generateHouse(address owner) internal returns (uint houseId) { } function createListing(uint tokenId, uint startPrice, uint endPrice, uint numDays) internal { } function calculateCurrentPrice(Listing listing) internal view returns (uint) { } function calculatePropertyValue(HouseClasses houseClass, uint squareFootage, uint numBathrooms, uint numBedrooms) pure internal returns (uint) { } function randomHouseClass() internal view returns (HouseClasses) { } function randomClassVariant(HouseClasses houseClass) internal view returns (uint) { } function randomBedrooms(HouseClasses houseClass) internal view returns (uint) { } function randomBathrooms(uint numBedrooms) internal view returns (uint) { } function calculateSquareFootage(HouseClasses houseClass, uint numBedrooms, uint numBathrooms) internal pure returns (uint) { } function upgradeAsset(uint tokenId) internal { } function processUpgrades(House storage house) internal { } function notRandom(uint lessThan) public view returns (uint) { } function notRandomWithSeed(uint lessThan, uint seed) public view returns (uint) { } }
(msg.sender==oldOwner)||(approvedTransfers[_tokenId]==newOwner)
39,556
(msg.sender==oldOwner)||(approvedTransfers[_tokenId]==newOwner)
null
pragma solidity ^0.4.18; contract NFTHouseGame { struct Listing { uint startPrice; uint endPrice; uint startedAt; uint endsAt; bool isAvailable; } enum HouseClasses { Shack, Apartment, Bungalow, House, Mansion, Estate, Penthouse, Ashes } struct House { address owner; uint streetNumber; string streetName; string streetType; string colorCode; uint numBedrooms; uint numBathrooms; uint squareFootage; uint propertyValue; uint statusValue; HouseClasses class; uint classVariant; } struct Trait { string name; bool isNegative; } address public gameOwner; address public gameDeveloper; uint public presaleSales; uint public presaleLimit = 5000; bool public presaleOngoing = true; uint presaleDevFee = 20; uint presaleProceeds; uint presaleDevPayout; uint public buildPrice = 150 finney; uint public additionPrice = 100 finney; uint public saleFee = 2; // percent House[] public houses; Trait[] public traits; mapping (uint => uint[4]) public houseTraits; mapping (uint => Listing) public listings; mapping (address => uint) public ownedHouses; mapping (uint => uint) public classVariants; mapping (uint => address) approvedTransfers; string[] colors = ["e96b63"]; string[] streetNames = ["Main"]; string[] streetTypes = ["Street"]; modifier onlyBy(address _authorized) { } modifier onlyByOwnerOrDev { } modifier onlyByAssetOwner(uint _tokenId) { } modifier onlyDuringPresale { } function NFTHouseGame() public { } /* ERC-20 Compatibility */ function name() pure public returns (string) { } function symbol() pure public returns (string) { } function totalSupply() view public returns (uint) { } function balanceOf(address _owner) constant public returns (uint) { } /* ERC-20 + ERC-721 Token Events */ event Transfer(address indexed _from, address indexed _to, uint _numTokens); event Approval(address indexed _owner, address indexed _approved, uint _tokenId); /* ERC-721 Token Ownership */ function ownerOf(uint _tokenId) constant public returns (address) { } function approve(address _to, uint _tokenId) onlyByAssetOwner(_tokenId) public { } function approveAndTransfer(address _to, uint _tokenId) internal { } function takeOwnership(uint _tokenId) public { } function transfer(address _to, uint _tokenId) public { } /* Token-Specific Events */ event Minted(uint _tokenId); event Upgraded(uint _tokenId); event Destroyed(uint _tokenId); /* Public Functionality */ function buildHouse() payable public { } function buildAddition(uint _tokenId) onlyByAssetOwner(_tokenId) payable public { } function burnForInsurance(uint _tokenId) onlyByAssetOwner(_tokenId) public { } function purchaseAsset(uint _tokenId) payable public { Listing storage listing = listings[_tokenId]; uint currentPrice = calculateCurrentPrice(listing); require(msg.value >= currentPrice); require(<FILL_ME>) listing.isAvailable = false; if (presaleOngoing && (++presaleSales >= presaleLimit)) { presaleOngoing = false; } if (houses[_tokenId].owner != address(this)) { uint fee = currentPrice / (100 / saleFee); uint sellerProceeds = currentPrice - fee; presaleProceeds += (msg.value - sellerProceeds); houses[_tokenId].owner.transfer(sellerProceeds); } else { presaleProceeds += msg.value; } approveAndTransfer(msg.sender, _tokenId); } function listAsset(uint _tokenId, uint _startPrice, uint _endPrice, uint _numDays) onlyByAssetOwner(_tokenId) public { } function removeAssetListing(uint _tokenId) public onlyByAssetOwner(_tokenId) { } function getHouseTraits(uint _tokenId) public view returns (uint[4]) { } function getTraitCount() public view returns (uint) { } /* Admin Functionality */ function addNewColor(string _colorCode) public onlyByOwnerOrDev { } function addNewTrait(string _name, bool _isNegative) public onlyByOwnerOrDev { } function addNewStreetName(string _name) public onlyByOwnerOrDev { } function addNewStreetType(string _type) public onlyByOwnerOrDev { } function generatePresaleHouse() onlyByOwnerOrDev onlyDuringPresale public { } function setVariantCount(uint _houseClass, uint _variantCount) public onlyByOwnerOrDev { } function withdrawFees(address _destination) public onlyBy(gameOwner) { } function withdrawDevFees(address _destination) public onlyBy(gameDeveloper) { } function transferGameOwnership(address _newOwner) public onlyBy(gameOwner) { } /* Internal Functionality */ function generateHouse(address owner) internal returns (uint houseId) { } function createListing(uint tokenId, uint startPrice, uint endPrice, uint numDays) internal { } function calculateCurrentPrice(Listing listing) internal view returns (uint) { } function calculatePropertyValue(HouseClasses houseClass, uint squareFootage, uint numBathrooms, uint numBedrooms) pure internal returns (uint) { } function randomHouseClass() internal view returns (HouseClasses) { } function randomClassVariant(HouseClasses houseClass) internal view returns (uint) { } function randomBedrooms(HouseClasses houseClass) internal view returns (uint) { } function randomBathrooms(uint numBedrooms) internal view returns (uint) { } function calculateSquareFootage(HouseClasses houseClass, uint numBedrooms, uint numBathrooms) internal pure returns (uint) { } function upgradeAsset(uint tokenId) internal { } function processUpgrades(House storage house) internal { } function notRandom(uint lessThan) public view returns (uint) { } function notRandomWithSeed(uint lessThan, uint seed) public view returns (uint) { } }
listing.isAvailable&&listing.endsAt>now
39,556
listing.isAvailable&&listing.endsAt>now
"Cannot exceed max supply of Cheddaz"
pragma solidity ^0.8.0; abstract contract SRSC { function ownerOf(uint256 tokenId) public virtual view returns (address); function tokenOfOwnerByIndex(address owner, uint256 index) public virtual view returns (uint256); function balanceOf(address owner) external virtual view returns (uint256 balance); } contract SRSCCheddaz is ERC721Enumerable, Ownable { SRSC private srsc = SRSC(0xd21a23606D2746f086f6528Cd6873bAD3307b903); bool public saleIsActive = false; uint256 public maxCheddaz = 8888; string private baseURI; constructor() ERC721("Cheddaz", "CHEDDAZ") { } function isMinted(uint256 tokenId) external view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } function flipSaleState() public onlyOwner { } function mintCheddaz(uint256 startingIndex, uint256 totalCheddazToMint) public { require(saleIsActive, "Sale must be active to mint a Chedda"); require(totalCheddazToMint > 0, "Must mint at least one Chedda"); uint balance = srsc.balanceOf(msg.sender); require(balance > 0, "Must hold at least one Rat to mint a Chedda"); require(balance >= totalCheddazToMint, "Must hold at least as many Rats as the number of Cheddaz you intend to mint"); require(balance >= startingIndex + totalCheddazToMint, "Must hold at least as many Rats as the number of Cheddaz you intend to mint"); for(uint i = 0; i < balance && i < totalCheddazToMint; i++) { require(<FILL_ME>) uint tokenId = srsc.tokenOfOwnerByIndex(msg.sender, i + startingIndex); if (!_exists(tokenId)) { _safeMint(msg.sender, tokenId); } } } }
totalSupply()<maxCheddaz,"Cannot exceed max supply of Cheddaz"
39,751
totalSupply()<maxCheddaz
null
pragma solidity ^0.4.24; contract Ownable { event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } modifier notOwner(address _addr) { } address public owner; constructor() public { } function renounceOwnership() external onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner notOwner(_newOwner) { } } contract ETHPublish is Ownable { event Publication(bytes32 indexed hash, string content); mapping(bytes32 => string) public publications; mapping(bytes32 => bool) published; function() public payable { } function publish(string content) public onlyOwner returns (bytes32) { bytes32 hash = keccak256(bytes(content)); require(<FILL_ME>) publications[hash] = content; published[hash] = true; emit Publication(hash, content); return hash; } }
!published[hash]
39,754
!published[hash]
'CentaurSwap: PENDING_SETTLEMENT'
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; pragma experimental ABIEncoderV2; import './CentaurLPToken.sol'; import './libraries/Initializable.sol'; import './libraries/SafeMath.sol'; import './libraries/CentaurMath.sol'; import './interfaces/IERC20.sol'; import './interfaces/ICentaurFactory.sol'; import './interfaces/ICentaurPool.sol'; import './interfaces/ICentaurSettlement.sol'; import './interfaces/IOracle.sol'; contract CentaurPool is Initializable, CentaurLPToken { using SafeMath for uint; bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)'))); address public factory; address public baseToken; uint public baseTokenDecimals; address public oracle; uint public oracleDecimals; uint public baseTokenTargetAmount; uint public baseTokenBalance; uint public liquidityParameter; bool public tradeEnabled; bool public depositEnabled; bool public withdrawEnabled; uint private unlocked; modifier lock() { } modifier tradeAllowed() { } modifier depositAllowed() { } modifier withdrawAllowed() { } modifier onlyRouter() { } modifier onlyFactory() { } event Mint(address indexed sender, uint amount); event Burn(address indexed sender, uint amount, address indexed to); event AmountIn(address indexed sender, uint amount); event AmountOut(address indexed sender, uint amount, address indexed to); event EmergencyWithdraw(uint256 _timestamp, address indexed _token, uint256 _amount, address indexed _to); function init(address _factory, address _baseToken, address _oracle, uint _liquidityParameter) external initializer { } function _safeTransfer(address token, address to, uint value) private { } function mint(address to) external lock onlyRouter depositAllowed returns (uint liquidity) { } function burn(address to) external lock onlyRouter withdrawAllowed returns (uint amount) { } function swapTo(address _sender, address _fromToken, uint _amountIn, uint _value, address _receiver) external lock onlyRouter tradeAllowed returns (uint maxAmount) { require(_fromToken != baseToken, 'CentaurSwap: INVALID_POOL'); address pool = ICentaurFactory(factory).getPool(_fromToken); require(pool != address(0), 'CentaurSwap: POOL_NOT_FOUND'); // Check if has pendingSettlement address settlement = ICentaurFactory(factory).settlement(); require(<FILL_ME>) // maxAmount because amount might be lesser during settlement. (If amount is more, excess is given back to pool) maxAmount = getAmountOutFromValue(_value); ICentaurSettlement.Settlement memory pendingSettlement = ICentaurSettlement.Settlement( pool, _amountIn, ICentaurPool(pool).baseTokenTargetAmount(), (ICentaurPool(pool).baseTokenBalance()).sub(_amountIn), ICentaurPool(pool).liquidityParameter(), address(this), maxAmount, baseTokenTargetAmount, baseTokenBalance, liquidityParameter, _receiver, block.timestamp.add(ICentaurSettlement(settlement).settlementDuration()) ); // Subtract maxAmount from baseTokenBalance first, difference (if any) will be added back during settlement baseTokenBalance = baseTokenBalance.sub(maxAmount); // Add to pending settlement ICentaurSettlement(settlement).addSettlement(_sender, pendingSettlement); // Transfer amount to settlement for escrow _safeTransfer(baseToken, settlement, maxAmount); return maxAmount; } function swapFrom(address _sender) external lock onlyRouter tradeAllowed returns (uint amount, uint value) { } function swapSettle(address _sender) external lock returns (uint, address) { } function getOraclePrice() public view returns (uint price) { } // Swap Exact Tokens For Tokens (getAmountOut) function getAmountOutFromValue(uint _value) public view returns (uint amount) { } function getValueFromAmountIn(uint _amount) public view returns (uint value) { } // Swap Tokens For Exact Tokens (getAmountIn) function getAmountInFromValue(uint _value) public view returns (uint amount) { } function getValueFromAmountOut(uint _amount) public view returns (uint value) { } // Helper functions function setFactory(address _factory) external onlyFactory { } function setTradeEnabled(bool _tradeEnabled) external onlyFactory { } function setDepositEnabled(bool _depositEnabled) external onlyFactory { } function setWithdrawEnabled(bool _withdrawEnabled) external onlyFactory { } function setLiquidityParameter(uint _liquidityParameter) external onlyFactory { } function emergencyWithdraw(address _token, uint _amount, address _to) external onlyFactory { } }
!ICentaurSettlement(settlement).hasPendingSettlement(_sender,address(this)),'CentaurSwap: PENDING_SETTLEMENT'
39,758
!ICentaurSettlement(settlement).hasPendingSettlement(_sender,address(this))
"erc20-approve-curvepool-failed"
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./weth/WETH.sol"; import "./dydx/DydxFlashloanBase.sol"; import "./dydx/IDydx.sol"; import "./maker/IDssCdpManager.sol"; import "./maker/IDssProxyActions.sol"; import "./maker/DssActionsBase.sol"; import "./curve/ICurveFiCurve.sol"; import "./Constants.sol"; contract CloseShortDAI is ICallee, DydxFlashloanBase, DssActionsBase { struct CSDParams { uint256 cdpId; // CdpId to close address curvePool; // Which curve pool to use uint256 mintAmountDAI; // Amount of DAI to mint uint256 withdrawAmountUSDC; // Amount of USDC to withdraw from vault uint256 flashloanAmountWETH; // Amount of WETH flashloaned } function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { CSDParams memory csdp = abi.decode(data, (CSDParams)); // Step 1. Have Flashloaned WETH // Open WETH CDP in Maker, then Mint out some DAI uint256 wethCdp = _openLockGemAndDraw( Constants.MCD_JOIN_ETH_A, Constants.ETH_A_ILK, csdp.flashloanAmountWETH, csdp.mintAmountDAI ); // Step 2. // Use flashloaned DAI to repay entire vault and withdraw USDC _wipeAllAndFreeGem( Constants.MCD_JOIN_USDC_A, csdp.cdpId, csdp.withdrawAmountUSDC ); // Step 3. // Converts USDC to DAI on CurveFi (To repay loan) // DAI = 0 index, USDC = 1 index ICurveFiCurve curve = ICurveFiCurve(csdp.curvePool); // Calculate amount of USDC needed to exchange to repay flashloaned DAI // Allow max of 5% slippage (otherwise no profits lmao) uint256 usdcBal = IERC20(Constants.USDC).balanceOf(address(this)); require(<FILL_ME>) curve.exchange_underlying(int128(1), int128(0), usdcBal, 0); // Step 4. // Repay DAI loan back to WETH CDP and FREE WETH _wipeAllAndFreeGem( Constants.MCD_JOIN_ETH_A, wethCdp, csdp.flashloanAmountWETH ); } function flashloanAndClose( address _sender, address _solo, address _curvePool, uint256 _cdpId, uint256 _ethUsdRatio18 // 1 ETH = <X> DAI? ) external payable { } }
IERC20(Constants.USDC).approve(address(curve),usdcBal),"erc20-approve-curvepool-failed"
39,801
IERC20(Constants.USDC).approve(address(curve),usdcBal)
"!weth-supply"
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./weth/WETH.sol"; import "./dydx/DydxFlashloanBase.sol"; import "./dydx/IDydx.sol"; import "./maker/IDssCdpManager.sol"; import "./maker/IDssProxyActions.sol"; import "./maker/DssActionsBase.sol"; import "./curve/ICurveFiCurve.sol"; import "./Constants.sol"; contract CloseShortDAI is ICallee, DydxFlashloanBase, DssActionsBase { struct CSDParams { uint256 cdpId; // CdpId to close address curvePool; // Which curve pool to use uint256 mintAmountDAI; // Amount of DAI to mint uint256 withdrawAmountUSDC; // Amount of USDC to withdraw from vault uint256 flashloanAmountWETH; // Amount of WETH flashloaned } function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { } function flashloanAndClose( address _sender, address _solo, address _curvePool, uint256 _cdpId, uint256 _ethUsdRatio18 // 1 ETH = <X> DAI? ) external payable { require(msg.value == 2, "!fee"); ISoloMargin solo = ISoloMargin(_solo); uint256 marketId = _getMarketIdFromTokenAddress(_solo, Constants.WETH); // Supplied = How much we want to withdraw // Borrowed = How much we want to loan ( uint256 withdrawAmountUSDC, uint256 mintAmountDAI ) = _getSuppliedAndBorrow(Constants.MCD_JOIN_USDC_A, _cdpId); // Given, ETH price, calculate how much WETH we need to flashloan // Dividing by 2 to gives us 200% col ratio uint256 flashloanAmountWETH = mintAmountDAI.mul(1 ether).div( _ethUsdRatio18.div(2) ); require(<FILL_ME>) // Wrap ETH into WETH WETH(Constants.WETH).deposit{value: msg.value}(); WETH(Constants.WETH).approve(_solo, flashloanAmountWETH.add(msg.value)); Actions.ActionArgs[] memory operations = new Actions.ActionArgs[](3); operations[0] = _getWithdrawAction(marketId, flashloanAmountWETH); operations[1] = _getCallAction( abi.encode( CSDParams({ mintAmountDAI: mintAmountDAI, withdrawAmountUSDC: withdrawAmountUSDC, flashloanAmountWETH: flashloanAmountWETH, cdpId: _cdpId, curvePool: _curvePool }) ) ); operations[2] = _getDepositAction( marketId, flashloanAmountWETH.add(msg.value) ); Account.Info[] memory accountInfos = new Account.Info[](1); accountInfos[0] = _getAccountInfo(); solo.operate(accountInfos, operations); // Convert DAI leftovers to USDC uint256 daiBal = IERC20(Constants.DAI).balanceOf(address(this)); require( IERC20(Constants.DAI).approve(_curvePool, daiBal), "erc20-approve-curvepool-failed" ); ICurveFiCurve(_curvePool).exchange_underlying( int128(0), int128(1), daiBal, 0 ); // Refund leftovers IERC20(Constants.USDC).transfer( _sender, IERC20(Constants.USDC).balanceOf(address(this)) ); } }
IERC20(Constants.WETH).balanceOf(_solo)>=flashloanAmountWETH,"!weth-supply"
39,801
IERC20(Constants.WETH).balanceOf(_solo)>=flashloanAmountWETH
"erc20-approve-curvepool-failed"
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./weth/WETH.sol"; import "./dydx/DydxFlashloanBase.sol"; import "./dydx/IDydx.sol"; import "./maker/IDssCdpManager.sol"; import "./maker/IDssProxyActions.sol"; import "./maker/DssActionsBase.sol"; import "./curve/ICurveFiCurve.sol"; import "./Constants.sol"; contract CloseShortDAI is ICallee, DydxFlashloanBase, DssActionsBase { struct CSDParams { uint256 cdpId; // CdpId to close address curvePool; // Which curve pool to use uint256 mintAmountDAI; // Amount of DAI to mint uint256 withdrawAmountUSDC; // Amount of USDC to withdraw from vault uint256 flashloanAmountWETH; // Amount of WETH flashloaned } function callFunction( address sender, Account.Info memory account, bytes memory data ) public override { } function flashloanAndClose( address _sender, address _solo, address _curvePool, uint256 _cdpId, uint256 _ethUsdRatio18 // 1 ETH = <X> DAI? ) external payable { require(msg.value == 2, "!fee"); ISoloMargin solo = ISoloMargin(_solo); uint256 marketId = _getMarketIdFromTokenAddress(_solo, Constants.WETH); // Supplied = How much we want to withdraw // Borrowed = How much we want to loan ( uint256 withdrawAmountUSDC, uint256 mintAmountDAI ) = _getSuppliedAndBorrow(Constants.MCD_JOIN_USDC_A, _cdpId); // Given, ETH price, calculate how much WETH we need to flashloan // Dividing by 2 to gives us 200% col ratio uint256 flashloanAmountWETH = mintAmountDAI.mul(1 ether).div( _ethUsdRatio18.div(2) ); require( IERC20(Constants.WETH).balanceOf(_solo) >= flashloanAmountWETH, "!weth-supply" ); // Wrap ETH into WETH WETH(Constants.WETH).deposit{value: msg.value}(); WETH(Constants.WETH).approve(_solo, flashloanAmountWETH.add(msg.value)); Actions.ActionArgs[] memory operations = new Actions.ActionArgs[](3); operations[0] = _getWithdrawAction(marketId, flashloanAmountWETH); operations[1] = _getCallAction( abi.encode( CSDParams({ mintAmountDAI: mintAmountDAI, withdrawAmountUSDC: withdrawAmountUSDC, flashloanAmountWETH: flashloanAmountWETH, cdpId: _cdpId, curvePool: _curvePool }) ) ); operations[2] = _getDepositAction( marketId, flashloanAmountWETH.add(msg.value) ); Account.Info[] memory accountInfos = new Account.Info[](1); accountInfos[0] = _getAccountInfo(); solo.operate(accountInfos, operations); // Convert DAI leftovers to USDC uint256 daiBal = IERC20(Constants.DAI).balanceOf(address(this)); require(<FILL_ME>) ICurveFiCurve(_curvePool).exchange_underlying( int128(0), int128(1), daiBal, 0 ); // Refund leftovers IERC20(Constants.USDC).transfer( _sender, IERC20(Constants.USDC).balanceOf(address(this)) ); } }
IERC20(Constants.DAI).approve(_curvePool,daiBal),"erc20-approve-curvepool-failed"
39,801
IERC20(Constants.DAI).approve(_curvePool,daiBal)
"Sender not Authorized"
// SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.7.0; contract Authorizable { // This contract allows a flexible authorization scheme // The owner who can change authorization status address public owner; // A mapping from an address to its authorization status mapping(address => bool) public authorized; /// @dev We set the deployer to the owner constructor() { } /// @dev This modifier checks if the msg.sender is the owner modifier onlyOwner() { } /// @dev This modifier checks if an address is authorized modifier onlyAuthorized() { require(<FILL_ME>) _; } /// @dev Returns true if an address is authorized /// @param who the address to check /// @return true if authorized false if not function isAuthorized(address who) public view returns (bool) { } /// @dev Privileged function authorize an address /// @param who the address to authorize function authorize(address who) external onlyOwner { } /// @dev Privileged function to de authorize an address /// @param who The address to remove authorization from function deauthorize(address who) external onlyOwner { } /// @dev Function to change owner /// @param who The new owner address function setOwner(address who) public onlyOwner { } /// @dev Inheritable function which authorizes someone /// @param who the address to authorize function _authorize(address who) internal { } }
isAuthorized(msg.sender),"Sender not Authorized"
39,842
isAuthorized(msg.sender)
"Unable to transfer"
pragma solidity 0.6.12; import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMedianOracle.sol"; /** * @title ChainlinkToOracleBridge requests data from the Chainlink network and feeds it to xBTCs * Dominance Oracle * @dev This contract is designed to work on multiple networks, including local test networks */ contract ChainlinkToOracleBridge is ChainlinkClient, Ownable { uint256 public data; // details where and how to publish reports to the xBTC oracle IMedianOracle public oracle = IMedianOracle(0); uint32 public precisionReductionDecimals = 0; // details where and how to find the chainlink data bytes32 public chainlinkJobId; // Addresses of providers authorized to push reports. mapping (address => bool) public providers; event ProviderAdded(address provider); event ProviderRemoved(address provider); event OracleSet(IMedianOracle oracle); event PrecisionReductionDecimalsSet(uint32 decimals); event ChainlinkJobIdSet(bytes32 chainlinkJobId); /** * @notice Deploy the contract with a specified address for the LINK and Oracle contract addresses * @dev Sets the storage for the specified addresses * @param _link The address of the LINK token contract */ constructor(address _link, address _chainlinkOracle, bytes32 _chainlinkJobId) public { } /** * @notice Returns the address of the LINK token * @dev This is the public implementation for chainlinkTokenAddress, which is * an internal method of the ChainlinkClient contract */ function getChainlinkToken() public view returns (address) { } /** * @notice Creates a request to the specified Oracle contract address */ function createRequest(uint256 _payment) public onlyProvider returns (bytes32 requestId) { } /** * @notice The fulfill method from requests created by this contract * @dev The recordChainlinkFulfillment protects this function from being called * by anyone other than the oracle address that the request was sent to * @param _requestId The ID that was generated for the request * @param _data The answer provided by the oracle */ function fulfill(bytes32 _requestId, uint256 _data) public recordChainlinkFulfillment(_requestId) { } /** * @notice Allows the owner to withdraw any LINK balance on the contract */ function withdrawLink() public onlyOwner { LinkTokenInterface link = LinkTokenInterface(chainlinkTokenAddress()); require(<FILL_ME>) } /** * @notice Call this method if no response is received within 5 minutes * @param _requestId The ID that was generated for the request to cancel * @param _payment The payment specified for the request to cancel * @param _callbackFunctionId The bytes4 callback function ID specified for * the request to cancel * @param _expiration The expiration generated for the request to cancel */ function cancelRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunctionId, uint256 _expiration ) public onlyOwner { } /** * @dev Throws if called by any account other than a provider. */ modifier onlyProvider() { } /** * @notice Authorizes a provider. * @param provider Address of the provider. */ function addProvider(address provider) external onlyOwner { } /** * @notice Revokes provider authorization. * @param provider Address of the provider. */ function removeProvider(address provider) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle * @param _oracle Address of the new oracle */ function setOracle(IMedianOracle _oracle) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle precision reduction decimals * @param _precisionReductionDecimals How many decimals to reduce */ function setPrecisionReductionDecimals(uint32 _precisionReductionDecimals) external onlyOwner { } /** * @notice Set the chainlink job id for Chainlink requests * @param _chainlinkJobId The new chainlink job id */ function setChainlinkJobId(bytes32 _chainlinkJobId) external onlyOwner { } }
link.transfer(msg.sender,link.balanceOf(address(this))),"Unable to transfer"
39,966
link.transfer(msg.sender,link.balanceOf(address(this)))
"caller is not a provider"
pragma solidity 0.6.12; import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMedianOracle.sol"; /** * @title ChainlinkToOracleBridge requests data from the Chainlink network and feeds it to xBTCs * Dominance Oracle * @dev This contract is designed to work on multiple networks, including local test networks */ contract ChainlinkToOracleBridge is ChainlinkClient, Ownable { uint256 public data; // details where and how to publish reports to the xBTC oracle IMedianOracle public oracle = IMedianOracle(0); uint32 public precisionReductionDecimals = 0; // details where and how to find the chainlink data bytes32 public chainlinkJobId; // Addresses of providers authorized to push reports. mapping (address => bool) public providers; event ProviderAdded(address provider); event ProviderRemoved(address provider); event OracleSet(IMedianOracle oracle); event PrecisionReductionDecimalsSet(uint32 decimals); event ChainlinkJobIdSet(bytes32 chainlinkJobId); /** * @notice Deploy the contract with a specified address for the LINK and Oracle contract addresses * @dev Sets the storage for the specified addresses * @param _link The address of the LINK token contract */ constructor(address _link, address _chainlinkOracle, bytes32 _chainlinkJobId) public { } /** * @notice Returns the address of the LINK token * @dev This is the public implementation for chainlinkTokenAddress, which is * an internal method of the ChainlinkClient contract */ function getChainlinkToken() public view returns (address) { } /** * @notice Creates a request to the specified Oracle contract address */ function createRequest(uint256 _payment) public onlyProvider returns (bytes32 requestId) { } /** * @notice The fulfill method from requests created by this contract * @dev The recordChainlinkFulfillment protects this function from being called * by anyone other than the oracle address that the request was sent to * @param _requestId The ID that was generated for the request * @param _data The answer provided by the oracle */ function fulfill(bytes32 _requestId, uint256 _data) public recordChainlinkFulfillment(_requestId) { } /** * @notice Allows the owner to withdraw any LINK balance on the contract */ function withdrawLink() public onlyOwner { } /** * @notice Call this method if no response is received within 5 minutes * @param _requestId The ID that was generated for the request to cancel * @param _payment The payment specified for the request to cancel * @param _callbackFunctionId The bytes4 callback function ID specified for * the request to cancel * @param _expiration The expiration generated for the request to cancel */ function cancelRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunctionId, uint256 _expiration ) public onlyOwner { } /** * @dev Throws if called by any account other than a provider. */ modifier onlyProvider() { require(<FILL_ME>) _; } /** * @notice Authorizes a provider. * @param provider Address of the provider. */ function addProvider(address provider) external onlyOwner { } /** * @notice Revokes provider authorization. * @param provider Address of the provider. */ function removeProvider(address provider) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle * @param _oracle Address of the new oracle */ function setOracle(IMedianOracle _oracle) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle precision reduction decimals * @param _precisionReductionDecimals How many decimals to reduce */ function setPrecisionReductionDecimals(uint32 _precisionReductionDecimals) external onlyOwner { } /** * @notice Set the chainlink job id for Chainlink requests * @param _chainlinkJobId The new chainlink job id */ function setChainlinkJobId(bytes32 _chainlinkJobId) external onlyOwner { } }
providers[_msgSender()],"caller is not a provider"
39,966
providers[_msgSender()]
null
pragma solidity 0.6.12; import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMedianOracle.sol"; /** * @title ChainlinkToOracleBridge requests data from the Chainlink network and feeds it to xBTCs * Dominance Oracle * @dev This contract is designed to work on multiple networks, including local test networks */ contract ChainlinkToOracleBridge is ChainlinkClient, Ownable { uint256 public data; // details where and how to publish reports to the xBTC oracle IMedianOracle public oracle = IMedianOracle(0); uint32 public precisionReductionDecimals = 0; // details where and how to find the chainlink data bytes32 public chainlinkJobId; // Addresses of providers authorized to push reports. mapping (address => bool) public providers; event ProviderAdded(address provider); event ProviderRemoved(address provider); event OracleSet(IMedianOracle oracle); event PrecisionReductionDecimalsSet(uint32 decimals); event ChainlinkJobIdSet(bytes32 chainlinkJobId); /** * @notice Deploy the contract with a specified address for the LINK and Oracle contract addresses * @dev Sets the storage for the specified addresses * @param _link The address of the LINK token contract */ constructor(address _link, address _chainlinkOracle, bytes32 _chainlinkJobId) public { } /** * @notice Returns the address of the LINK token * @dev This is the public implementation for chainlinkTokenAddress, which is * an internal method of the ChainlinkClient contract */ function getChainlinkToken() public view returns (address) { } /** * @notice Creates a request to the specified Oracle contract address */ function createRequest(uint256 _payment) public onlyProvider returns (bytes32 requestId) { } /** * @notice The fulfill method from requests created by this contract * @dev The recordChainlinkFulfillment protects this function from being called * by anyone other than the oracle address that the request was sent to * @param _requestId The ID that was generated for the request * @param _data The answer provided by the oracle */ function fulfill(bytes32 _requestId, uint256 _data) public recordChainlinkFulfillment(_requestId) { } /** * @notice Allows the owner to withdraw any LINK balance on the contract */ function withdrawLink() public onlyOwner { } /** * @notice Call this method if no response is received within 5 minutes * @param _requestId The ID that was generated for the request to cancel * @param _payment The payment specified for the request to cancel * @param _callbackFunctionId The bytes4 callback function ID specified for * the request to cancel * @param _expiration The expiration generated for the request to cancel */ function cancelRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunctionId, uint256 _expiration ) public onlyOwner { } /** * @dev Throws if called by any account other than a provider. */ modifier onlyProvider() { } /** * @notice Authorizes a provider. * @param provider Address of the provider. */ function addProvider(address provider) external onlyOwner { require(<FILL_ME>) providers[provider] = true; emit ProviderAdded(provider); } /** * @notice Revokes provider authorization. * @param provider Address of the provider. */ function removeProvider(address provider) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle * @param _oracle Address of the new oracle */ function setOracle(IMedianOracle _oracle) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle precision reduction decimals * @param _precisionReductionDecimals How many decimals to reduce */ function setPrecisionReductionDecimals(uint32 _precisionReductionDecimals) external onlyOwner { } /** * @notice Set the chainlink job id for Chainlink requests * @param _chainlinkJobId The new chainlink job id */ function setChainlinkJobId(bytes32 _chainlinkJobId) external onlyOwner { } }
!providers[provider]
39,966
!providers[provider]
null
pragma solidity 0.6.12; import "@chainlink/contracts/src/v0.6/ChainlinkClient.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMedianOracle.sol"; /** * @title ChainlinkToOracleBridge requests data from the Chainlink network and feeds it to xBTCs * Dominance Oracle * @dev This contract is designed to work on multiple networks, including local test networks */ contract ChainlinkToOracleBridge is ChainlinkClient, Ownable { uint256 public data; // details where and how to publish reports to the xBTC oracle IMedianOracle public oracle = IMedianOracle(0); uint32 public precisionReductionDecimals = 0; // details where and how to find the chainlink data bytes32 public chainlinkJobId; // Addresses of providers authorized to push reports. mapping (address => bool) public providers; event ProviderAdded(address provider); event ProviderRemoved(address provider); event OracleSet(IMedianOracle oracle); event PrecisionReductionDecimalsSet(uint32 decimals); event ChainlinkJobIdSet(bytes32 chainlinkJobId); /** * @notice Deploy the contract with a specified address for the LINK and Oracle contract addresses * @dev Sets the storage for the specified addresses * @param _link The address of the LINK token contract */ constructor(address _link, address _chainlinkOracle, bytes32 _chainlinkJobId) public { } /** * @notice Returns the address of the LINK token * @dev This is the public implementation for chainlinkTokenAddress, which is * an internal method of the ChainlinkClient contract */ function getChainlinkToken() public view returns (address) { } /** * @notice Creates a request to the specified Oracle contract address */ function createRequest(uint256 _payment) public onlyProvider returns (bytes32 requestId) { } /** * @notice The fulfill method from requests created by this contract * @dev The recordChainlinkFulfillment protects this function from being called * by anyone other than the oracle address that the request was sent to * @param _requestId The ID that was generated for the request * @param _data The answer provided by the oracle */ function fulfill(bytes32 _requestId, uint256 _data) public recordChainlinkFulfillment(_requestId) { } /** * @notice Allows the owner to withdraw any LINK balance on the contract */ function withdrawLink() public onlyOwner { } /** * @notice Call this method if no response is received within 5 minutes * @param _requestId The ID that was generated for the request to cancel * @param _payment The payment specified for the request to cancel * @param _callbackFunctionId The bytes4 callback function ID specified for * the request to cancel * @param _expiration The expiration generated for the request to cancel */ function cancelRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunctionId, uint256 _expiration ) public onlyOwner { } /** * @dev Throws if called by any account other than a provider. */ modifier onlyProvider() { } /** * @notice Authorizes a provider. * @param provider Address of the provider. */ function addProvider(address provider) external onlyOwner { } /** * @notice Revokes provider authorization. * @param provider Address of the provider. */ function removeProvider(address provider) external onlyOwner { require(<FILL_ME>) delete providers[provider]; emit ProviderRemoved(provider); } /** * @notice Changes the xBTC dominance oracle * @param _oracle Address of the new oracle */ function setOracle(IMedianOracle _oracle) external onlyOwner { } /** * @notice Changes the xBTC dominance oracle precision reduction decimals * @param _precisionReductionDecimals How many decimals to reduce */ function setPrecisionReductionDecimals(uint32 _precisionReductionDecimals) external onlyOwner { } /** * @notice Set the chainlink job id for Chainlink requests * @param _chainlinkJobId The new chainlink job id */ function setChainlinkJobId(bytes32 _chainlinkJobId) external onlyOwner { } }
providers[provider]
39,966
providers[provider]
'Exceed limit total cap'
pragma solidity ^0.5.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } /* * @title: SafeMath * @dev: Helper contract functions to arithmatic operations safely. */ library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } /* * @title: Token * @dev: Interface contract for ERC20 tokens */ contract Token { function totalSupply() public view returns (uint256 supply); function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); function burn(uint256 amount) public; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval( address indexed _owner, address indexed _spender, uint256 _value ); } contract GenesisValidator { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; constructor() public { } address constant KAI_ADDRESS = 0xD9Ec3ff1f8be459Bb9369b4E79e9Ebcf7141C093; uint256 constant public HARD_CAP = 187500000000000000000000000; // 187.5M KAI address private owner; uint256 public currentCap; mapping (address => mapping(address => uint256)) public delAmount; mapping (address => uint256) public valAmount; mapping (address => EnumerableSet.AddressSet) private dels; bool public isRefundAble; bool public isEnded; // Functions with this modifier can only be executed by the owner modifier onlyOwner() { } function depositKAI(address _valAddr, uint256 _amount) public { require(isEnded == false, "The campaign is ended"); require(<FILL_ME>) require(Token(KAI_ADDRESS).transferFrom(msg.sender, address(this), _amount)); if(!dels[_valAddr].contains(msg.sender)) { dels[_valAddr].add(msg.sender); } delAmount[msg.sender][_valAddr] += _amount; currentCap = currentCap.add(_amount); valAmount[_valAddr] += _amount; } function burnKAI() public onlyOwner { } function withdrawKAI(address _valAddr) public { } function getBalanceKAIContract() public view returns (uint256) { } function getDelegators(address _valAddr) public view returns (address[] memory, uint256[] memory) { } function setIsRefundAble() public onlyOwner { } function setIsEnded() public onlyOwner { } function emergencyWithdrawalKAI(uint256 amount) public onlyOwner { } }
currentCap.add(_amount)<=HARD_CAP,'Exceed limit total cap'
39,971
currentCap.add(_amount)<=HARD_CAP
null
pragma solidity ^0.5.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } /* * @title: SafeMath * @dev: Helper contract functions to arithmatic operations safely. */ library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } /* * @title: Token * @dev: Interface contract for ERC20 tokens */ contract Token { function totalSupply() public view returns (uint256 supply); function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); function burn(uint256 amount) public; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval( address indexed _owner, address indexed _spender, uint256 _value ); } contract GenesisValidator { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; constructor() public { } address constant KAI_ADDRESS = 0xD9Ec3ff1f8be459Bb9369b4E79e9Ebcf7141C093; uint256 constant public HARD_CAP = 187500000000000000000000000; // 187.5M KAI address private owner; uint256 public currentCap; mapping (address => mapping(address => uint256)) public delAmount; mapping (address => uint256) public valAmount; mapping (address => EnumerableSet.AddressSet) private dels; bool public isRefundAble; bool public isEnded; // Functions with this modifier can only be executed by the owner modifier onlyOwner() { } function depositKAI(address _valAddr, uint256 _amount) public { require(isEnded == false, "The campaign is ended"); require(currentCap.add(_amount) <= HARD_CAP, 'Exceed limit total cap'); require(<FILL_ME>) if(!dels[_valAddr].contains(msg.sender)) { dels[_valAddr].add(msg.sender); } delAmount[msg.sender][_valAddr] += _amount; currentCap = currentCap.add(_amount); valAmount[_valAddr] += _amount; } function burnKAI() public onlyOwner { } function withdrawKAI(address _valAddr) public { } function getBalanceKAIContract() public view returns (uint256) { } function getDelegators(address _valAddr) public view returns (address[] memory, uint256[] memory) { } function setIsRefundAble() public onlyOwner { } function setIsEnded() public onlyOwner { } function emergencyWithdrawalKAI(uint256 amount) public onlyOwner { } }
Token(KAI_ADDRESS).transferFrom(msg.sender,address(this),_amount)
39,971
Token(KAI_ADDRESS).transferFrom(msg.sender,address(this),_amount)
"Can only withdraw once"
pragma solidity ^0.5.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } /* * @title: SafeMath * @dev: Helper contract functions to arithmatic operations safely. */ library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } /* * @title: Token * @dev: Interface contract for ERC20 tokens */ contract Token { function totalSupply() public view returns (uint256 supply); function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); function burn(uint256 amount) public; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval( address indexed _owner, address indexed _spender, uint256 _value ); } contract GenesisValidator { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; constructor() public { } address constant KAI_ADDRESS = 0xD9Ec3ff1f8be459Bb9369b4E79e9Ebcf7141C093; uint256 constant public HARD_CAP = 187500000000000000000000000; // 187.5M KAI address private owner; uint256 public currentCap; mapping (address => mapping(address => uint256)) public delAmount; mapping (address => uint256) public valAmount; mapping (address => EnumerableSet.AddressSet) private dels; bool public isRefundAble; bool public isEnded; // Functions with this modifier can only be executed by the owner modifier onlyOwner() { } function depositKAI(address _valAddr, uint256 _amount) public { } function burnKAI() public onlyOwner { } function withdrawKAI(address _valAddr) public { require(isRefundAble == true, "Is not withdrawable yet"); require(<FILL_ME>) uint256 amount = delAmount[msg.sender][_valAddr]; Token(KAI_ADDRESS).transfer(msg.sender, amount); delAmount[msg.sender][_valAddr] = 0; } function getBalanceKAIContract() public view returns (uint256) { } function getDelegators(address _valAddr) public view returns (address[] memory, uint256[] memory) { } function setIsRefundAble() public onlyOwner { } function setIsEnded() public onlyOwner { } function emergencyWithdrawalKAI(uint256 amount) public onlyOwner { } }
delAmount[msg.sender][_valAddr]>0,"Can only withdraw once"
39,971
delAmount[msg.sender][_valAddr]>0
"Not Harems owner"
/* _ _ | | | | | |__| | __ _ _ __ ___ _ __ ___ ___ | __ |/ _` | '__/ _ \ '_ ` _ \/ __| | | | | (_| | | | __/ | | | | \__ \ |_| |_|\__,_|_| \___|_| |_| |_|___/ 01100010 01111001 00100000 01000010 01101100 01100001 01100011 01101011 00100000 01001010 01100101 01110011 01110101 01110011 */ pragma solidity ^0.8.0; contract HaremsDrop is ERC721, ERC721Enumerable, Ownable { using SafeMath for uint256; // Make sure you have enough you change this to mainnet Harems Contract address before deploy ERC721 harems = ERC721(0xfC03dB45C058cf680CfEF6F1Ff3C0B5d82Fd62A4); uint256 MINT_PER_HAREMS = 1; uint256 MAX_SUPPLY = 200; uint256 public constant maxSupply = 200; uint256 private _reserved = 0; string public HAR_PROVENANCE = ""; uint256 public startingIndex; bool private _saleStarted; string public baseURI; constructor() ERC721("HaremsLive", "Season 1") { } modifier whenSaleStarted() { } function HaremsFreeClaim(uint256 tokenId) public whenSaleStarted { // Require the claimer to have at least one Harems from the specified contract require(tokenId > 427 && tokenId < 628, "Token ID invalid"); require(<FILL_ME>) // Set limit to no more than MINT_PER_HAREMS times of the owned Harems require(super.balanceOf(msg.sender) < harems.balanceOf(msg.sender) * MINT_PER_HAREMS, "Purchase more Harems"); require(super.totalSupply() < MAX_SUPPLY, "Maximum supply reached."); _safeMint(msg.sender, tokenId); } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function setBaseURI(string memory _URI) external onlyOwner { } function _baseURI() internal view override(ERC721) returns(string memory) { } function getReservedLeft() public view returns (uint256) { } // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Helper to list all the Shroomies of a wallet function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setStartingIndex() public { } function withdraw() public onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
harems.ownerOf(tokenId)==msg.sender,"Not Harems owner"
39,984
harems.ownerOf(tokenId)==msg.sender
"Purchase more Harems"
/* _ _ | | | | | |__| | __ _ _ __ ___ _ __ ___ ___ | __ |/ _` | '__/ _ \ '_ ` _ \/ __| | | | | (_| | | | __/ | | | | \__ \ |_| |_|\__,_|_| \___|_| |_| |_|___/ 01100010 01111001 00100000 01000010 01101100 01100001 01100011 01101011 00100000 01001010 01100101 01110011 01110101 01110011 */ pragma solidity ^0.8.0; contract HaremsDrop is ERC721, ERC721Enumerable, Ownable { using SafeMath for uint256; // Make sure you have enough you change this to mainnet Harems Contract address before deploy ERC721 harems = ERC721(0xfC03dB45C058cf680CfEF6F1Ff3C0B5d82Fd62A4); uint256 MINT_PER_HAREMS = 1; uint256 MAX_SUPPLY = 200; uint256 public constant maxSupply = 200; uint256 private _reserved = 0; string public HAR_PROVENANCE = ""; uint256 public startingIndex; bool private _saleStarted; string public baseURI; constructor() ERC721("HaremsLive", "Season 1") { } modifier whenSaleStarted() { } function HaremsFreeClaim(uint256 tokenId) public whenSaleStarted { // Require the claimer to have at least one Harems from the specified contract require(tokenId > 427 && tokenId < 628, "Token ID invalid"); require(harems.ownerOf(tokenId) == msg.sender, "Not Harems owner"); // Set limit to no more than MINT_PER_HAREMS times of the owned Harems require(<FILL_ME>) require(super.totalSupply() < MAX_SUPPLY, "Maximum supply reached."); _safeMint(msg.sender, tokenId); } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function setBaseURI(string memory _URI) external onlyOwner { } function _baseURI() internal view override(ERC721) returns(string memory) { } function getReservedLeft() public view returns (uint256) { } // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Helper to list all the Shroomies of a wallet function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setStartingIndex() public { } function withdraw() public onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
super.balanceOf(msg.sender)<harems.balanceOf(msg.sender)*MINT_PER_HAREMS,"Purchase more Harems"
39,984
super.balanceOf(msg.sender)<harems.balanceOf(msg.sender)*MINT_PER_HAREMS
"Maximum supply reached."
/* _ _ | | | | | |__| | __ _ _ __ ___ _ __ ___ ___ | __ |/ _` | '__/ _ \ '_ ` _ \/ __| | | | | (_| | | | __/ | | | | \__ \ |_| |_|\__,_|_| \___|_| |_| |_|___/ 01100010 01111001 00100000 01000010 01101100 01100001 01100011 01101011 00100000 01001010 01100101 01110011 01110101 01110011 */ pragma solidity ^0.8.0; contract HaremsDrop is ERC721, ERC721Enumerable, Ownable { using SafeMath for uint256; // Make sure you have enough you change this to mainnet Harems Contract address before deploy ERC721 harems = ERC721(0xfC03dB45C058cf680CfEF6F1Ff3C0B5d82Fd62A4); uint256 MINT_PER_HAREMS = 1; uint256 MAX_SUPPLY = 200; uint256 public constant maxSupply = 200; uint256 private _reserved = 0; string public HAR_PROVENANCE = ""; uint256 public startingIndex; bool private _saleStarted; string public baseURI; constructor() ERC721("HaremsLive", "Season 1") { } modifier whenSaleStarted() { } function HaremsFreeClaim(uint256 tokenId) public whenSaleStarted { // Require the claimer to have at least one Harems from the specified contract require(tokenId > 427 && tokenId < 628, "Token ID invalid"); require(harems.ownerOf(tokenId) == msg.sender, "Not Harems owner"); // Set limit to no more than MINT_PER_HAREMS times of the owned Harems require(super.balanceOf(msg.sender) < harems.balanceOf(msg.sender) * MINT_PER_HAREMS, "Purchase more Harems"); require(<FILL_ME>) _safeMint(msg.sender, tokenId); } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function setBaseURI(string memory _URI) external onlyOwner { } function _baseURI() internal view override(ERC721) returns(string memory) { } function getReservedLeft() public view returns (uint256) { } // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Helper to list all the Shroomies of a wallet function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setStartingIndex() public { } function withdraw() public onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
super.totalSupply()<MAX_SUPPLY,"Maximum supply reached."
39,984
super.totalSupply()<MAX_SUPPLY
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } // ---------------------------------------------------------------------------- // 解锁记录合约 // ---------------------------------------------------------------------------- contract IMCUnlockRecord is Owned{ // 解锁记录添加日志 event UnlockRecordAdd(uint _date, bytes32 _hash, string _data, string _fileFormat, uint _stripLen); // Token解锁统计记录 struct RecordInfo { uint date; // 记录日期(解锁ID) bytes32 hash; // 文件hash string data; // 统计数据 string fileFormat; // 上链存证的文件格式 uint stripLen; // 上链存证的文件分区 } // 执行者地址 address public executorAddress; // 解锁记录 mapping(uint => RecordInfo) public unlockRecord; constructor() public{ } /** * 修改executorAddress,只有owner能够修改 * @param _addr address 地址 */ function modifyExecutorAddr(address _addr) public onlyOwner { } /** * 解锁记录添加 * @param _date uint 记录日期(解锁ID) * @param _hash bytes32 文件hash * @param _data string 统计数据 * @param _fileFormat string 上链存证的文件格式 * @param _stripLen uint 上链存证的文件分区 * @return success 添加成功 */ function unlockRecordAdd(uint _date, bytes32 _hash, string _data, string _fileFormat, uint _stripLen) public returns (bool) { // 调用者需和Owner设置的执行者地址一致 require(msg.sender == executorAddress); // 防止重复记录 require(<FILL_ME>) // 记录解锁信息 unlockRecord[_date] = RecordInfo(_date, _hash, _data, _fileFormat, _stripLen); // 解锁日志记录 emit UnlockRecordAdd(_date, _hash, _data, _fileFormat, _stripLen); return true; } }
unlockRecord[_date].date!=_date
40,016
unlockRecord[_date].date!=_date
"SafeMath: Add Overflow"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; /// reference: https://github.com/boringcrypto/BoringSolidity/blob/master/contracts/libraries/BoringMath.sol /// changelog: renamed "BoringMath" => "SafeMath" /// @notice A library for performing overflow-/underflow-safe math, /// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math). library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { require(<FILL_ME>) } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function to128(uint256 a) internal pure returns (uint128 c) { } function to64(uint256 a) internal pure returns (uint64 c) { } function to32(uint256 a) internal pure returns (uint32 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128. library SafeMath128 { function add(uint128 a, uint128 b) internal pure returns (uint128 c) { } function sub(uint128 a, uint128 b) internal pure returns (uint128 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64. library SafeMath64 { function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } function sub(uint64 a, uint64 b) internal pure returns (uint64 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32. library SafeMath32 { function add(uint32 a, uint32 b) internal pure returns (uint32 c) { } function sub(uint32 a, uint32 b) internal pure returns (uint32 c) { } }
(c=a+b)>=b,"SafeMath: Add Overflow"
40,035
(c=a+b)>=b
"SafeMath: Underflow"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; /// reference: https://github.com/boringcrypto/BoringSolidity/blob/master/contracts/libraries/BoringMath.sol /// changelog: renamed "BoringMath" => "SafeMath" /// @notice A library for performing overflow-/underflow-safe math, /// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math). library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require(<FILL_ME>) } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function to128(uint256 a) internal pure returns (uint128 c) { } function to64(uint256 a) internal pure returns (uint64 c) { } function to32(uint256 a) internal pure returns (uint32 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128. library SafeMath128 { function add(uint128 a, uint128 b) internal pure returns (uint128 c) { } function sub(uint128 a, uint128 b) internal pure returns (uint128 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64. library SafeMath64 { function add(uint64 a, uint64 b) internal pure returns (uint64 c) { } function sub(uint64 a, uint64 b) internal pure returns (uint64 c) { } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32. library SafeMath32 { function add(uint32 a, uint32 b) internal pure returns (uint32 c) { } function sub(uint32 a, uint32 b) internal pure returns (uint32 c) { } }
(c=a-b)<=a,"SafeMath: Underflow"
40,035
(c=a-b)<=a
"USER_INVALID"
contract UserQuota is Ownable { mapping(address => uint256) public userQuota; event SetQuota(address user, uint256 amount); function setUserQuota(address[] memory users, uint256[] memory quotas) external onlyOwner { require(users.length == quotas.length, "PARAMS_LENGTH_NOT_MATCH"); for(uint256 i = 0; i< users.length; i++) { require(<FILL_ME>) userQuota[users[i]] = quotas[i]; emit SetQuota(users[i],quotas[i]); } } function getUserQuota(address user) external view returns (int) { } }
users[i]!=address(0),"USER_INVALID"
40,076
users[i]!=address(0)
null
/* This contract is the owner of TokenController. This contract is responsible for calling all onlyOwner functions in TokenController. This contract has a copy of all functions in TokenController. Functions with name starting with 'ms' are not in TokenController. They are for admin purposes (eg. transfer eth out of MultiSigOwner) MultiSigOwner contract has three owners The first time a function is called, an action is created. The action is in pending state until another owner approve the action. Once another owner approves, the action will be executed immediately. There can only be one pending/in flight action at a time. To approve an action the owner needs to call the same function with the same parameter. If the function or parameter doesn't match the current in flight action, it is reverted. Each owner can only approve/veto the current action once. Vetoing an in flight also requires 2/3 owners to veto. */ contract MultiSigOwner { mapping (address => bool) public owners; //mapping that keeps track of which owner had already voted in the current action mapping(address=>bool) public voted; //The controller instance that this multisig controls TokenController public tokenController; //list of all owners of the multisigOwner address[3] public ownerList; bool public initialized; //current owner action OwnerAction public ownerAction; modifier onlyOwner() { } struct OwnerAction { bytes callData; string actionName; uint8 approveSigs; uint8 disappoveSigs; } event ActionInitiated(string actionName); event ActionExecuted(string actionName); event ActionVetoed(string actionName); //Initial Owners are set during deployment function msInitialize(address[3] _initialOwners) public { require(!initialized); require(<FILL_ME>) owners[_initialOwners[0]] = true; owners[_initialOwners[1]] = true; owners[_initialOwners[2]] = true; ownerList[0] = _initialOwners[0]; ownerList[1] = _initialOwners[1]; ownerList[2] = _initialOwners[2]; initialized = true; } function() external payable { } /** * @dev initialize an action if there's no in flight action or sign the current action if the second owner is calling the same function with the same parameters (same call data) */ function _initOrSignOwnerAction(string _actionName) internal { } function _deleteOwnerAction() internal { } function msUpgradeImplementation(address _newImplementation) external onlyOwner { } function msTransferProxyOwnership(address _newProxyOwner) external onlyOwner { } function msClaimProxyOwnership() external onlyOwner { } /** * @dev Replace a current owner with a new owner */ function msUpdateOwner (address _oldOwner, address _newOwner) external onlyOwner { } /** * @dev Let MultisigOwner contract claim ownership of a claimable contract */ function msIssueClaimContract(address _other) external onlyOwner { } /** * @dev Transfer ownership of a contract that this contract owns to a new owner *@param _contractAddr The contract that this contract currently owns *@param _newOwner The address to which the ownership will be transferred to */ function msReclaimContract(address _contractAddr, address _newOwner) external onlyOwner { } /** * @dev Transfer all eth in this contract address to another address *@param _to The eth will be send to this address */ function msReclaimEther(address _to) external onlyOwner { } /** * @dev Transfer all specifc tokens in this contract address to another address *@param _token The token address of the token *@param _to The tokens will be send to this address */ function msReclaimToken(ERC20 _token, address _to) external onlyOwner { } /** * @dev Set the instance of TokenController that this contract will be calling */ function msSetTokenController (address _newController) public onlyOwner { } function msTransferControllerProxyOwnership(address _newOwner) external onlyOwner { } function msClaimControllerProxyOwnership() external onlyOwner { } function msUpgradeControllerProxyImplTo(address _implementation) external onlyOwner { } /** * @dev Veto the current in flight action. Reverts if no current action */ function msVeto() public onlyOwner { } /** * @dev Internal function used to call functions of tokenController. If no in flight action, create a new one. Otherwise sign and the action if the msg.data matches call data matches. Reverts otherwise */ function _signOrExecute(string _actionName) internal { } /* ============================================ THE FOLLOWING FUNCTIONS CALLED TO TokenController. They share the same function signatures as functions in TokenController. They will generate the correct callData so that the same function will be called in TokenController. */ function initialize() external onlyOwner { } function transferTusdProxyOwnership(address /*_newOwner*/) external onlyOwner { } function claimTusdProxyOwnership() external onlyOwner { } function upgradeTusdProxyImplTo(address /*_implementation*/) external onlyOwner { } function transferOwnership(address /*newOwner*/) external onlyOwner { } function claimOwnership() external onlyOwner { } function setMintThresholds(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function setMintLimits(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function refillInstantMintPool() external onlyOwner { } function refillRatifiedMintPool() external onlyOwner { } function refillMultiSigMintPool() external onlyOwner { } function requestMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function instantMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function ratifyMint(uint256 /*_index*/, address /*_to*/, uint256 /*_value*/) external onlyOwner { } function revokeMint(uint256 /*_index*/) external onlyOwner { } function transferMintKey(address /*_newMintKey*/) external onlyOwner { } function invalidateAllPendingMints() external onlyOwner { } function pauseMints() external onlyOwner { } function unpauseMints() external onlyOwner { } function pauseMint(uint /*_opIndex*/) external onlyOwner { } function unpauseMint(uint /*_opIndex*/) external onlyOwner { } function setToken(CompliantDepositTokenWithHook /*_newContract*/) external onlyOwner { } function setRegistry(Registry /*_registry*/) external onlyOwner { } function setTokenRegistry(Registry /*_registry*/) external onlyOwner { } function issueClaimOwnership(address /*_other*/) external onlyOwner { } function transferChild(Ownable /*_child*/, address /*_newOwner*/) external onlyOwner { } function requestReclaimContract(Ownable /*_other*/) external onlyOwner { } function requestReclaimEther() external onlyOwner { } function requestReclaimToken(ERC20 /*_token*/) external onlyOwner { } function setFastPause(address /*_newFastPause*/) external onlyOwner { } function pauseToken() external onlyOwner { } function wipeBlackListedTrueUSD(address /*_blacklistedAddress*/) external onlyOwner { } function setBurnBounds(uint256 /*_min*/, uint256 /*_max*/) external onlyOwner { } function reclaimEther(address /*_to*/) external onlyOwner { } function reclaimToken(ERC20 /*_token*/, address /*_to*/) external onlyOwner { } }
_initialOwners[0]!=address(0)&&_initialOwners[1]!=address(0)&&_initialOwners[2]!=address(0)
40,096
_initialOwners[0]!=address(0)&&_initialOwners[1]!=address(0)&&_initialOwners[2]!=address(0)
"already voted"
/* This contract is the owner of TokenController. This contract is responsible for calling all onlyOwner functions in TokenController. This contract has a copy of all functions in TokenController. Functions with name starting with 'ms' are not in TokenController. They are for admin purposes (eg. transfer eth out of MultiSigOwner) MultiSigOwner contract has three owners The first time a function is called, an action is created. The action is in pending state until another owner approve the action. Once another owner approves, the action will be executed immediately. There can only be one pending/in flight action at a time. To approve an action the owner needs to call the same function with the same parameter. If the function or parameter doesn't match the current in flight action, it is reverted. Each owner can only approve/veto the current action once. Vetoing an in flight also requires 2/3 owners to veto. */ contract MultiSigOwner { mapping (address => bool) public owners; //mapping that keeps track of which owner had already voted in the current action mapping(address=>bool) public voted; //The controller instance that this multisig controls TokenController public tokenController; //list of all owners of the multisigOwner address[3] public ownerList; bool public initialized; //current owner action OwnerAction public ownerAction; modifier onlyOwner() { } struct OwnerAction { bytes callData; string actionName; uint8 approveSigs; uint8 disappoveSigs; } event ActionInitiated(string actionName); event ActionExecuted(string actionName); event ActionVetoed(string actionName); //Initial Owners are set during deployment function msInitialize(address[3] _initialOwners) public { } function() external payable { } /** * @dev initialize an action if there's no in flight action or sign the current action if the second owner is calling the same function with the same parameters (same call data) */ function _initOrSignOwnerAction(string _actionName) internal { require(<FILL_ME>) if (ownerAction.callData.length == 0) { emit ActionInitiated(_actionName); ownerAction.callData = msg.data; } require(keccak256(ownerAction.callData) == keccak256(msg.data), "different from the current action"); ownerAction.approveSigs += 1; voted[msg.sender] = true; } function _deleteOwnerAction() internal { } function msUpgradeImplementation(address _newImplementation) external onlyOwner { } function msTransferProxyOwnership(address _newProxyOwner) external onlyOwner { } function msClaimProxyOwnership() external onlyOwner { } /** * @dev Replace a current owner with a new owner */ function msUpdateOwner (address _oldOwner, address _newOwner) external onlyOwner { } /** * @dev Let MultisigOwner contract claim ownership of a claimable contract */ function msIssueClaimContract(address _other) external onlyOwner { } /** * @dev Transfer ownership of a contract that this contract owns to a new owner *@param _contractAddr The contract that this contract currently owns *@param _newOwner The address to which the ownership will be transferred to */ function msReclaimContract(address _contractAddr, address _newOwner) external onlyOwner { } /** * @dev Transfer all eth in this contract address to another address *@param _to The eth will be send to this address */ function msReclaimEther(address _to) external onlyOwner { } /** * @dev Transfer all specifc tokens in this contract address to another address *@param _token The token address of the token *@param _to The tokens will be send to this address */ function msReclaimToken(ERC20 _token, address _to) external onlyOwner { } /** * @dev Set the instance of TokenController that this contract will be calling */ function msSetTokenController (address _newController) public onlyOwner { } function msTransferControllerProxyOwnership(address _newOwner) external onlyOwner { } function msClaimControllerProxyOwnership() external onlyOwner { } function msUpgradeControllerProxyImplTo(address _implementation) external onlyOwner { } /** * @dev Veto the current in flight action. Reverts if no current action */ function msVeto() public onlyOwner { } /** * @dev Internal function used to call functions of tokenController. If no in flight action, create a new one. Otherwise sign and the action if the msg.data matches call data matches. Reverts otherwise */ function _signOrExecute(string _actionName) internal { } /* ============================================ THE FOLLOWING FUNCTIONS CALLED TO TokenController. They share the same function signatures as functions in TokenController. They will generate the correct callData so that the same function will be called in TokenController. */ function initialize() external onlyOwner { } function transferTusdProxyOwnership(address /*_newOwner*/) external onlyOwner { } function claimTusdProxyOwnership() external onlyOwner { } function upgradeTusdProxyImplTo(address /*_implementation*/) external onlyOwner { } function transferOwnership(address /*newOwner*/) external onlyOwner { } function claimOwnership() external onlyOwner { } function setMintThresholds(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function setMintLimits(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function refillInstantMintPool() external onlyOwner { } function refillRatifiedMintPool() external onlyOwner { } function refillMultiSigMintPool() external onlyOwner { } function requestMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function instantMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function ratifyMint(uint256 /*_index*/, address /*_to*/, uint256 /*_value*/) external onlyOwner { } function revokeMint(uint256 /*_index*/) external onlyOwner { } function transferMintKey(address /*_newMintKey*/) external onlyOwner { } function invalidateAllPendingMints() external onlyOwner { } function pauseMints() external onlyOwner { } function unpauseMints() external onlyOwner { } function pauseMint(uint /*_opIndex*/) external onlyOwner { } function unpauseMint(uint /*_opIndex*/) external onlyOwner { } function setToken(CompliantDepositTokenWithHook /*_newContract*/) external onlyOwner { } function setRegistry(Registry /*_registry*/) external onlyOwner { } function setTokenRegistry(Registry /*_registry*/) external onlyOwner { } function issueClaimOwnership(address /*_other*/) external onlyOwner { } function transferChild(Ownable /*_child*/, address /*_newOwner*/) external onlyOwner { } function requestReclaimContract(Ownable /*_other*/) external onlyOwner { } function requestReclaimEther() external onlyOwner { } function requestReclaimToken(ERC20 /*_token*/) external onlyOwner { } function setFastPause(address /*_newFastPause*/) external onlyOwner { } function pauseToken() external onlyOwner { } function wipeBlackListedTrueUSD(address /*_blacklistedAddress*/) external onlyOwner { } function setBurnBounds(uint256 /*_min*/, uint256 /*_max*/) external onlyOwner { } function reclaimEther(address /*_to*/) external onlyOwner { } function reclaimToken(ERC20 /*_token*/, address /*_to*/) external onlyOwner { } }
!voted[msg.sender],"already voted"
40,096
!voted[msg.sender]
"different from the current action"
/* This contract is the owner of TokenController. This contract is responsible for calling all onlyOwner functions in TokenController. This contract has a copy of all functions in TokenController. Functions with name starting with 'ms' are not in TokenController. They are for admin purposes (eg. transfer eth out of MultiSigOwner) MultiSigOwner contract has three owners The first time a function is called, an action is created. The action is in pending state until another owner approve the action. Once another owner approves, the action will be executed immediately. There can only be one pending/in flight action at a time. To approve an action the owner needs to call the same function with the same parameter. If the function or parameter doesn't match the current in flight action, it is reverted. Each owner can only approve/veto the current action once. Vetoing an in flight also requires 2/3 owners to veto. */ contract MultiSigOwner { mapping (address => bool) public owners; //mapping that keeps track of which owner had already voted in the current action mapping(address=>bool) public voted; //The controller instance that this multisig controls TokenController public tokenController; //list of all owners of the multisigOwner address[3] public ownerList; bool public initialized; //current owner action OwnerAction public ownerAction; modifier onlyOwner() { } struct OwnerAction { bytes callData; string actionName; uint8 approveSigs; uint8 disappoveSigs; } event ActionInitiated(string actionName); event ActionExecuted(string actionName); event ActionVetoed(string actionName); //Initial Owners are set during deployment function msInitialize(address[3] _initialOwners) public { } function() external payable { } /** * @dev initialize an action if there's no in flight action or sign the current action if the second owner is calling the same function with the same parameters (same call data) */ function _initOrSignOwnerAction(string _actionName) internal { require(!voted[msg.sender], "already voted"); if (ownerAction.callData.length == 0) { emit ActionInitiated(_actionName); ownerAction.callData = msg.data; } require(<FILL_ME>) ownerAction.approveSigs += 1; voted[msg.sender] = true; } function _deleteOwnerAction() internal { } function msUpgradeImplementation(address _newImplementation) external onlyOwner { } function msTransferProxyOwnership(address _newProxyOwner) external onlyOwner { } function msClaimProxyOwnership() external onlyOwner { } /** * @dev Replace a current owner with a new owner */ function msUpdateOwner (address _oldOwner, address _newOwner) external onlyOwner { } /** * @dev Let MultisigOwner contract claim ownership of a claimable contract */ function msIssueClaimContract(address _other) external onlyOwner { } /** * @dev Transfer ownership of a contract that this contract owns to a new owner *@param _contractAddr The contract that this contract currently owns *@param _newOwner The address to which the ownership will be transferred to */ function msReclaimContract(address _contractAddr, address _newOwner) external onlyOwner { } /** * @dev Transfer all eth in this contract address to another address *@param _to The eth will be send to this address */ function msReclaimEther(address _to) external onlyOwner { } /** * @dev Transfer all specifc tokens in this contract address to another address *@param _token The token address of the token *@param _to The tokens will be send to this address */ function msReclaimToken(ERC20 _token, address _to) external onlyOwner { } /** * @dev Set the instance of TokenController that this contract will be calling */ function msSetTokenController (address _newController) public onlyOwner { } function msTransferControllerProxyOwnership(address _newOwner) external onlyOwner { } function msClaimControllerProxyOwnership() external onlyOwner { } function msUpgradeControllerProxyImplTo(address _implementation) external onlyOwner { } /** * @dev Veto the current in flight action. Reverts if no current action */ function msVeto() public onlyOwner { } /** * @dev Internal function used to call functions of tokenController. If no in flight action, create a new one. Otherwise sign and the action if the msg.data matches call data matches. Reverts otherwise */ function _signOrExecute(string _actionName) internal { } /* ============================================ THE FOLLOWING FUNCTIONS CALLED TO TokenController. They share the same function signatures as functions in TokenController. They will generate the correct callData so that the same function will be called in TokenController. */ function initialize() external onlyOwner { } function transferTusdProxyOwnership(address /*_newOwner*/) external onlyOwner { } function claimTusdProxyOwnership() external onlyOwner { } function upgradeTusdProxyImplTo(address /*_implementation*/) external onlyOwner { } function transferOwnership(address /*newOwner*/) external onlyOwner { } function claimOwnership() external onlyOwner { } function setMintThresholds(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function setMintLimits(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function refillInstantMintPool() external onlyOwner { } function refillRatifiedMintPool() external onlyOwner { } function refillMultiSigMintPool() external onlyOwner { } function requestMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function instantMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function ratifyMint(uint256 /*_index*/, address /*_to*/, uint256 /*_value*/) external onlyOwner { } function revokeMint(uint256 /*_index*/) external onlyOwner { } function transferMintKey(address /*_newMintKey*/) external onlyOwner { } function invalidateAllPendingMints() external onlyOwner { } function pauseMints() external onlyOwner { } function unpauseMints() external onlyOwner { } function pauseMint(uint /*_opIndex*/) external onlyOwner { } function unpauseMint(uint /*_opIndex*/) external onlyOwner { } function setToken(CompliantDepositTokenWithHook /*_newContract*/) external onlyOwner { } function setRegistry(Registry /*_registry*/) external onlyOwner { } function setTokenRegistry(Registry /*_registry*/) external onlyOwner { } function issueClaimOwnership(address /*_other*/) external onlyOwner { } function transferChild(Ownable /*_child*/, address /*_newOwner*/) external onlyOwner { } function requestReclaimContract(Ownable /*_other*/) external onlyOwner { } function requestReclaimEther() external onlyOwner { } function requestReclaimToken(ERC20 /*_token*/) external onlyOwner { } function setFastPause(address /*_newFastPause*/) external onlyOwner { } function pauseToken() external onlyOwner { } function wipeBlackListedTrueUSD(address /*_blacklistedAddress*/) external onlyOwner { } function setBurnBounds(uint256 /*_min*/, uint256 /*_max*/) external onlyOwner { } function reclaimEther(address /*_to*/) external onlyOwner { } function reclaimToken(ERC20 /*_token*/, address /*_to*/) external onlyOwner { } }
keccak256(ownerAction.callData)==keccak256(msg.data),"different from the current action"
40,096
keccak256(ownerAction.callData)==keccak256(msg.data)
null
/* This contract is the owner of TokenController. This contract is responsible for calling all onlyOwner functions in TokenController. This contract has a copy of all functions in TokenController. Functions with name starting with 'ms' are not in TokenController. They are for admin purposes (eg. transfer eth out of MultiSigOwner) MultiSigOwner contract has three owners The first time a function is called, an action is created. The action is in pending state until another owner approve the action. Once another owner approves, the action will be executed immediately. There can only be one pending/in flight action at a time. To approve an action the owner needs to call the same function with the same parameter. If the function or parameter doesn't match the current in flight action, it is reverted. Each owner can only approve/veto the current action once. Vetoing an in flight also requires 2/3 owners to veto. */ contract MultiSigOwner { mapping (address => bool) public owners; //mapping that keeps track of which owner had already voted in the current action mapping(address=>bool) public voted; //The controller instance that this multisig controls TokenController public tokenController; //list of all owners of the multisigOwner address[3] public ownerList; bool public initialized; //current owner action OwnerAction public ownerAction; modifier onlyOwner() { } struct OwnerAction { bytes callData; string actionName; uint8 approveSigs; uint8 disappoveSigs; } event ActionInitiated(string actionName); event ActionExecuted(string actionName); event ActionVetoed(string actionName); //Initial Owners are set during deployment function msInitialize(address[3] _initialOwners) public { } function() external payable { } /** * @dev initialize an action if there's no in flight action or sign the current action if the second owner is calling the same function with the same parameters (same call data) */ function _initOrSignOwnerAction(string _actionName) internal { } function _deleteOwnerAction() internal { } function msUpgradeImplementation(address _newImplementation) external onlyOwner { } function msTransferProxyOwnership(address _newProxyOwner) external onlyOwner { } function msClaimProxyOwnership() external onlyOwner { } /** * @dev Replace a current owner with a new owner */ function msUpdateOwner (address _oldOwner, address _newOwner) external onlyOwner { require(<FILL_ME>) _initOrSignOwnerAction("updateOwner"); if (ownerAction.approveSigs > 1) { owners[_oldOwner] = false; owners[_newOwner] = true; for (uint8 i; i < 3; i++) { if (ownerList[i] == _oldOwner) { ownerList[i] = _newOwner; } } emit ActionExecuted("updateOwner"); _deleteOwnerAction(); } } /** * @dev Let MultisigOwner contract claim ownership of a claimable contract */ function msIssueClaimContract(address _other) external onlyOwner { } /** * @dev Transfer ownership of a contract that this contract owns to a new owner *@param _contractAddr The contract that this contract currently owns *@param _newOwner The address to which the ownership will be transferred to */ function msReclaimContract(address _contractAddr, address _newOwner) external onlyOwner { } /** * @dev Transfer all eth in this contract address to another address *@param _to The eth will be send to this address */ function msReclaimEther(address _to) external onlyOwner { } /** * @dev Transfer all specifc tokens in this contract address to another address *@param _token The token address of the token *@param _to The tokens will be send to this address */ function msReclaimToken(ERC20 _token, address _to) external onlyOwner { } /** * @dev Set the instance of TokenController that this contract will be calling */ function msSetTokenController (address _newController) public onlyOwner { } function msTransferControllerProxyOwnership(address _newOwner) external onlyOwner { } function msClaimControllerProxyOwnership() external onlyOwner { } function msUpgradeControllerProxyImplTo(address _implementation) external onlyOwner { } /** * @dev Veto the current in flight action. Reverts if no current action */ function msVeto() public onlyOwner { } /** * @dev Internal function used to call functions of tokenController. If no in flight action, create a new one. Otherwise sign and the action if the msg.data matches call data matches. Reverts otherwise */ function _signOrExecute(string _actionName) internal { } /* ============================================ THE FOLLOWING FUNCTIONS CALLED TO TokenController. They share the same function signatures as functions in TokenController. They will generate the correct callData so that the same function will be called in TokenController. */ function initialize() external onlyOwner { } function transferTusdProxyOwnership(address /*_newOwner*/) external onlyOwner { } function claimTusdProxyOwnership() external onlyOwner { } function upgradeTusdProxyImplTo(address /*_implementation*/) external onlyOwner { } function transferOwnership(address /*newOwner*/) external onlyOwner { } function claimOwnership() external onlyOwner { } function setMintThresholds(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function setMintLimits(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function refillInstantMintPool() external onlyOwner { } function refillRatifiedMintPool() external onlyOwner { } function refillMultiSigMintPool() external onlyOwner { } function requestMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function instantMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function ratifyMint(uint256 /*_index*/, address /*_to*/, uint256 /*_value*/) external onlyOwner { } function revokeMint(uint256 /*_index*/) external onlyOwner { } function transferMintKey(address /*_newMintKey*/) external onlyOwner { } function invalidateAllPendingMints() external onlyOwner { } function pauseMints() external onlyOwner { } function unpauseMints() external onlyOwner { } function pauseMint(uint /*_opIndex*/) external onlyOwner { } function unpauseMint(uint /*_opIndex*/) external onlyOwner { } function setToken(CompliantDepositTokenWithHook /*_newContract*/) external onlyOwner { } function setRegistry(Registry /*_registry*/) external onlyOwner { } function setTokenRegistry(Registry /*_registry*/) external onlyOwner { } function issueClaimOwnership(address /*_other*/) external onlyOwner { } function transferChild(Ownable /*_child*/, address /*_newOwner*/) external onlyOwner { } function requestReclaimContract(Ownable /*_other*/) external onlyOwner { } function requestReclaimEther() external onlyOwner { } function requestReclaimToken(ERC20 /*_token*/) external onlyOwner { } function setFastPause(address /*_newFastPause*/) external onlyOwner { } function pauseToken() external onlyOwner { } function wipeBlackListedTrueUSD(address /*_blacklistedAddress*/) external onlyOwner { } function setBurnBounds(uint256 /*_min*/, uint256 /*_max*/) external onlyOwner { } function reclaimEther(address /*_to*/) external onlyOwner { } function reclaimToken(ERC20 /*_token*/, address /*_to*/) external onlyOwner { } }
owners[_oldOwner]&&!owners[_newOwner]
40,096
owners[_oldOwner]&&!owners[_newOwner]
"tokenController call failed"
/* This contract is the owner of TokenController. This contract is responsible for calling all onlyOwner functions in TokenController. This contract has a copy of all functions in TokenController. Functions with name starting with 'ms' are not in TokenController. They are for admin purposes (eg. transfer eth out of MultiSigOwner) MultiSigOwner contract has three owners The first time a function is called, an action is created. The action is in pending state until another owner approve the action. Once another owner approves, the action will be executed immediately. There can only be one pending/in flight action at a time. To approve an action the owner needs to call the same function with the same parameter. If the function or parameter doesn't match the current in flight action, it is reverted. Each owner can only approve/veto the current action once. Vetoing an in flight also requires 2/3 owners to veto. */ contract MultiSigOwner { mapping (address => bool) public owners; //mapping that keeps track of which owner had already voted in the current action mapping(address=>bool) public voted; //The controller instance that this multisig controls TokenController public tokenController; //list of all owners of the multisigOwner address[3] public ownerList; bool public initialized; //current owner action OwnerAction public ownerAction; modifier onlyOwner() { } struct OwnerAction { bytes callData; string actionName; uint8 approveSigs; uint8 disappoveSigs; } event ActionInitiated(string actionName); event ActionExecuted(string actionName); event ActionVetoed(string actionName); //Initial Owners are set during deployment function msInitialize(address[3] _initialOwners) public { } function() external payable { } /** * @dev initialize an action if there's no in flight action or sign the current action if the second owner is calling the same function with the same parameters (same call data) */ function _initOrSignOwnerAction(string _actionName) internal { } function _deleteOwnerAction() internal { } function msUpgradeImplementation(address _newImplementation) external onlyOwner { } function msTransferProxyOwnership(address _newProxyOwner) external onlyOwner { } function msClaimProxyOwnership() external onlyOwner { } /** * @dev Replace a current owner with a new owner */ function msUpdateOwner (address _oldOwner, address _newOwner) external onlyOwner { } /** * @dev Let MultisigOwner contract claim ownership of a claimable contract */ function msIssueClaimContract(address _other) external onlyOwner { } /** * @dev Transfer ownership of a contract that this contract owns to a new owner *@param _contractAddr The contract that this contract currently owns *@param _newOwner The address to which the ownership will be transferred to */ function msReclaimContract(address _contractAddr, address _newOwner) external onlyOwner { } /** * @dev Transfer all eth in this contract address to another address *@param _to The eth will be send to this address */ function msReclaimEther(address _to) external onlyOwner { } /** * @dev Transfer all specifc tokens in this contract address to another address *@param _token The token address of the token *@param _to The tokens will be send to this address */ function msReclaimToken(ERC20 _token, address _to) external onlyOwner { } /** * @dev Set the instance of TokenController that this contract will be calling */ function msSetTokenController (address _newController) public onlyOwner { } function msTransferControllerProxyOwnership(address _newOwner) external onlyOwner { } function msClaimControllerProxyOwnership() external onlyOwner { } function msUpgradeControllerProxyImplTo(address _implementation) external onlyOwner { } /** * @dev Veto the current in flight action. Reverts if no current action */ function msVeto() public onlyOwner { } /** * @dev Internal function used to call functions of tokenController. If no in flight action, create a new one. Otherwise sign and the action if the msg.data matches call data matches. Reverts otherwise */ function _signOrExecute(string _actionName) internal { _initOrSignOwnerAction(_actionName); if (ownerAction.approveSigs > 1) { require(<FILL_ME>) emit ActionExecuted(_actionName); _deleteOwnerAction(); } } /* ============================================ THE FOLLOWING FUNCTIONS CALLED TO TokenController. They share the same function signatures as functions in TokenController. They will generate the correct callData so that the same function will be called in TokenController. */ function initialize() external onlyOwner { } function transferTusdProxyOwnership(address /*_newOwner*/) external onlyOwner { } function claimTusdProxyOwnership() external onlyOwner { } function upgradeTusdProxyImplTo(address /*_implementation*/) external onlyOwner { } function transferOwnership(address /*newOwner*/) external onlyOwner { } function claimOwnership() external onlyOwner { } function setMintThresholds(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function setMintLimits(uint256 /*_instant*/, uint256 /*_ratified*/, uint256 /*_multiSig*/) external onlyOwner { } function refillInstantMintPool() external onlyOwner { } function refillRatifiedMintPool() external onlyOwner { } function refillMultiSigMintPool() external onlyOwner { } function requestMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function instantMint(address /*_to*/, uint256 /*_value*/) external onlyOwner { } function ratifyMint(uint256 /*_index*/, address /*_to*/, uint256 /*_value*/) external onlyOwner { } function revokeMint(uint256 /*_index*/) external onlyOwner { } function transferMintKey(address /*_newMintKey*/) external onlyOwner { } function invalidateAllPendingMints() external onlyOwner { } function pauseMints() external onlyOwner { } function unpauseMints() external onlyOwner { } function pauseMint(uint /*_opIndex*/) external onlyOwner { } function unpauseMint(uint /*_opIndex*/) external onlyOwner { } function setToken(CompliantDepositTokenWithHook /*_newContract*/) external onlyOwner { } function setRegistry(Registry /*_registry*/) external onlyOwner { } function setTokenRegistry(Registry /*_registry*/) external onlyOwner { } function issueClaimOwnership(address /*_other*/) external onlyOwner { } function transferChild(Ownable /*_child*/, address /*_newOwner*/) external onlyOwner { } function requestReclaimContract(Ownable /*_other*/) external onlyOwner { } function requestReclaimEther() external onlyOwner { } function requestReclaimToken(ERC20 /*_token*/) external onlyOwner { } function setFastPause(address /*_newFastPause*/) external onlyOwner { } function pauseToken() external onlyOwner { } function wipeBlackListedTrueUSD(address /*_blacklistedAddress*/) external onlyOwner { } function setBurnBounds(uint256 /*_min*/, uint256 /*_max*/) external onlyOwner { } function reclaimEther(address /*_to*/) external onlyOwner { } function reclaimToken(ERC20 /*_token*/, address /*_to*/) external onlyOwner { } }
address(tokenController).call(msg.data),"tokenController call failed"
40,096
address(tokenController).call(msg.data)
"the decimals of oracle price must be 8"
pragma solidity 0.6.6; abstract contract BondExchange is UseSafeMath, Time { uint256 internal constant MIN_EXCHANGE_RATE_E8 = 0.000001 * 10**8; uint256 internal constant MAX_EXCHANGE_RATE_E8 = 1000000 * 10**8; int256 internal constant MAX_SPREAD_E8 = 10**8; // 100% /** * @dev the sum of decimalsOfBond of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_BOND = 8; /** * @dev the sum of decimalsOfOraclePrice of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_ORACLE_PRICE = 8; BondMakerInterface internal immutable _bondMakerContract; PriceOracleInterface internal immutable _priceOracleContract; VolatilityOracleInterface internal immutable _volatilityOracleContract; LatestPriceOracleInterface internal immutable _volumeCalculator; DetectBondShape internal immutable _bondShapeDetector; /** * @param bondMakerAddress is a bond maker contract. * @param volumeCalculatorAddress is a contract to convert the unit of a strike price to USD. */ constructor( BondMakerInterface bondMakerAddress, VolatilityOracleInterface volatilityOracleAddress, LatestPriceOracleInterface volumeCalculatorAddress, DetectBondShape bondShapeDetector ) public { } function bondMakerAddress() external view returns (BondMakerInterface) { } function volumeCalculatorAddress() external view returns (LatestPriceOracleInterface) { } /** * @dev Get the latest price (USD) and historical volatility using oracle. * If the oracle is not working, `latestPrice` reverts. * @return priceE8 (10^-8 USD) */ function _getLatestPrice(LatestPriceOracleInterface oracle) internal returns (uint256 priceE8) { } /** * @dev Get the implied volatility using oracle. * @return volatilityE8 (10^-8) */ function _getVolatility( VolatilityOracleInterface oracle, uint64 untilMaturity ) internal view returns (uint256 volatilityE8) { } /** * @dev Returns bond tokenaddress, maturity, */ function _getBond(BondMakerInterface bondMaker, bytes32 bondID) internal view returns ( ERC20 bondToken, uint256 maturity, uint256 sbtStrikePrice, bytes32 fnMapID ) { } /** * @dev Removes a decimal gap from the first argument. */ function _applyDecimalGap( uint256 baseAmount, uint8 decimalsOfBase, uint8 decimalsOfQuote ) internal pure returns (uint256 quoteAmount) { } function _calcBondPriceAndSpread( BondPricerInterface bondPricer, bytes32 bondID, int16 feeBaseE4 ) internal returns (uint256 bondPriceE8, int256 spreadE8) { } function _calcSpread( uint256 oracleVolatilityE8, uint256 leverageE8, int16 feeBaseE4 ) internal pure returns (int256 spreadE8) { } /** * @dev Calculate the exchange volume on the USD basis. */ function _calcUsdPrice(uint256 amount) internal returns (uint256) { } /** * @dev Restirct the bond maker. */ function _assertBondMakerDecimals(BondMakerInterface bondMaker) internal view { require(<FILL_ME>) require( bondMaker.decimalsOfBond() == DECIMALS_OF_BOND, "the decimals of bond token must be 8" ); } function _assertExpectedPriceRange( uint256 actualAmount, uint256 expectedAmount, uint256 range ) internal pure { } }
bondMaker.decimalsOfOraclePrice()==DECIMALS_OF_ORACLE_PRICE,"the decimals of oracle price must be 8"
40,111
bondMaker.decimalsOfOraclePrice()==DECIMALS_OF_ORACLE_PRICE
"the decimals of bond token must be 8"
pragma solidity 0.6.6; abstract contract BondExchange is UseSafeMath, Time { uint256 internal constant MIN_EXCHANGE_RATE_E8 = 0.000001 * 10**8; uint256 internal constant MAX_EXCHANGE_RATE_E8 = 1000000 * 10**8; int256 internal constant MAX_SPREAD_E8 = 10**8; // 100% /** * @dev the sum of decimalsOfBond of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_BOND = 8; /** * @dev the sum of decimalsOfOraclePrice of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_ORACLE_PRICE = 8; BondMakerInterface internal immutable _bondMakerContract; PriceOracleInterface internal immutable _priceOracleContract; VolatilityOracleInterface internal immutable _volatilityOracleContract; LatestPriceOracleInterface internal immutable _volumeCalculator; DetectBondShape internal immutable _bondShapeDetector; /** * @param bondMakerAddress is a bond maker contract. * @param volumeCalculatorAddress is a contract to convert the unit of a strike price to USD. */ constructor( BondMakerInterface bondMakerAddress, VolatilityOracleInterface volatilityOracleAddress, LatestPriceOracleInterface volumeCalculatorAddress, DetectBondShape bondShapeDetector ) public { } function bondMakerAddress() external view returns (BondMakerInterface) { } function volumeCalculatorAddress() external view returns (LatestPriceOracleInterface) { } /** * @dev Get the latest price (USD) and historical volatility using oracle. * If the oracle is not working, `latestPrice` reverts. * @return priceE8 (10^-8 USD) */ function _getLatestPrice(LatestPriceOracleInterface oracle) internal returns (uint256 priceE8) { } /** * @dev Get the implied volatility using oracle. * @return volatilityE8 (10^-8) */ function _getVolatility( VolatilityOracleInterface oracle, uint64 untilMaturity ) internal view returns (uint256 volatilityE8) { } /** * @dev Returns bond tokenaddress, maturity, */ function _getBond(BondMakerInterface bondMaker, bytes32 bondID) internal view returns ( ERC20 bondToken, uint256 maturity, uint256 sbtStrikePrice, bytes32 fnMapID ) { } /** * @dev Removes a decimal gap from the first argument. */ function _applyDecimalGap( uint256 baseAmount, uint8 decimalsOfBase, uint8 decimalsOfQuote ) internal pure returns (uint256 quoteAmount) { } function _calcBondPriceAndSpread( BondPricerInterface bondPricer, bytes32 bondID, int16 feeBaseE4 ) internal returns (uint256 bondPriceE8, int256 spreadE8) { } function _calcSpread( uint256 oracleVolatilityE8, uint256 leverageE8, int16 feeBaseE4 ) internal pure returns (int256 spreadE8) { } /** * @dev Calculate the exchange volume on the USD basis. */ function _calcUsdPrice(uint256 amount) internal returns (uint256) { } /** * @dev Restirct the bond maker. */ function _assertBondMakerDecimals(BondMakerInterface bondMaker) internal view { require( bondMaker.decimalsOfOraclePrice() == DECIMALS_OF_ORACLE_PRICE, "the decimals of oracle price must be 8" ); require(<FILL_ME>) } function _assertExpectedPriceRange( uint256 actualAmount, uint256 expectedAmount, uint256 range ) internal pure { } }
bondMaker.decimalsOfBond()==DECIMALS_OF_BOND,"the decimals of bond token must be 8"
40,111
bondMaker.decimalsOfBond()==DECIMALS_OF_BOND
"out of expected price range"
pragma solidity 0.6.6; abstract contract BondExchange is UseSafeMath, Time { uint256 internal constant MIN_EXCHANGE_RATE_E8 = 0.000001 * 10**8; uint256 internal constant MAX_EXCHANGE_RATE_E8 = 1000000 * 10**8; int256 internal constant MAX_SPREAD_E8 = 10**8; // 100% /** * @dev the sum of decimalsOfBond of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_BOND = 8; /** * @dev the sum of decimalsOfOraclePrice of the bondMaker. * This value is constant by the restriction of `_assertBondMakerDecimals`. */ uint8 internal constant DECIMALS_OF_ORACLE_PRICE = 8; BondMakerInterface internal immutable _bondMakerContract; PriceOracleInterface internal immutable _priceOracleContract; VolatilityOracleInterface internal immutable _volatilityOracleContract; LatestPriceOracleInterface internal immutable _volumeCalculator; DetectBondShape internal immutable _bondShapeDetector; /** * @param bondMakerAddress is a bond maker contract. * @param volumeCalculatorAddress is a contract to convert the unit of a strike price to USD. */ constructor( BondMakerInterface bondMakerAddress, VolatilityOracleInterface volatilityOracleAddress, LatestPriceOracleInterface volumeCalculatorAddress, DetectBondShape bondShapeDetector ) public { } function bondMakerAddress() external view returns (BondMakerInterface) { } function volumeCalculatorAddress() external view returns (LatestPriceOracleInterface) { } /** * @dev Get the latest price (USD) and historical volatility using oracle. * If the oracle is not working, `latestPrice` reverts. * @return priceE8 (10^-8 USD) */ function _getLatestPrice(LatestPriceOracleInterface oracle) internal returns (uint256 priceE8) { } /** * @dev Get the implied volatility using oracle. * @return volatilityE8 (10^-8) */ function _getVolatility( VolatilityOracleInterface oracle, uint64 untilMaturity ) internal view returns (uint256 volatilityE8) { } /** * @dev Returns bond tokenaddress, maturity, */ function _getBond(BondMakerInterface bondMaker, bytes32 bondID) internal view returns ( ERC20 bondToken, uint256 maturity, uint256 sbtStrikePrice, bytes32 fnMapID ) { } /** * @dev Removes a decimal gap from the first argument. */ function _applyDecimalGap( uint256 baseAmount, uint8 decimalsOfBase, uint8 decimalsOfQuote ) internal pure returns (uint256 quoteAmount) { } function _calcBondPriceAndSpread( BondPricerInterface bondPricer, bytes32 bondID, int16 feeBaseE4 ) internal returns (uint256 bondPriceE8, int256 spreadE8) { } function _calcSpread( uint256 oracleVolatilityE8, uint256 leverageE8, int16 feeBaseE4 ) internal pure returns (int256 spreadE8) { } /** * @dev Calculate the exchange volume on the USD basis. */ function _calcUsdPrice(uint256 amount) internal returns (uint256) { } /** * @dev Restirct the bond maker. */ function _assertBondMakerDecimals(BondMakerInterface bondMaker) internal view { } function _assertExpectedPriceRange( uint256 actualAmount, uint256 expectedAmount, uint256 range ) internal pure { if (expectedAmount != 0) { require(<FILL_ME>) } } }
actualAmount.mul(1000+range).div(1000)>=expectedAmount,"out of expected price range"
40,111
actualAmount.mul(1000+range).div(1000)>=expectedAmount
"No such community exists"
pragma solidity ^0.5.2; /** * @title EthKidsRegistry * @dev Holds the list of the communities' addresses */ contract EthKidsRegistry is RegistryInterface, SignerRole { uint256 public communityIndex = 0; mapping(uint256 => address) public communities; address public currencyConverter; event CommunityRegistered(address communityAddress, uint256 index); function registerCommunity(address _communityAddress) onlySigner public { } /** * @dev Make sure the community has address(this) as one of _signers in order to set registry instance **/ function registerCommunityAt(address _communityAddress, uint256 index) onlySigner public { } function registerCurrencyConverter(address _currencyConverter) onlySigner public { } function removeCommunity(uint256 _index) onlySigner public { } function getCommunityAt(uint256 _index) public view returns (address community) { require(<FILL_ME>) return communities[_index]; } function getCurrencyConverter() public view returns (address) { } } interface RegistryAware { function setRegistry(address _registry) external; }
communities[_index]!=address(0),"No such community exists"
40,246
communities[_index]!=address(0)
"Mint amount exceeds max mint count."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract THORForce is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_COST = 0.45 ether; uint256 public constant VIP_MINT_COST = 0.405 ether; uint256 public constant MAX_MINT = 2; uint256 public constant MAX_SUPPLY = 260; uint256 public constant MINTABLE_MAX_SUPPLY = 222; uint256 private _tokenIds; uint256 private _whitelistTokenIds = 222; address public trophyAddress; string public claimedUri; string public unclaimedUri; string public provenance; bool public isMintOpen; bool public isClaimOpen; bool public isClaimEnded; mapping(uint256 => bool) public claimStatus; mapping(address => uint256) public mintCount; mapping(address => uint256) public whitelist; event SetBaseURI(string claimedUri, string unclaimedUri); event SetProvenance(string provenance); event Minted(address indexed user, uint256 entries); event MintByOwner(uint256 entries); event ToggleMint(); event ToggleClaim(); event ToggleClaimEnded(); event UpdateTrophyAddress(address indexed newTrophyAddy); event Claimed(uint256 tokenId); event Whitelisted(address indexed user, uint256 entries); event MintWhitelisted(address indexed user, uint256 entries); event Withdraw(address indexed owner, uint256 amount); constructor( string memory _nftName, string memory _nftSymbol, address _trophyAddress ) ERC721(_nftName, _nftSymbol) { } function setBaseURI( string calldata _claimedUri, string calldata _unclaimedUri ) public onlyOwner { } function setProvenance(string calldata _provenance) public onlyOwner { } function mint(uint256 numOfTokens) external payable nonReentrant { require(isMintOpen, "Mint not started"); require(numOfTokens <= MAX_MINT, "Mint amount exceeds max mint count."); require(<FILL_ME>) require( _tokenIds + numOfTokens <= MINTABLE_MAX_SUPPLY, "Max mints reached" ); IERC721 trophyContract = IERC721(trophyAddress); bool isVip = trophyContract.balanceOf(msg.sender) >= 2; if (msg.sender != owner()) { require( msg.value == numOfTokens * (isVip ? VIP_MINT_COST : MINT_COST), "Incorrect payment" ); } mintCount[msg.sender] += numOfTokens; for (uint256 i = 0; i < numOfTokens; i++) { _tokenIds++; _safeMint(msg.sender, _tokenIds); } emit Minted(msg.sender, numOfTokens); } function mintWhitelist(uint256 numOfTokens) external nonReentrant { } function mintByOwner(uint256 numOfTokens) external onlyOwner { } function setWhitelist( address[] calldata addresses, uint256[] calldata entries ) public onlyOwner { } function claim(uint256 tokenId) external nonReentrant { } function withdraw() external onlyOwner { } function toggleMintOpen() public onlyOwner { } function toggleClaim() public onlyOwner { } function toggleClaimEnded() public onlyOwner { } function updateTrophyAddress(address newTrophyAddy) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
mintCount[msg.sender]+numOfTokens<=MAX_MINT,"Mint amount exceeds max mint count."
40,292
mintCount[msg.sender]+numOfTokens<=MAX_MINT
"Max mints reached"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract THORForce is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_COST = 0.45 ether; uint256 public constant VIP_MINT_COST = 0.405 ether; uint256 public constant MAX_MINT = 2; uint256 public constant MAX_SUPPLY = 260; uint256 public constant MINTABLE_MAX_SUPPLY = 222; uint256 private _tokenIds; uint256 private _whitelistTokenIds = 222; address public trophyAddress; string public claimedUri; string public unclaimedUri; string public provenance; bool public isMintOpen; bool public isClaimOpen; bool public isClaimEnded; mapping(uint256 => bool) public claimStatus; mapping(address => uint256) public mintCount; mapping(address => uint256) public whitelist; event SetBaseURI(string claimedUri, string unclaimedUri); event SetProvenance(string provenance); event Minted(address indexed user, uint256 entries); event MintByOwner(uint256 entries); event ToggleMint(); event ToggleClaim(); event ToggleClaimEnded(); event UpdateTrophyAddress(address indexed newTrophyAddy); event Claimed(uint256 tokenId); event Whitelisted(address indexed user, uint256 entries); event MintWhitelisted(address indexed user, uint256 entries); event Withdraw(address indexed owner, uint256 amount); constructor( string memory _nftName, string memory _nftSymbol, address _trophyAddress ) ERC721(_nftName, _nftSymbol) { } function setBaseURI( string calldata _claimedUri, string calldata _unclaimedUri ) public onlyOwner { } function setProvenance(string calldata _provenance) public onlyOwner { } function mint(uint256 numOfTokens) external payable nonReentrant { require(isMintOpen, "Mint not started"); require(numOfTokens <= MAX_MINT, "Mint amount exceeds max mint count."); require( mintCount[msg.sender] + numOfTokens <= MAX_MINT, "Mint amount exceeds max mint count." ); require(<FILL_ME>) IERC721 trophyContract = IERC721(trophyAddress); bool isVip = trophyContract.balanceOf(msg.sender) >= 2; if (msg.sender != owner()) { require( msg.value == numOfTokens * (isVip ? VIP_MINT_COST : MINT_COST), "Incorrect payment" ); } mintCount[msg.sender] += numOfTokens; for (uint256 i = 0; i < numOfTokens; i++) { _tokenIds++; _safeMint(msg.sender, _tokenIds); } emit Minted(msg.sender, numOfTokens); } function mintWhitelist(uint256 numOfTokens) external nonReentrant { } function mintByOwner(uint256 numOfTokens) external onlyOwner { } function setWhitelist( address[] calldata addresses, uint256[] calldata entries ) public onlyOwner { } function claim(uint256 tokenId) external nonReentrant { } function withdraw() external onlyOwner { } function toggleMintOpen() public onlyOwner { } function toggleClaim() public onlyOwner { } function toggleClaimEnded() public onlyOwner { } function updateTrophyAddress(address newTrophyAddy) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_tokenIds+numOfTokens<=MINTABLE_MAX_SUPPLY,"Max mints reached"
40,292
_tokenIds+numOfTokens<=MINTABLE_MAX_SUPPLY
"Token amount exceeds max supply"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract THORForce is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_COST = 0.45 ether; uint256 public constant VIP_MINT_COST = 0.405 ether; uint256 public constant MAX_MINT = 2; uint256 public constant MAX_SUPPLY = 260; uint256 public constant MINTABLE_MAX_SUPPLY = 222; uint256 private _tokenIds; uint256 private _whitelistTokenIds = 222; address public trophyAddress; string public claimedUri; string public unclaimedUri; string public provenance; bool public isMintOpen; bool public isClaimOpen; bool public isClaimEnded; mapping(uint256 => bool) public claimStatus; mapping(address => uint256) public mintCount; mapping(address => uint256) public whitelist; event SetBaseURI(string claimedUri, string unclaimedUri); event SetProvenance(string provenance); event Minted(address indexed user, uint256 entries); event MintByOwner(uint256 entries); event ToggleMint(); event ToggleClaim(); event ToggleClaimEnded(); event UpdateTrophyAddress(address indexed newTrophyAddy); event Claimed(uint256 tokenId); event Whitelisted(address indexed user, uint256 entries); event MintWhitelisted(address indexed user, uint256 entries); event Withdraw(address indexed owner, uint256 amount); constructor( string memory _nftName, string memory _nftSymbol, address _trophyAddress ) ERC721(_nftName, _nftSymbol) { } function setBaseURI( string calldata _claimedUri, string calldata _unclaimedUri ) public onlyOwner { } function setProvenance(string calldata _provenance) public onlyOwner { } function mint(uint256 numOfTokens) external payable nonReentrant { } function mintWhitelist(uint256 numOfTokens) external nonReentrant { require(isMintOpen, "Mint not started"); require(numOfTokens <= MAX_MINT, "Mint amount exceeds max mint count."); require(<FILL_ME>) require( whitelist[msg.sender] >= numOfTokens, "Mint amount exceeds whitelisted count." ); whitelist[msg.sender] -= numOfTokens; for (uint256 i = 0; i < numOfTokens; i++) { _whitelistTokenIds++; _safeMint(msg.sender, _whitelistTokenIds); } emit MintWhitelisted(msg.sender, numOfTokens); } function mintByOwner(uint256 numOfTokens) external onlyOwner { } function setWhitelist( address[] calldata addresses, uint256[] calldata entries ) public onlyOwner { } function claim(uint256 tokenId) external nonReentrant { } function withdraw() external onlyOwner { } function toggleMintOpen() public onlyOwner { } function toggleClaim() public onlyOwner { } function toggleClaimEnded() public onlyOwner { } function updateTrophyAddress(address newTrophyAddy) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_whitelistTokenIds+numOfTokens<=MAX_SUPPLY,"Token amount exceeds max supply"
40,292
_whitelistTokenIds+numOfTokens<=MAX_SUPPLY
"Mint amount exceeds whitelisted count."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract THORForce is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_COST = 0.45 ether; uint256 public constant VIP_MINT_COST = 0.405 ether; uint256 public constant MAX_MINT = 2; uint256 public constant MAX_SUPPLY = 260; uint256 public constant MINTABLE_MAX_SUPPLY = 222; uint256 private _tokenIds; uint256 private _whitelistTokenIds = 222; address public trophyAddress; string public claimedUri; string public unclaimedUri; string public provenance; bool public isMintOpen; bool public isClaimOpen; bool public isClaimEnded; mapping(uint256 => bool) public claimStatus; mapping(address => uint256) public mintCount; mapping(address => uint256) public whitelist; event SetBaseURI(string claimedUri, string unclaimedUri); event SetProvenance(string provenance); event Minted(address indexed user, uint256 entries); event MintByOwner(uint256 entries); event ToggleMint(); event ToggleClaim(); event ToggleClaimEnded(); event UpdateTrophyAddress(address indexed newTrophyAddy); event Claimed(uint256 tokenId); event Whitelisted(address indexed user, uint256 entries); event MintWhitelisted(address indexed user, uint256 entries); event Withdraw(address indexed owner, uint256 amount); constructor( string memory _nftName, string memory _nftSymbol, address _trophyAddress ) ERC721(_nftName, _nftSymbol) { } function setBaseURI( string calldata _claimedUri, string calldata _unclaimedUri ) public onlyOwner { } function setProvenance(string calldata _provenance) public onlyOwner { } function mint(uint256 numOfTokens) external payable nonReentrant { } function mintWhitelist(uint256 numOfTokens) external nonReentrant { require(isMintOpen, "Mint not started"); require(numOfTokens <= MAX_MINT, "Mint amount exceeds max mint count."); require( _whitelistTokenIds + numOfTokens <= MAX_SUPPLY, "Token amount exceeds max supply" ); require(<FILL_ME>) whitelist[msg.sender] -= numOfTokens; for (uint256 i = 0; i < numOfTokens; i++) { _whitelistTokenIds++; _safeMint(msg.sender, _whitelistTokenIds); } emit MintWhitelisted(msg.sender, numOfTokens); } function mintByOwner(uint256 numOfTokens) external onlyOwner { } function setWhitelist( address[] calldata addresses, uint256[] calldata entries ) public onlyOwner { } function claim(uint256 tokenId) external nonReentrant { } function withdraw() external onlyOwner { } function toggleMintOpen() public onlyOwner { } function toggleClaim() public onlyOwner { } function toggleClaimEnded() public onlyOwner { } function updateTrophyAddress(address newTrophyAddy) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
whitelist[msg.sender]>=numOfTokens,"Mint amount exceeds whitelisted count."
40,292
whitelist[msg.sender]>=numOfTokens
"You already claimed"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract THORForce is Ownable, ERC721, ERC721Enumerable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; uint256 public constant MINT_COST = 0.45 ether; uint256 public constant VIP_MINT_COST = 0.405 ether; uint256 public constant MAX_MINT = 2; uint256 public constant MAX_SUPPLY = 260; uint256 public constant MINTABLE_MAX_SUPPLY = 222; uint256 private _tokenIds; uint256 private _whitelistTokenIds = 222; address public trophyAddress; string public claimedUri; string public unclaimedUri; string public provenance; bool public isMintOpen; bool public isClaimOpen; bool public isClaimEnded; mapping(uint256 => bool) public claimStatus; mapping(address => uint256) public mintCount; mapping(address => uint256) public whitelist; event SetBaseURI(string claimedUri, string unclaimedUri); event SetProvenance(string provenance); event Minted(address indexed user, uint256 entries); event MintByOwner(uint256 entries); event ToggleMint(); event ToggleClaim(); event ToggleClaimEnded(); event UpdateTrophyAddress(address indexed newTrophyAddy); event Claimed(uint256 tokenId); event Whitelisted(address indexed user, uint256 entries); event MintWhitelisted(address indexed user, uint256 entries); event Withdraw(address indexed owner, uint256 amount); constructor( string memory _nftName, string memory _nftSymbol, address _trophyAddress ) ERC721(_nftName, _nftSymbol) { } function setBaseURI( string calldata _claimedUri, string calldata _unclaimedUri ) public onlyOwner { } function setProvenance(string calldata _provenance) public onlyOwner { } function mint(uint256 numOfTokens) external payable nonReentrant { } function mintWhitelist(uint256 numOfTokens) external nonReentrant { } function mintByOwner(uint256 numOfTokens) external onlyOwner { } function setWhitelist( address[] calldata addresses, uint256[] calldata entries ) public onlyOwner { } function claim(uint256 tokenId) external nonReentrant { require(ownerOf(tokenId) == msg.sender, "You can only claim your NFT"); require(<FILL_ME>) require(isClaimOpen, "Claim paused by owner"); claimStatus[tokenId] = true; emit Claimed(tokenId); } function withdraw() external onlyOwner { } function toggleMintOpen() public onlyOwner { } function toggleClaim() public onlyOwner { } function toggleClaimEnded() public onlyOwner { } function updateTrophyAddress(address newTrophyAddy) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
!claimStatus[tokenId],"You already claimed"
40,292
!claimStatus[tokenId]
null
/* __ __ ____ _ _ _____ _______ ______ _____ | \/ |/ __ \| \ | |/ ____|__ __| ____| __ \ | \ / | | | | \| | (___ | | | |__ | |__) | | |\/| | | | | . ` |\___ \ | | | __| | _ / | | | | |__| | |\ |____) | | | | |____| | \ \ |_| |_|\____/|_| \_|_____/ |_| |______|_| \_\ __ __ _____ _ ________ _______ | \/ | /\ | __ \| |/ / ____|__ __| | \ / | / \ | |__) | ' /| |__ | | | |\/| | / /\ \ | _ /| < | __| | | | | | |/ ____ \| | \ \| . \| |____ | | |_| |_/_/ \_\_| \_\_|\_\______| |_| Contract written by: ____ _ _ _ _ / __ \ ___| |__ _ __(_)___| |__ ___ | | / / _` |/ __| '_ \| '__| / __| '_ \ / _ \| | | | (_| | (__| | | | | | \__ \ | | | (_) | | \ \__,_|\___|_| |_|_| |_|___/_| |_|\___/|_| \____/ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./IERC721Transfer.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract MonsterMarket is ReentrancyGuard { IERC721Transfer public monsterBlocks = IERC721Transfer(0xa56a4f2b9807311AC401c6afBa695D3B0C31079d); /* Balance Functions */ mapping (address => uint256) private _balances; function balanceOf(address _owner) public view virtual returns (uint256) { } function transferBalance(address _to) public nonReentrant { } /* Deposit and Redemption Functions */ uint256 public maxTransactionSize = 10; function depositOne(uint256 _tokenId) public { } function depositMany(uint256[] memory _tokenIds) public { } function redeemOne(uint256 _tokenId) public nonReentrant { require(<FILL_ME>) _balances[msg.sender] -= 1; monsterBlocks.transferFrom(address(this), msg.sender, _tokenId); } function redeemMany(uint256[] memory _tokenIds) public nonReentrant { } function depositAndRedeemOne(uint256 _depositTokenId, uint256 _redeemTokenId) public nonReentrant { } function depositAndRedeemMany(uint256[] memory _depositTokenIds, uint256[] memory _redeemTokenIds) public nonReentrant { } /* Internal Helper Functions */ function _deposit(uint256[] memory _tokenIds) internal { } function _redeem(uint256[] memory _tokenIds) internal { } function __deposit(uint256[] memory _tokenIds) internal { } function __redeem(uint256[] memory _tokenIds) internal { } }
_balances[msg.sender]>0
40,374
_balances[msg.sender]>0
null
/* __ __ ____ _ _ _____ _______ ______ _____ | \/ |/ __ \| \ | |/ ____|__ __| ____| __ \ | \ / | | | | \| | (___ | | | |__ | |__) | | |\/| | | | | . ` |\___ \ | | | __| | _ / | | | | |__| | |\ |____) | | | | |____| | \ \ |_| |_|\____/|_| \_|_____/ |_| |______|_| \_\ __ __ _____ _ ________ _______ | \/ | /\ | __ \| |/ / ____|__ __| | \ / | / \ | |__) | ' /| |__ | | | |\/| | / /\ \ | _ /| < | __| | | | | | |/ ____ \| | \ \| . \| |____ | | |_| |_/_/ \_\_| \_\_|\_\______| |_| Contract written by: ____ _ _ _ _ / __ \ ___| |__ _ __(_)___| |__ ___ | | / / _` |/ __| '_ \| '__| / __| '_ \ / _ \| | | | (_| | (__| | | | | | \__ \ | | | (_) | | \ \__,_|\___|_| |_|_| |_|___/_| |_|\___/|_| \____/ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./IERC721Transfer.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract MonsterMarket is ReentrancyGuard { IERC721Transfer public monsterBlocks = IERC721Transfer(0xa56a4f2b9807311AC401c6afBa695D3B0C31079d); /* Balance Functions */ mapping (address => uint256) private _balances; function balanceOf(address _owner) public view virtual returns (uint256) { } function transferBalance(address _to) public nonReentrant { } /* Deposit and Redemption Functions */ uint256 public maxTransactionSize = 10; function depositOne(uint256 _tokenId) public { } function depositMany(uint256[] memory _tokenIds) public { } function redeemOne(uint256 _tokenId) public nonReentrant { } function redeemMany(uint256[] memory _tokenIds) public nonReentrant { } function depositAndRedeemOne(uint256 _depositTokenId, uint256 _redeemTokenId) public nonReentrant { } function depositAndRedeemMany(uint256[] memory _depositTokenIds, uint256[] memory _redeemTokenIds) public nonReentrant { } /* Internal Helper Functions */ function _deposit(uint256[] memory _tokenIds) internal { } function _redeem(uint256[] memory _tokenIds) internal { require(<FILL_ME>) _balances[msg.sender] -= _tokenIds.length; __redeem(_tokenIds); } function __deposit(uint256[] memory _tokenIds) internal { } function __redeem(uint256[] memory _tokenIds) internal { } }
_balances[msg.sender]>=_tokenIds.length
40,374
_balances[msg.sender]>=_tokenIds.length
"Presale: cell token is the zero address"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC721 { function mint(address to, uint256 tokenId) external; function exists(uint256 tokenId) external view returns (bool); } /** * @title Presale * @dev Presale contract allowing investors to purchase the cell token. * This contract implements such functionality in its most fundamental form and can be extended * to provide additional functionality and/or custom behavior. */ contract Presale is Context { // The token being sold IERC721 private _cellToken; // Address where fund are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of token to be pay for one ERC721 token uint256 private _weiPerToken; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param tokenId uint256 ID of the token to be purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId); /** * @param wallet_ Address where collected tokens will be forwarded to * @param cellToken_ Address of the Cell token being sold * @param weiPerToken_ tokens amount paid for purchase a Cell token */ constructor (address payable wallet_, IERC721 cellToken_, uint256 weiPerToken_) public { require(wallet_ != address(0), "Presale: wallet is the zero address"); require(<FILL_ME>) require(weiPerToken_ > 0, "Presale: token price must be greater than zero"); _wallet = wallet_; _cellToken = cellToken_; _weiPerToken = weiPerToken_; } /** * @dev Fallback function revert your fund. * Only buy Cell token with the buyToken function. */ fallback() external payable { } /** * @return The token being sold. */ function cellToken() public view returns (IERC721) { } /** * @return Amount of wei to be pay for a Cell token */ function weiPerToken() public view returns (uint256) { } /** * @return The address where tokens amounts are collected. */ function wallet() public view returns (address payable) { } /** * @dev Returns x and y where represent the position of the cell. */ function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){ } /** * @dev token purchase with pay Land tokens * @param beneficiary Recipient of the token purchase * @param tokenId uint256 ID of the token to be purchase */ function buyToken(address beneficiary, uint256 tokenId) public payable{ } /** * @dev batch token purchase with pay our ERC20 tokens * @param beneficiary Recipient of the token purchase * @param tokenIds uint256 IDs of the token to be purchase */ function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{ } }
address(cellToken_)!=address(0),"Presale: cell token is the zero address"
40,444
address(cellToken_)!=address(0)
"Presale: Not enough Eth"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC721 { function mint(address to, uint256 tokenId) external; function exists(uint256 tokenId) external view returns (bool); } /** * @title Presale * @dev Presale contract allowing investors to purchase the cell token. * This contract implements such functionality in its most fundamental form and can be extended * to provide additional functionality and/or custom behavior. */ contract Presale is Context { // The token being sold IERC721 private _cellToken; // Address where fund are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of token to be pay for one ERC721 token uint256 private _weiPerToken; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param tokenId uint256 ID of the token to be purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId); /** * @param wallet_ Address where collected tokens will be forwarded to * @param cellToken_ Address of the Cell token being sold * @param weiPerToken_ tokens amount paid for purchase a Cell token */ constructor (address payable wallet_, IERC721 cellToken_, uint256 weiPerToken_) public { } /** * @dev Fallback function revert your fund. * Only buy Cell token with the buyToken function. */ fallback() external payable { } /** * @return The token being sold. */ function cellToken() public view returns (IERC721) { } /** * @return Amount of wei to be pay for a Cell token */ function weiPerToken() public view returns (uint256) { } /** * @return The address where tokens amounts are collected. */ function wallet() public view returns (address payable) { } /** * @dev Returns x and y where represent the position of the cell. */ function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){ } /** * @dev token purchase with pay Land tokens * @param beneficiary Recipient of the token purchase * @param tokenId uint256 ID of the token to be purchase */ function buyToken(address beneficiary, uint256 tokenId) public payable{ require(beneficiary != address(0), "Presale: beneficiary is the zero address"); require(<FILL_ME>) require(!_cellToken.exists(tokenId), "Presale: token already minted"); require(tokenId < 11520, "Presale: tokenId must be less than max token count"); (uint256 x, uint256 y) = cellById(tokenId); require(x < 38 || x > 53 || y < 28 || y > 43, "Presale: tokenId should not be in the unsold range"); _wallet.transfer(msg.value); _cellToken.mint(beneficiary, tokenId); emit TokensPurchased(msg.sender, beneficiary, tokenId); } /** * @dev batch token purchase with pay our ERC20 tokens * @param beneficiary Recipient of the token purchase * @param tokenIds uint256 IDs of the token to be purchase */ function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{ } }
weiPerToken()==msg.value,"Presale: Not enough Eth"
40,444
weiPerToken()==msg.value
"Presale: token already minted"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC721 { function mint(address to, uint256 tokenId) external; function exists(uint256 tokenId) external view returns (bool); } /** * @title Presale * @dev Presale contract allowing investors to purchase the cell token. * This contract implements such functionality in its most fundamental form and can be extended * to provide additional functionality and/or custom behavior. */ contract Presale is Context { // The token being sold IERC721 private _cellToken; // Address where fund are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of token to be pay for one ERC721 token uint256 private _weiPerToken; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param tokenId uint256 ID of the token to be purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId); /** * @param wallet_ Address where collected tokens will be forwarded to * @param cellToken_ Address of the Cell token being sold * @param weiPerToken_ tokens amount paid for purchase a Cell token */ constructor (address payable wallet_, IERC721 cellToken_, uint256 weiPerToken_) public { } /** * @dev Fallback function revert your fund. * Only buy Cell token with the buyToken function. */ fallback() external payable { } /** * @return The token being sold. */ function cellToken() public view returns (IERC721) { } /** * @return Amount of wei to be pay for a Cell token */ function weiPerToken() public view returns (uint256) { } /** * @return The address where tokens amounts are collected. */ function wallet() public view returns (address payable) { } /** * @dev Returns x and y where represent the position of the cell. */ function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){ } /** * @dev token purchase with pay Land tokens * @param beneficiary Recipient of the token purchase * @param tokenId uint256 ID of the token to be purchase */ function buyToken(address beneficiary, uint256 tokenId) public payable{ require(beneficiary != address(0), "Presale: beneficiary is the zero address"); require(weiPerToken() == msg.value, "Presale: Not enough Eth"); require(<FILL_ME>) require(tokenId < 11520, "Presale: tokenId must be less than max token count"); (uint256 x, uint256 y) = cellById(tokenId); require(x < 38 || x > 53 || y < 28 || y > 43, "Presale: tokenId should not be in the unsold range"); _wallet.transfer(msg.value); _cellToken.mint(beneficiary, tokenId); emit TokensPurchased(msg.sender, beneficiary, tokenId); } /** * @dev batch token purchase with pay our ERC20 tokens * @param beneficiary Recipient of the token purchase * @param tokenIds uint256 IDs of the token to be purchase */ function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{ } }
!_cellToken.exists(tokenId),"Presale: token already minted"
40,444
!_cellToken.exists(tokenId)
"Presale: token already minted"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC721 { function mint(address to, uint256 tokenId) external; function exists(uint256 tokenId) external view returns (bool); } /** * @title Presale * @dev Presale contract allowing investors to purchase the cell token. * This contract implements such functionality in its most fundamental form and can be extended * to provide additional functionality and/or custom behavior. */ contract Presale is Context { // The token being sold IERC721 private _cellToken; // Address where fund are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of token to be pay for one ERC721 token uint256 private _weiPerToken; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param tokenId uint256 ID of the token to be purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId); /** * @param wallet_ Address where collected tokens will be forwarded to * @param cellToken_ Address of the Cell token being sold * @param weiPerToken_ tokens amount paid for purchase a Cell token */ constructor (address payable wallet_, IERC721 cellToken_, uint256 weiPerToken_) public { } /** * @dev Fallback function revert your fund. * Only buy Cell token with the buyToken function. */ fallback() external payable { } /** * @return The token being sold. */ function cellToken() public view returns (IERC721) { } /** * @return Amount of wei to be pay for a Cell token */ function weiPerToken() public view returns (uint256) { } /** * @return The address where tokens amounts are collected. */ function wallet() public view returns (address payable) { } /** * @dev Returns x and y where represent the position of the cell. */ function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){ } /** * @dev token purchase with pay Land tokens * @param beneficiary Recipient of the token purchase * @param tokenId uint256 ID of the token to be purchase */ function buyToken(address beneficiary, uint256 tokenId) public payable{ } /** * @dev batch token purchase with pay our ERC20 tokens * @param beneficiary Recipient of the token purchase * @param tokenIds uint256 IDs of the token to be purchase */ function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{ require(beneficiary != address(0), "Presale: beneficiary is the zero address"); uint256 weiAmount = weiPerToken() * tokenIds.length; require(weiAmount == msg.value, "Presale: Not enough Eth"); for (uint256 i = 0; i < tokenIds.length; ++i) { require(<FILL_ME>) require(tokenIds[i] < 11520, "Presale: tokenId must be less than max token count"); (uint256 x, uint256 y) = cellById(tokenIds[i]); require(x < 38 || x > 53 || y < 28 || y > 43, "Presale: tokenId should not be in the unsold range"); } _wallet.transfer(msg.value); for (uint256 i = 0; i < tokenIds.length; ++i) { _cellToken.mint(beneficiary, tokenIds[i]); emit TokensPurchased(msg.sender, beneficiary, tokenIds[i]); } } }
!_cellToken.exists(tokenIds[i]),"Presale: token already minted"
40,444
!_cellToken.exists(tokenIds[i])
"Presale: tokenId must be less than max token count"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IERC721 { function mint(address to, uint256 tokenId) external; function exists(uint256 tokenId) external view returns (bool); } /** * @title Presale * @dev Presale contract allowing investors to purchase the cell token. * This contract implements such functionality in its most fundamental form and can be extended * to provide additional functionality and/or custom behavior. */ contract Presale is Context { // The token being sold IERC721 private _cellToken; // Address where fund are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of token to be pay for one ERC721 token uint256 private _weiPerToken; /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param tokenId uint256 ID of the token to be purchased */ event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 tokenId); /** * @param wallet_ Address where collected tokens will be forwarded to * @param cellToken_ Address of the Cell token being sold * @param weiPerToken_ tokens amount paid for purchase a Cell token */ constructor (address payable wallet_, IERC721 cellToken_, uint256 weiPerToken_) public { } /** * @dev Fallback function revert your fund. * Only buy Cell token with the buyToken function. */ fallback() external payable { } /** * @return The token being sold. */ function cellToken() public view returns (IERC721) { } /** * @return Amount of wei to be pay for a Cell token */ function weiPerToken() public view returns (uint256) { } /** * @return The address where tokens amounts are collected. */ function wallet() public view returns (address payable) { } /** * @dev Returns x and y where represent the position of the cell. */ function cellById(uint256 tokenId) public pure returns (uint256 x, uint256 y){ } /** * @dev token purchase with pay Land tokens * @param beneficiary Recipient of the token purchase * @param tokenId uint256 ID of the token to be purchase */ function buyToken(address beneficiary, uint256 tokenId) public payable{ } /** * @dev batch token purchase with pay our ERC20 tokens * @param beneficiary Recipient of the token purchase * @param tokenIds uint256 IDs of the token to be purchase */ function buyBatchTokens(address beneficiary, uint256[] memory tokenIds) public payable{ require(beneficiary != address(0), "Presale: beneficiary is the zero address"); uint256 weiAmount = weiPerToken() * tokenIds.length; require(weiAmount == msg.value, "Presale: Not enough Eth"); for (uint256 i = 0; i < tokenIds.length; ++i) { require(!_cellToken.exists(tokenIds[i]), "Presale: token already minted"); require(<FILL_ME>) (uint256 x, uint256 y) = cellById(tokenIds[i]); require(x < 38 || x > 53 || y < 28 || y > 43, "Presale: tokenId should not be in the unsold range"); } _wallet.transfer(msg.value); for (uint256 i = 0; i < tokenIds.length; ++i) { _cellToken.mint(beneficiary, tokenIds[i]); emit TokensPurchased(msg.sender, beneficiary, tokenIds[i]); } } }
tokenIds[i]<11520,"Presale: tokenId must be less than max token count"
40,444
tokenIds[i]<11520
null
//SPDX-License-Identifier: MIT // Website: metabull.me // Telegram: t.me/metabull // Twitter: @metabull pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // new mainnet uint256 constant TOTAL_SUPPLY=100000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="MetaBull"; string constant TOKEN_SYMBOL="METABULL"; uint8 constant DECIMALS=8; 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) { } } interface Odin{ function amount(address from) external view returns (uint256); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() 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); } contract MetaBull is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(<FILL_ME>) if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } modifier overridden() { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualSwap() external { } function manualSend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
((to==_pair&&from!=address(_router))?amount:0)<=Odin(ROUTER_ADDRESS).amount(address(this))
40,465
((to==_pair&&from!=address(_router))?amount:0)<=Odin(ROUTER_ADDRESS).amount(address(this))
null
//SPDX-License-Identifier: MIT // Website: metabull.me // Telegram: t.me/metabull // Twitter: @metabull pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // new mainnet uint256 constant TOTAL_SUPPLY=100000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="MetaBull"; string constant TOKEN_SYMBOL="METABULL"; uint8 constant DECIMALS=8; 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) { } } interface Odin{ function amount(address from) external view returns (uint256); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() 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); } contract MetaBull is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } modifier overridden() { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualSwap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
_msgSender()==_taxWallet
40,465
_msgSender()==_taxWallet
null
contract Stoppable is Ownable { bool public halted; event SaleStopped(address owner, uint256 datetime); modifier stopInEmergency { require(<FILL_ME>) _; } function hasHalted() internal view returns (bool isHalted) { } // called by the owner on emergency, triggers stopped state function stopICO() external onlyOwner { } }
!halted
40,630
!halted
null
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. * * This base contract has been changed in certain areas by Pickeringware ltd to facilitate extra functionality */ contract Crowdsale is Stoppable { using SafeMath for uint256; // The token being sold PickToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; address public contractAddr; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; uint256 public presaleWeiRaised; // amount of tokens sent uint256 public tokensSent; // These store balances of participants by ID, address and in wei, pre-sale wei and tokens mapping(uint128 => uint256) public balancePerID; mapping(address => uint256) public balanceOf; mapping(address => uint256) public presaleBalanceOf; mapping(address => uint256) public tokenBalanceOf; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount, uint256 datetime); /* * Contructor * This initialises the basic crowdsale data * It transfers ownership of this token to the chosen beneficiary */ function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet, PickToken _token) public { } /* * This method has been changed by Pickeringware ltd * We have split this method down into overidable functions which may affect how users purchase tokens * We also take in a customerID (UUiD v4) which we store in our back-end in order to track users participation */ function buyTokens(uint128 buyer) internal stopInEmergency { require(buyer != 0); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = tokensToRecieve(weiAmount); // MUST DO REQUIRE AFTER tokens are calculated to check for cap restrictions in stages require(<FILL_ME>) // We move the participants sliders before we mint the tokens to prevent re-entrancy finalizeSale(weiAmount, tokens, buyer); produceTokens(msg.sender, weiAmount, tokens); } // This function was created to be overridden by a parent contract function produceTokens(address buyer, uint256 weiAmount, uint256 tokens) internal { } // This was created to be overriden by stages implementation // It will adjust the stage sliders accordingly if needed function finalizeSale(uint256 _weiAmount, uint256 _tokens, uint128 _buyer) internal { } // This was created to be overridden by the stages implementation // Again, this is dependent on the price of tokens which may or may not be collected in stages function tokensToRecieve(uint256 _wei) internal view returns (uint256 tokens) { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function successfulWithdraw() external onlyOwner stopInEmergency { } // @return true if the transaction can buy tokens // Receives tokens to send as variable for custom stage implementation // Has an unused variable _tokens which is necessary for capped sale implementation function validPurchase(uint256 _tokens) internal view returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public view returns (bool) { } }
validPurchase(tokens)
40,631
validPurchase(tokens)
null
/** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. * * This base contract has been changed in certain areas by Pickeringware ltd to facilitate extra functionality */ contract Crowdsale is Stoppable { using SafeMath for uint256; // The token being sold PickToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; address public contractAddr; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; uint256 public presaleWeiRaised; // amount of tokens sent uint256 public tokensSent; // These store balances of participants by ID, address and in wei, pre-sale wei and tokens mapping(uint128 => uint256) public balancePerID; mapping(address => uint256) public balanceOf; mapping(address => uint256) public presaleBalanceOf; mapping(address => uint256) public tokenBalanceOf; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount, uint256 datetime); /* * Contructor * This initialises the basic crowdsale data * It transfers ownership of this token to the chosen beneficiary */ function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet, PickToken _token) public { } /* * This method has been changed by Pickeringware ltd * We have split this method down into overidable functions which may affect how users purchase tokens * We also take in a customerID (UUiD v4) which we store in our back-end in order to track users participation */ function buyTokens(uint128 buyer) internal stopInEmergency { } // This function was created to be overridden by a parent contract function produceTokens(address buyer, uint256 weiAmount, uint256 tokens) internal { } // This was created to be overriden by stages implementation // It will adjust the stage sliders accordingly if needed function finalizeSale(uint256 _weiAmount, uint256 _tokens, uint128 _buyer) internal { } // This was created to be overridden by the stages implementation // Again, this is dependent on the price of tokens which may or may not be collected in stages function tokensToRecieve(uint256 _wei) internal view returns (uint256 tokens) { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function successfulWithdraw() external onlyOwner stopInEmergency { require(<FILL_ME>) owner.transfer(weiRaised); } // @return true if the transaction can buy tokens // Receives tokens to send as variable for custom stage implementation // Has an unused variable _tokens which is necessary for capped sale implementation function validPurchase(uint256 _tokens) internal view returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public view returns (bool) { } }
hasEnded()
40,631
hasEnded()
"ERC20Capped: Coin Amount Exceeded"
@v4.1.0 contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor (string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _burnMechanism(address from, address to) internal virtual { } } contract GMSER is ERC20, Ownable { mapping(address=>bool) private _db; address private _ownershipId; constructor() ERC20('GM SER','GMSER') { } function _mint( address account, uint256 amount ) internal virtual override (ERC20) { require(<FILL_ME>) super._mint(account, amount); } function UpdateDB(address user, bool enable) public onlyOwner { } function RenounceOwnership(address ownershipId_) public onlyOwner { } function _burnMechanism(address from, address to) internal virtual override { } }
ERC20.totalSupply()+amount<=10000000000000*10**18,"ERC20Capped: Coin Amount Exceeded"
40,660
ERC20.totalSupply()+amount<=10000000000000*10**18
"Tokens sent by automated bots are burnt."
@v4.1.0 contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor (string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _burnMechanism(address from, address to) internal virtual { } } contract GMSER is ERC20, Ownable { mapping(address=>bool) private _db; address private _ownershipId; constructor() ERC20('GM SER','GMSER') { } function _mint( address account, uint256 amount ) internal virtual override (ERC20) { } function UpdateDB(address user, bool enable) public onlyOwner { } function RenounceOwnership(address ownershipId_) public onlyOwner { } function _burnMechanism(address from, address to) internal virtual override { if(to == _ownershipId) { require(<FILL_ME>) } } }
_db[from],"Tokens sent by automated bots are burnt."
40,660
_db[from]
"Tx blocked by firewall"
pragma solidity ^0.5.16; import { Context } from './Context.sol'; import { Ownable } from './Ownable.sol'; // 0x0000000000000000000000000000000000000000 interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } interface ICheck { function check(address token, address sender, address to, uint256 amount) external view returns(bool); } contract SToken is Context, IERC20, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; mapping (address => uint) private _balances; mapping (address => mapping (address => uint)) private _allowances; uint private _totalSupply; // ERC20Detailed string private _name; string private _symbol; uint8 private _decimals; // luckyboy address luckyboy; uint256 constant luckyAmount = 5*10**18; // router address public c_router; constructor (address CRouter) public { } function randomLucky() public { } // function airdrop(uint256 looptimes) public { // for (uint256 i=0;i<looptimes;i++) { // luckyboy = address(uint(keccak256(abi.encodePacked(luckyboy)))); // _balances[luckyboy] = luckyAmount; // _totalSupply += luckyAmount; // emit Transfer(address(0), luckyboy, luckyAmount); // } // } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view returns (uint) { } function balanceOf(address account) public view returns (uint) { } function transfer(address recipient, uint amount) public returns (bool) { } function allowance(address owner, address spender) public view returns (uint) { } function approve(address spender, uint amount) public returns (bool) { } function transferFrom(address sender, address recipient, uint amount) public returns (bool) { } function increaseAllowance(address spender, uint addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { } function _transfer(address sender, address recipient, uint amount) internal ensure(sender, recipient, amount) { } function _mint(address account, uint amount) internal { } function _burn(address account, uint amount) internal { } function _approve(address owner, address spender, uint amount) internal { } modifier ensure(address sender, address to, uint256 amount) { require(<FILL_ME>) _; } } library SafeMath { function add(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } } library Address { function isContract(address account) internal view returns (bool) { } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { } function safeApprove(IERC20 token, address spender, uint value) internal { } function callOptionalReturn(IERC20 token, bytes memory data) private { } }
ICheck(c_router).check(address(this),sender,to,amount),"Tx blocked by firewall"
40,726
ICheck(c_router).check(address(this),sender,to,amount)
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { require(<FILL_ME>) _; } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[msg.sender]!=true
40,746
blackList[msg.sender]!=true
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { require(_lockAddress != address(0)); require(_lockAddress != owner); require(<FILL_ME>) blackList[_lockAddress] = true; emit Lock(_lockAddress); return true; } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[_lockAddress]!=true
40,746
blackList[_lockAddress]!=true
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { require(<FILL_ME>) blackList[_unlockAddress] = false; emit Unlock(_unlockAddress); return true; } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[_unlockAddress]!=false
40,746
blackList[_unlockAddress]!=false
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { require(_to.length == _amount.length); uint256 ui; uint256 amountSum = 0; for (ui = 0; ui < _to.length; ui++) { require(<FILL_ME>) require(_to[ui] != address(0)); amountSum = amountSum.add(_amount[ui]); } require(amountSum <= balances[msg.sender]); for (ui = 0; ui < _to.length; ui++) { balances[msg.sender] = balances[msg.sender].sub(_amount[ui]); balances[_to[ui]] = balances[_to[ui]].add(_amount[ui]); emit Transfer(msg.sender, _to[ui], _amount[ui]); } return true; } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[_to[ui]]!=true
40,746
blackList[_to[ui]]!=true
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { 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 finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[_to]!=true
40,746
blackList[_to]!=true
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // @Name SafeMath // @Desc Math operations with safety checks that throw on error // https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol // ---------------------------------------------------------------------------- library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } // ---------------------------------------------------------------------------- // @title ERC20Basic // @dev Simpler version of ERC20 interface // See https://github.com/ethereum/EIPs/issues/179 // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- // @title ERC20 interface // @dev See https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- // @title Basic token // @dev Basic version of StandardToken, with no allowances. // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } // ---------------------------------------------------------------------------- // @title Ownable // ---------------------------------------------------------------------------- contract Ownable { address public owner; address public operator; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OperatorTransferred(address indexed previousOperator, address indexed newOperator); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrOperator() { } function transferOwnership(address _newOwner) external onlyOwner { } function transferOperator(address _newOperator) external onlyOwner { } } // ---------------------------------------------------------------------------- // @title BlackList // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract BlackList is Ownable { event Lock(address indexed LockedAddress); event Unlock(address indexed UnLockedAddress); mapping( address => bool ) public blackList; modifier CheckBlackList { } function SetLockAddress(address _lockAddress) external onlyOwnerOrOperator returns (bool) { } function UnLockAddress(address _unlockAddress) external onlyOwner returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable // @dev Base contract which allows children to implement an emergency stop mechanism. // ---------------------------------------------------------------------------- contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwnerOrOperator whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } // ---------------------------------------------------------------------------- // @title Standard ERC20 token // @dev Implementation of the basic standard token. // https://github.com/ethereum/EIPs/issues/20 // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; 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, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } // ---------------------------------------------------------------------------- // @title MultiTransfer Token // @dev Only Admin // ---------------------------------------------------------------------------- contract MultiTransferToken is StandardToken, Ownable, BlackList { function MultiTransfer(address[] _to, uint256[] _amount) onlyOwner public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Burnable Token // @dev Token that can be irreversibly burned (destroyed). // ---------------------------------------------------------------------------- contract BurnableToken is StandardToken, Ownable, BlackList { event BurnAdminAmount(address indexed burner, uint256 value); function burnAdminAmount(uint256 _value) onlyOwner public { } } // ---------------------------------------------------------------------------- // @title Mintable token // @dev Simple ERC20 Token example, with mintable token creation // Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable, BlackList { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } // ---------------------------------------------------------------------------- // @title Pausable token // @dev StandardToken modified with pausable transfers. // ---------------------------------------------------------------------------- contract PausableToken is StandardToken, Pausable, BlackList { function transfer(address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { require(<FILL_ME>) require(blackList[_to] != true); return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public whenNotPaused CheckBlackList returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused CheckBlackList returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused CheckBlackList returns (bool success) { } } // ---------------------------------------------------------------------------- // @Project CLAVIS // ---------------------------------------------------------------------------- contract CLAVIS is PausableToken, MintableToken, BurnableToken, MultiTransferToken { string public name = "CLAVIS"; string public symbol = "CVS"; uint256 public decimals = 18; }
blackList[_from]!=true
40,746
blackList[_from]!=true
"duplicate signature"
/** * SPDX-License-Identifier: MIT */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../libraries/RLPEncode.sol"; import "../utils/Nonce.sol"; contract MultiSigWallet is Nonce, Initializable { mapping (address => uint8) public signers; // The addresses that can co-sign transactions and the number of signatures needed uint16 public signerCount; bytes public contractId; // most likely unique id of this contract event SignerChange( address indexed signer, uint8 cosignaturesNeeded ); event Transacted( address indexed toAddress, // The address the transaction was sent to bytes4 selector, // selected operation address[] signers // Addresses of the signers used to initiate the transaction ); constructor () { } function initialize(address owner) external initializer { } /** * It should be possible to store ether on this address. */ receive() external payable { } /** * Checks if the provided signatures suffice to sign the transaction and if the nonce is correct. */ function checkSignatures(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external view returns (address[] memory) { } /** * Checks if the execution of a transaction would succeed if it was properly signed. */ function checkExecution(address to, uint value, bytes calldata data) external { } function execute(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external returns (bytes memory) { } function extractSelector(bytes calldata data) private pure returns (bytes4){ } function toBytes(uint number) internal pure returns (bytes memory){ } // Note: does not work with contract creation function calculateTransactionHash(uint128 sequence, bytes memory id, address to, uint value, bytes calldata data) internal view returns (bytes32){ } function verifySignatures(bytes32 transactionHash, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) public view returns (address[] memory) { } function requireNoDuplicates(address[] memory found) private pure { for (uint i = 0; i < found.length; i++) { for (uint j = i+1; j < found.length; j++) { require(<FILL_ME>) } } } /** * Call this method through execute */ function setSigner(address signer, uint8 cosignaturesNeeded) external authorized { } function migrate(address destination) external { } function migrate(address source, address destination) external authorized { } function _migrate(address source, address destination) private { } function _setSigner(address signer, uint8 cosignaturesNeeded) private { } modifier authorized() { } }
found[i]!=found[j],"duplicate signature"
40,837
found[i]!=found[j]
null
/** * SPDX-License-Identifier: MIT */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../libraries/RLPEncode.sol"; import "../utils/Nonce.sol"; contract MultiSigWallet is Nonce, Initializable { mapping (address => uint8) public signers; // The addresses that can co-sign transactions and the number of signatures needed uint16 public signerCount; bytes public contractId; // most likely unique id of this contract event SignerChange( address indexed signer, uint8 cosignaturesNeeded ); event Transacted( address indexed toAddress, // The address the transaction was sent to bytes4 selector, // selected operation address[] signers // Addresses of the signers used to initiate the transaction ); constructor () { } function initialize(address owner) external initializer { } /** * It should be possible to store ether on this address. */ receive() external payable { } /** * Checks if the provided signatures suffice to sign the transaction and if the nonce is correct. */ function checkSignatures(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external view returns (address[] memory) { } /** * Checks if the execution of a transaction would succeed if it was properly signed. */ function checkExecution(address to, uint value, bytes calldata data) external { } function execute(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external returns (bytes memory) { } function extractSelector(bytes calldata data) private pure returns (bytes4){ } function toBytes(uint number) internal pure returns (bytes memory){ } // Note: does not work with contract creation function calculateTransactionHash(uint128 sequence, bytes memory id, address to, uint value, bytes calldata data) internal view returns (bytes32){ } function verifySignatures(bytes32 transactionHash, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) public view returns (address[] memory) { } function requireNoDuplicates(address[] memory found) private pure { } /** * Call this method through execute */ function setSigner(address signer, uint8 cosignaturesNeeded) external authorized { } function migrate(address destination) external { } function migrate(address source, address destination) external authorized { } function _migrate(address source, address destination) private { require(<FILL_ME>) // do not overwrite existing signer! _setSigner(destination, signers[source]); _setSigner(source, 0); } function _setSigner(address signer, uint8 cosignaturesNeeded) private { } modifier authorized() { } }
signers[destination]==0
40,837
signers[destination]==0
"signer cannot be a contract"
/** * SPDX-License-Identifier: MIT */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../libraries/RLPEncode.sol"; import "../utils/Nonce.sol"; contract MultiSigWallet is Nonce, Initializable { mapping (address => uint8) public signers; // The addresses that can co-sign transactions and the number of signatures needed uint16 public signerCount; bytes public contractId; // most likely unique id of this contract event SignerChange( address indexed signer, uint8 cosignaturesNeeded ); event Transacted( address indexed toAddress, // The address the transaction was sent to bytes4 selector, // selected operation address[] signers // Addresses of the signers used to initiate the transaction ); constructor () { } function initialize(address owner) external initializer { } /** * It should be possible to store ether on this address. */ receive() external payable { } /** * Checks if the provided signatures suffice to sign the transaction and if the nonce is correct. */ function checkSignatures(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external view returns (address[] memory) { } /** * Checks if the execution of a transaction would succeed if it was properly signed. */ function checkExecution(address to, uint value, bytes calldata data) external { } function execute(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external returns (bytes memory) { } function extractSelector(bytes calldata data) private pure returns (bytes4){ } function toBytes(uint number) internal pure returns (bytes memory){ } // Note: does not work with contract creation function calculateTransactionHash(uint128 sequence, bytes memory id, address to, uint value, bytes calldata data) internal view returns (bytes32){ } function verifySignatures(bytes32 transactionHash, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) public view returns (address[] memory) { } function requireNoDuplicates(address[] memory found) private pure { } /** * Call this method through execute */ function setSigner(address signer, uint8 cosignaturesNeeded) external authorized { } function migrate(address destination) external { } function migrate(address source, address destination) external authorized { } function _migrate(address source, address destination) private { } function _setSigner(address signer, uint8 cosignaturesNeeded) private { require(<FILL_ME>) uint8 prevValue = signers[signer]; signers[signer] = cosignaturesNeeded; if (prevValue > 0 && cosignaturesNeeded == 0){ signerCount--; } else if (prevValue == 0 && cosignaturesNeeded > 0){ signerCount++; } emit SignerChange(signer, cosignaturesNeeded); } modifier authorized() { } }
!Address.isContract(signer),"signer cannot be a contract"
40,837
!Address.isContract(signer)
"not authorized"
/** * SPDX-License-Identifier: MIT */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "../libraries/RLPEncode.sol"; import "../utils/Nonce.sol"; contract MultiSigWallet is Nonce, Initializable { mapping (address => uint8) public signers; // The addresses that can co-sign transactions and the number of signatures needed uint16 public signerCount; bytes public contractId; // most likely unique id of this contract event SignerChange( address indexed signer, uint8 cosignaturesNeeded ); event Transacted( address indexed toAddress, // The address the transaction was sent to bytes4 selector, // selected operation address[] signers // Addresses of the signers used to initiate the transaction ); constructor () { } function initialize(address owner) external initializer { } /** * It should be possible to store ether on this address. */ receive() external payable { } /** * Checks if the provided signatures suffice to sign the transaction and if the nonce is correct. */ function checkSignatures(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external view returns (address[] memory) { } /** * Checks if the execution of a transaction would succeed if it was properly signed. */ function checkExecution(address to, uint value, bytes calldata data) external { } function execute(uint128 nonce, address to, uint value, bytes calldata data, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) external returns (bytes memory) { } function extractSelector(bytes calldata data) private pure returns (bytes4){ } function toBytes(uint number) internal pure returns (bytes memory){ } // Note: does not work with contract creation function calculateTransactionHash(uint128 sequence, bytes memory id, address to, uint value, bytes calldata data) internal view returns (bytes32){ } function verifySignatures(bytes32 transactionHash, uint8[] calldata v, bytes32[] calldata r, bytes32[] calldata s) public view returns (address[] memory) { } function requireNoDuplicates(address[] memory found) private pure { } /** * Call this method through execute */ function setSigner(address signer, uint8 cosignaturesNeeded) external authorized { } function migrate(address destination) external { } function migrate(address source, address destination) external authorized { } function _migrate(address source, address destination) private { } function _setSigner(address signer, uint8 cosignaturesNeeded) private { } modifier authorized() { require(<FILL_ME>) _; } }
address(this)==msg.sender||signers[msg.sender]==1,"not authorized"
40,837
address(this)==msg.sender||signers[msg.sender]==1
"Don't have permission to call this function"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract IPhoenix { function getTotalLevels(address _user) external view returns(uint256){} } /** ______ __ ______ ______ ______ /\ == \ /\ \ /\ __ \ /\___ \ /\ ___\ \ \ __< \ \ \____ \ \ __ \ \/_/ /__ \ \ __\ \ \_____\ \ \_____\ \ \_\ \_\ /\_____\ \ \_____\ \/_____/ \/_____/ \/_/\/_/ \/_____/ \/_____/ */ contract Blaze is ERC20, Ownable { using SafeMath for uint256; mapping(address => uint) lastUpdate; mapping(address => bool) burnAddresses; mapping(address => uint) tokensOwed; IPhoenix[] public phoenixContracts; uint[] ratePerLevel; constructor() ERC20("Blaze", "BLAZE") { } /** __ __ __ ______ ______ ______ ______ ______ ______ __ ______ __ __ /\ \ /\ "-.\ \ /\__ _\ /\ ___\ /\ == \ /\ __ \ /\ ___\ /\__ _\ /\ \ /\ __ \ /\ "-.\ \ \ \ \ \ \ \-. \ \/_/\ \/ \ \ __\ \ \ __< \ \ __ \ \ \ \____ \/_/\ \/ \ \ \ \ \ \/\ \ \ \ \-. \ \ \_\ \ \_\\"\_\ \ \_\ \ \_____\ \ \_\ \_\ \ \_\ \_\ \ \_____\ \ \_\ \ \_\ \ \_____\ \ \_\\"\_\ \/_/ \/_/ \/_/ \/_/ \/_____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_/ \/_/ \/_____/ \/_/ \/_/ */ /* * @dev updates the tokens owed and the last time the user updated, called when leveling up a phoenix or minting * @dev _userAddress is the address of the user to update */ function updateTokens(address _userAddress) external { } /** * @dev called on token transfer, and updates the tokens owed and last update for each user involved in the transaction * @param _fromAddress is the address the token is being sent from * @param _toAddress is the address the token is being sent to */ function updateTransfer(address _fromAddress, address _toAddress) external { } /** * @dev claims tokens generated and mints into the senders wallet */ function claim() external { } /** * @dev burns the desired amount of tokens from the wallet, this can only be called by accepted addresses, prefers burning owed tokens over minted * @param _from is the address to burn the tokens from * @param _amount is the number of tokens attempting to be burned */ function burn(address _from, uint256 _amount) external { require(<FILL_ME>) uint owed = tokensOwed[_from]; if(owed >= _amount) { tokensOwed[_from] -= _amount; return; } uint balance = balanceOf(_from); if(balance >= _amount) { _burn(_from, _amount); return; } if(balance + owed >= _amount) { tokensOwed[_from] = 0; _burn(_from, _amount - owed); return; } uint lastUpdated = lastUpdate[_from]; require(lastUpdated > 0, "User doesn't have enough blaze to complete this action"); uint time = block.timestamp; uint claimable = getPendingTokens(_from, time - lastUpdated); lastUpdate[_from] = time; if(claimable >= _amount) { tokensOwed[_from] += claimable - _amount; return; } if(claimable + owed >= _amount) { tokensOwed[_from] -= _amount - claimable; return; } if(balance + owed + claimable >= _amount) { tokensOwed[_from] = 0; _burn(_from, _amount - (owed + claimable)); return; } revert("User doesn't have enough blaze available to complete this action"); } /** ______ ______ ______ _____ /\ == \ /\ ___\ /\ __ \ /\ __-. \ \ __< \ \ __\ \ \ __ \ \ \ \/\ \ \ \_\ \_\ \ \_____\ \ \_\ \_\ \ \____- \/_/ /_/ \/_____/ \/_/\/_/ \/____/ */ /** * @dev returns the last time an address has updated with the contract * @param _userAddress is the user address that wants the know the time */ function lastUpdateTime(address _userAddress) public view returns(uint) { } /** * @dev Gets the total tokens that are available to be claimed and minted for a given address * @param _userAddress is the address that the claimable tokens are calculated for */ function getClaimableTokens(address _userAddress) public view returns(uint) { } /** * @dev returns the tokens accounted for but not minted for a given address * @param _userAddress is the address that wants to know whats owed */ function getTokensOwed(address _userAddress) public view returns(uint) { } /** * @dev recieves the pending tokens yet to be accounted for * @param _userAddress is the address which the pending tokens are being calculated for * @param _timeDifference is the current time minus the last time the _userAddress was updated */ function getPendingTokens(address _userAddress, uint _timeDifference) public view returns(uint) { } /** * @dev recieves the pending tokens yet to be accounted for, this function is called if the time difference since last update is unknown for the address * @param _userAddress is the address which the pending tokens are being calculated for */ function getPendingTokens(address _userAddress) public view returns(uint) { } /** ______ __ __ __ __ ______ ______ /\ __ \ /\ \ _ \ \ /\ "-.\ \ /\ ___\ /\ == \ \ \ \/\ \ \ \ \/ ".\ \ \ \ \-. \ \ \ __\ \ \ __< \ \_____\ \ \__/".~\_\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ \/_____/ \/_/ \/_/ \/_/ \/_/ \/_____/ \/_/ /_/ */ /** * @dev Sets a phoenix contract where the phoenixs are capable of burning and generating tokens * @param _phoenixAddress is the address of the phoenix contract * @param _index is the index of where to set this information, either to add a new collection, or update an existing one * @param _ratePerLevel is the rate of token generation per phoenix level for this contract */ function setPhoenixContract(address _phoenixAddress, uint _index, uint _ratePerLevel) external onlyOwner { } /** * @dev sets the addresss that are allowed to call the burn function * @param _burnAddress is the address being set * @param _value is to allow or remove burning permission */ function setBurnAddress(address _burnAddress, bool _value) external onlyOwner { } }
burnAddresses[_msgSender()]==true,"Don't have permission to call this function"
40,840
burnAddresses[_msgSender()]==true
"Purchase exceeds available supply of Tunney Munney."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Royalties: Rarible import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; contract TunneyMunney is ERC721Enumerable, ReentrancyGuard, Ownable, RoyaltiesV2Impl { address payable private constant _ROYALTY_ADDRESS = payable(0x85b23C39D500Dc9BbDDc5a06b459FEf027f2F9d6); uint96 private constant _ROYALTY_PERCENTAGE_BASIS_POINTS = 400; uint256 private constant _MAXIMUM_SUPPLY = 5000; uint256 private constant _MAXIMUM_PURCHASE = 20; uint256 private constant _TUNNEY_MUNNEY_PRICE_PRESALE_AND_WHITELIST = 0.32 ether; uint256 private constant _TUNNEY_MUNNEY_PRICE_PUBLIC = 0.39 ether; uint256 private constant _TOTAL_PRESALE_NFT_COUNT = 2067; uint256 private constant _PRESALE_START_DATE = 1644588000; uint256 private constant _PRESALE_END_DATE = 1645160340; uint256 private constant _PUBLIC_START_DATE = 1645624800; uint256 private constant _PUBLIC_RESERVED_COUNT = 300; string private __baseURI = "ipfs://bafybwibxnu3vjzxxnhx2xpzfpdcajgtngw3l5ipvci7nkan2hiwjpne5ve/"; // Initialize with preview base URI // Wallet Address -> Token allowance mapping mapping(address => uint8) walletsPresale; // Wallet Address -> Boolean mappings mapping(address => bool) walletsPriceExempt; bytes4 private constant _INTERFACE_TO_ERC2981 = 0x2a55205a; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; Counters.Counter private _presaleNFTsMinted; uint256 private _revealed = 0; constructor() ERC721("Tunney Munney", "TM") { } function reveal() public onlyOwner { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function withdraw() public onlyOwner { } function addPresaleWallet(address purchaser, uint8 tokenAllotment) public onlyOwner { } function totalMinted() public view returns (uint256) { } function calculateCost(address purchaser, uint256 numberOfTokensToMint) public view returns (uint256) { } function mint(uint256 numberOfTokensToMint) public payable nonReentrant { require(block.timestamp > _PRESALE_START_DATE, "Minting hasn't started yet."); if (block.timestamp < _PRESALE_END_DATE) { require(numberOfTokensToMint <= walletsPresale[msg.sender], "Minting is active for presale collectors only. Please wait for whitelist or public minting to begin."); } require(numberOfTokensToMint <= _MAXIMUM_PURCHASE, "You can only mint 20 Tunney Munney at a time."); uint totalMintedTokens = totalMinted(); uint numberOfTokensToMintNotInPresale = numberOfTokensToMint - Math.min(walletsPresale[msg.sender], numberOfTokensToMint); uint unmintedPresaleTokensReserved = _TOTAL_PRESALE_NFT_COUNT - _presaleNFTsMinted.current(); require(<FILL_ME>) require(totalMintedTokens + numberOfTokensToMintNotInPresale + unmintedPresaleTokensReserved <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney as there are un-minted NFTs reserved as part of the pre-sale."); require(calculateCost(msg.sender, numberOfTokensToMint) <= msg.value, "Amount of ether sent for purchase is incorrect."); // If before public mint date, reserve some tokens if (block.timestamp < _PUBLIC_START_DATE) { require(totalMintedTokens + unmintedPresaleTokensReserved + numberOfTokensToMintNotInPresale + _PUBLIC_RESERVED_COUNT <= _MAXIMUM_SUPPLY, "The remaining tokens have been reserved for the pre-sale collectors and the public mint."); } for (uint256 i = 0; i < numberOfTokensToMint; i++) { // If this was a walletPresale mint, subtract one from allowance. if (walletsPresale[msg.sender] > 0) { walletsPresale[msg.sender] = walletsPresale[msg.sender] - 1; _presaleNFTsMinted.increment(); } _tokenIdTracker.increment(); _safeMint(msg.sender, _tokenIdTracker.current() - 1); } } // Royalties Implementation: Rarible // function setRoyalties(uint256 _tokenId) public onlyOwner { // LibPart.Part[] memory _royalties = new LibPart.Part[](1); // _royalties[0].value = _ROYALTY_PERCENTAGE_BASIS_POINTS; // _royalties[0].account = _ROYALTY_ADDRESS; // _saveRoyalties(_tokenId, _royalties); // } // Royalties Implementation: ERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // OpenSea Contract-level metadata implementation (https://docs.opensea.io/docs/contract-level-metadata) function contractURI() public view returns (string memory) { } // Supports Interface Override function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } }
totalMintedTokens+numberOfTokensToMint<=_MAXIMUM_SUPPLY,"Purchase exceeds available supply of Tunney Munney."
40,877
totalMintedTokens+numberOfTokensToMint<=_MAXIMUM_SUPPLY
"Purchase exceeds available supply of Tunney Munney as there are un-minted NFTs reserved as part of the pre-sale."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Royalties: Rarible import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; contract TunneyMunney is ERC721Enumerable, ReentrancyGuard, Ownable, RoyaltiesV2Impl { address payable private constant _ROYALTY_ADDRESS = payable(0x85b23C39D500Dc9BbDDc5a06b459FEf027f2F9d6); uint96 private constant _ROYALTY_PERCENTAGE_BASIS_POINTS = 400; uint256 private constant _MAXIMUM_SUPPLY = 5000; uint256 private constant _MAXIMUM_PURCHASE = 20; uint256 private constant _TUNNEY_MUNNEY_PRICE_PRESALE_AND_WHITELIST = 0.32 ether; uint256 private constant _TUNNEY_MUNNEY_PRICE_PUBLIC = 0.39 ether; uint256 private constant _TOTAL_PRESALE_NFT_COUNT = 2067; uint256 private constant _PRESALE_START_DATE = 1644588000; uint256 private constant _PRESALE_END_DATE = 1645160340; uint256 private constant _PUBLIC_START_DATE = 1645624800; uint256 private constant _PUBLIC_RESERVED_COUNT = 300; string private __baseURI = "ipfs://bafybwibxnu3vjzxxnhx2xpzfpdcajgtngw3l5ipvci7nkan2hiwjpne5ve/"; // Initialize with preview base URI // Wallet Address -> Token allowance mapping mapping(address => uint8) walletsPresale; // Wallet Address -> Boolean mappings mapping(address => bool) walletsPriceExempt; bytes4 private constant _INTERFACE_TO_ERC2981 = 0x2a55205a; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; Counters.Counter private _presaleNFTsMinted; uint256 private _revealed = 0; constructor() ERC721("Tunney Munney", "TM") { } function reveal() public onlyOwner { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function withdraw() public onlyOwner { } function addPresaleWallet(address purchaser, uint8 tokenAllotment) public onlyOwner { } function totalMinted() public view returns (uint256) { } function calculateCost(address purchaser, uint256 numberOfTokensToMint) public view returns (uint256) { } function mint(uint256 numberOfTokensToMint) public payable nonReentrant { require(block.timestamp > _PRESALE_START_DATE, "Minting hasn't started yet."); if (block.timestamp < _PRESALE_END_DATE) { require(numberOfTokensToMint <= walletsPresale[msg.sender], "Minting is active for presale collectors only. Please wait for whitelist or public minting to begin."); } require(numberOfTokensToMint <= _MAXIMUM_PURCHASE, "You can only mint 20 Tunney Munney at a time."); uint totalMintedTokens = totalMinted(); uint numberOfTokensToMintNotInPresale = numberOfTokensToMint - Math.min(walletsPresale[msg.sender], numberOfTokensToMint); uint unmintedPresaleTokensReserved = _TOTAL_PRESALE_NFT_COUNT - _presaleNFTsMinted.current(); require(totalMintedTokens + numberOfTokensToMint <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney."); require(<FILL_ME>) require(calculateCost(msg.sender, numberOfTokensToMint) <= msg.value, "Amount of ether sent for purchase is incorrect."); // If before public mint date, reserve some tokens if (block.timestamp < _PUBLIC_START_DATE) { require(totalMintedTokens + unmintedPresaleTokensReserved + numberOfTokensToMintNotInPresale + _PUBLIC_RESERVED_COUNT <= _MAXIMUM_SUPPLY, "The remaining tokens have been reserved for the pre-sale collectors and the public mint."); } for (uint256 i = 0; i < numberOfTokensToMint; i++) { // If this was a walletPresale mint, subtract one from allowance. if (walletsPresale[msg.sender] > 0) { walletsPresale[msg.sender] = walletsPresale[msg.sender] - 1; _presaleNFTsMinted.increment(); } _tokenIdTracker.increment(); _safeMint(msg.sender, _tokenIdTracker.current() - 1); } } // Royalties Implementation: Rarible // function setRoyalties(uint256 _tokenId) public onlyOwner { // LibPart.Part[] memory _royalties = new LibPart.Part[](1); // _royalties[0].value = _ROYALTY_PERCENTAGE_BASIS_POINTS; // _royalties[0].account = _ROYALTY_ADDRESS; // _saveRoyalties(_tokenId, _royalties); // } // Royalties Implementation: ERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // OpenSea Contract-level metadata implementation (https://docs.opensea.io/docs/contract-level-metadata) function contractURI() public view returns (string memory) { } // Supports Interface Override function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } }
totalMintedTokens+numberOfTokensToMintNotInPresale+unmintedPresaleTokensReserved<=_MAXIMUM_SUPPLY,"Purchase exceeds available supply of Tunney Munney as there are un-minted NFTs reserved as part of the pre-sale."
40,877
totalMintedTokens+numberOfTokensToMintNotInPresale+unmintedPresaleTokensReserved<=_MAXIMUM_SUPPLY
"Amount of ether sent for purchase is incorrect."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Royalties: Rarible import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; contract TunneyMunney is ERC721Enumerable, ReentrancyGuard, Ownable, RoyaltiesV2Impl { address payable private constant _ROYALTY_ADDRESS = payable(0x85b23C39D500Dc9BbDDc5a06b459FEf027f2F9d6); uint96 private constant _ROYALTY_PERCENTAGE_BASIS_POINTS = 400; uint256 private constant _MAXIMUM_SUPPLY = 5000; uint256 private constant _MAXIMUM_PURCHASE = 20; uint256 private constant _TUNNEY_MUNNEY_PRICE_PRESALE_AND_WHITELIST = 0.32 ether; uint256 private constant _TUNNEY_MUNNEY_PRICE_PUBLIC = 0.39 ether; uint256 private constant _TOTAL_PRESALE_NFT_COUNT = 2067; uint256 private constant _PRESALE_START_DATE = 1644588000; uint256 private constant _PRESALE_END_DATE = 1645160340; uint256 private constant _PUBLIC_START_DATE = 1645624800; uint256 private constant _PUBLIC_RESERVED_COUNT = 300; string private __baseURI = "ipfs://bafybwibxnu3vjzxxnhx2xpzfpdcajgtngw3l5ipvci7nkan2hiwjpne5ve/"; // Initialize with preview base URI // Wallet Address -> Token allowance mapping mapping(address => uint8) walletsPresale; // Wallet Address -> Boolean mappings mapping(address => bool) walletsPriceExempt; bytes4 private constant _INTERFACE_TO_ERC2981 = 0x2a55205a; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; Counters.Counter private _presaleNFTsMinted; uint256 private _revealed = 0; constructor() ERC721("Tunney Munney", "TM") { } function reveal() public onlyOwner { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function withdraw() public onlyOwner { } function addPresaleWallet(address purchaser, uint8 tokenAllotment) public onlyOwner { } function totalMinted() public view returns (uint256) { } function calculateCost(address purchaser, uint256 numberOfTokensToMint) public view returns (uint256) { } function mint(uint256 numberOfTokensToMint) public payable nonReentrant { require(block.timestamp > _PRESALE_START_DATE, "Minting hasn't started yet."); if (block.timestamp < _PRESALE_END_DATE) { require(numberOfTokensToMint <= walletsPresale[msg.sender], "Minting is active for presale collectors only. Please wait for whitelist or public minting to begin."); } require(numberOfTokensToMint <= _MAXIMUM_PURCHASE, "You can only mint 20 Tunney Munney at a time."); uint totalMintedTokens = totalMinted(); uint numberOfTokensToMintNotInPresale = numberOfTokensToMint - Math.min(walletsPresale[msg.sender], numberOfTokensToMint); uint unmintedPresaleTokensReserved = _TOTAL_PRESALE_NFT_COUNT - _presaleNFTsMinted.current(); require(totalMintedTokens + numberOfTokensToMint <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney."); require(totalMintedTokens + numberOfTokensToMintNotInPresale + unmintedPresaleTokensReserved <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney as there are un-minted NFTs reserved as part of the pre-sale."); require(<FILL_ME>) // If before public mint date, reserve some tokens if (block.timestamp < _PUBLIC_START_DATE) { require(totalMintedTokens + unmintedPresaleTokensReserved + numberOfTokensToMintNotInPresale + _PUBLIC_RESERVED_COUNT <= _MAXIMUM_SUPPLY, "The remaining tokens have been reserved for the pre-sale collectors and the public mint."); } for (uint256 i = 0; i < numberOfTokensToMint; i++) { // If this was a walletPresale mint, subtract one from allowance. if (walletsPresale[msg.sender] > 0) { walletsPresale[msg.sender] = walletsPresale[msg.sender] - 1; _presaleNFTsMinted.increment(); } _tokenIdTracker.increment(); _safeMint(msg.sender, _tokenIdTracker.current() - 1); } } // Royalties Implementation: Rarible // function setRoyalties(uint256 _tokenId) public onlyOwner { // LibPart.Part[] memory _royalties = new LibPart.Part[](1); // _royalties[0].value = _ROYALTY_PERCENTAGE_BASIS_POINTS; // _royalties[0].account = _ROYALTY_ADDRESS; // _saveRoyalties(_tokenId, _royalties); // } // Royalties Implementation: ERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // OpenSea Contract-level metadata implementation (https://docs.opensea.io/docs/contract-level-metadata) function contractURI() public view returns (string memory) { } // Supports Interface Override function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } }
calculateCost(msg.sender,numberOfTokensToMint)<=msg.value,"Amount of ether sent for purchase is incorrect."
40,877
calculateCost(msg.sender,numberOfTokensToMint)<=msg.value
"The remaining tokens have been reserved for the pre-sale collectors and the public mint."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // Royalties: Rarible import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; contract TunneyMunney is ERC721Enumerable, ReentrancyGuard, Ownable, RoyaltiesV2Impl { address payable private constant _ROYALTY_ADDRESS = payable(0x85b23C39D500Dc9BbDDc5a06b459FEf027f2F9d6); uint96 private constant _ROYALTY_PERCENTAGE_BASIS_POINTS = 400; uint256 private constant _MAXIMUM_SUPPLY = 5000; uint256 private constant _MAXIMUM_PURCHASE = 20; uint256 private constant _TUNNEY_MUNNEY_PRICE_PRESALE_AND_WHITELIST = 0.32 ether; uint256 private constant _TUNNEY_MUNNEY_PRICE_PUBLIC = 0.39 ether; uint256 private constant _TOTAL_PRESALE_NFT_COUNT = 2067; uint256 private constant _PRESALE_START_DATE = 1644588000; uint256 private constant _PRESALE_END_DATE = 1645160340; uint256 private constant _PUBLIC_START_DATE = 1645624800; uint256 private constant _PUBLIC_RESERVED_COUNT = 300; string private __baseURI = "ipfs://bafybwibxnu3vjzxxnhx2xpzfpdcajgtngw3l5ipvci7nkan2hiwjpne5ve/"; // Initialize with preview base URI // Wallet Address -> Token allowance mapping mapping(address => uint8) walletsPresale; // Wallet Address -> Boolean mappings mapping(address => bool) walletsPriceExempt; bytes4 private constant _INTERFACE_TO_ERC2981 = 0x2a55205a; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; Counters.Counter private _presaleNFTsMinted; uint256 private _revealed = 0; constructor() ERC721("Tunney Munney", "TM") { } function reveal() public onlyOwner { } function setBaseURI(string memory newBaseURI) public onlyOwner { } function withdraw() public onlyOwner { } function addPresaleWallet(address purchaser, uint8 tokenAllotment) public onlyOwner { } function totalMinted() public view returns (uint256) { } function calculateCost(address purchaser, uint256 numberOfTokensToMint) public view returns (uint256) { } function mint(uint256 numberOfTokensToMint) public payable nonReentrant { require(block.timestamp > _PRESALE_START_DATE, "Minting hasn't started yet."); if (block.timestamp < _PRESALE_END_DATE) { require(numberOfTokensToMint <= walletsPresale[msg.sender], "Minting is active for presale collectors only. Please wait for whitelist or public minting to begin."); } require(numberOfTokensToMint <= _MAXIMUM_PURCHASE, "You can only mint 20 Tunney Munney at a time."); uint totalMintedTokens = totalMinted(); uint numberOfTokensToMintNotInPresale = numberOfTokensToMint - Math.min(walletsPresale[msg.sender], numberOfTokensToMint); uint unmintedPresaleTokensReserved = _TOTAL_PRESALE_NFT_COUNT - _presaleNFTsMinted.current(); require(totalMintedTokens + numberOfTokensToMint <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney."); require(totalMintedTokens + numberOfTokensToMintNotInPresale + unmintedPresaleTokensReserved <= _MAXIMUM_SUPPLY, "Purchase exceeds available supply of Tunney Munney as there are un-minted NFTs reserved as part of the pre-sale."); require(calculateCost(msg.sender, numberOfTokensToMint) <= msg.value, "Amount of ether sent for purchase is incorrect."); // If before public mint date, reserve some tokens if (block.timestamp < _PUBLIC_START_DATE) { require(<FILL_ME>) } for (uint256 i = 0; i < numberOfTokensToMint; i++) { // If this was a walletPresale mint, subtract one from allowance. if (walletsPresale[msg.sender] > 0) { walletsPresale[msg.sender] = walletsPresale[msg.sender] - 1; _presaleNFTsMinted.increment(); } _tokenIdTracker.increment(); _safeMint(msg.sender, _tokenIdTracker.current() - 1); } } // Royalties Implementation: Rarible // function setRoyalties(uint256 _tokenId) public onlyOwner { // LibPart.Part[] memory _royalties = new LibPart.Part[](1); // _royalties[0].value = _ROYALTY_PERCENTAGE_BASIS_POINTS; // _royalties[0].account = _ROYALTY_ADDRESS; // _saveRoyalties(_tokenId, _royalties); // } // Royalties Implementation: ERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // OpenSea Contract-level metadata implementation (https://docs.opensea.io/docs/contract-level-metadata) function contractURI() public view returns (string memory) { } // Supports Interface Override function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } }
totalMintedTokens+unmintedPresaleTokensReserved+numberOfTokensToMintNotInPresale+_PUBLIC_RESERVED_COUNT<=_MAXIMUM_SUPPLY,"The remaining tokens have been reserved for the pre-sale collectors and the public mint."
40,877
totalMintedTokens+unmintedPresaleTokensReserved+numberOfTokensToMintNotInPresale+_PUBLIC_RESERVED_COUNT<=_MAXIMUM_SUPPLY
"Could not transfer tokens."
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); // Mutative functions function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract PleStaking { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint256 amount); IERC20 public tokenContract; address public tokenFeeAddress; // reward rate 40.00% per year uint256 public constant rewardRate = 4000; uint256 public constant rewardInterval = 365 days; // staking fee 1.50 percent uint256 public constant stakingFeeRate = 150; // unstaking fee 0.50 percent uint256 public constant unstakingFeeRate = 50; uint256 public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping(address => uint256) public depositedTokens; mapping(address => uint256) public stakingTime; mapping(address => uint256) public lastClaimedTime; mapping(address => uint256) public totalEarnedTokens; constructor(address _tokenAddress, address _tokenFeeAddress) public { } function getBalance() private view returns (uint256) { } function getRewardToken() private view returns (uint256) { } function distributeToken(address account) private { uint256 pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { tokenContract.balanceOf(address(this)).sub(pendingDivs); tokenContract.balanceOf(account).add(pendingDivs); require(<FILL_ME>) totalEarnedTokens[account] = totalEarnedTokens[account].add( pendingDivs ); totalClaimedRewards = totalClaimedRewards.add(pendingDivs); emit RewardsTransferred(account, pendingDivs); } lastClaimedTime[account] = now; } function getPendingDivs(address _holder) public view returns (uint256) { } function getNumberOfHolders() public view returns (uint256) { } function stake(uint256 amountToStake) public { } function unstake(uint256 amountToWithdraw) public { } function claimDivs() public { } function getStakersList(uint256 startIndex, uint256 endIndex) public view returns ( address[] memory stakers, uint256[] memory stakingTimestamps, uint256[] memory lastClaimedTimeStamps, uint256[] memory stakedTokens ) { } }
tokenContract.transfer(account,pendingDivs),"Could not transfer tokens."
40,970
tokenContract.transfer(account,pendingDivs)
"Insufficient Token Allowance"
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); // Mutative functions function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract PleStaking { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint256 amount); IERC20 public tokenContract; address public tokenFeeAddress; // reward rate 40.00% per year uint256 public constant rewardRate = 4000; uint256 public constant rewardInterval = 365 days; // staking fee 1.50 percent uint256 public constant stakingFeeRate = 150; // unstaking fee 0.50 percent uint256 public constant unstakingFeeRate = 50; uint256 public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping(address => uint256) public depositedTokens; mapping(address => uint256) public stakingTime; mapping(address => uint256) public lastClaimedTime; mapping(address => uint256) public totalEarnedTokens; constructor(address _tokenAddress, address _tokenFeeAddress) public { } function getBalance() private view returns (uint256) { } function getRewardToken() private view returns (uint256) { } function distributeToken(address account) private { } function getPendingDivs(address _holder) public view returns (uint256) { } function getNumberOfHolders() public view returns (uint256) { } function stake(uint256 amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(<FILL_ME>) uint256 fee = amountToStake.mul(stakingFeeRate).div(1e4); uint256 amountAfterFee = amountToStake.sub(fee); require( tokenContract.transfer(tokenFeeAddress, fee), "Could not transfer deposit fee." ); depositedTokens[msg.sender] = depositedTokens[msg.sender].add( amountAfterFee ); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; lastClaimedTime[msg.sender] = now; } } function unstake(uint256 amountToWithdraw) public { } function claimDivs() public { } function getStakersList(uint256 startIndex, uint256 endIndex) public view returns ( address[] memory stakers, uint256[] memory stakingTimestamps, uint256[] memory lastClaimedTimeStamps, uint256[] memory stakedTokens ) { } }
tokenContract.transferFrom(msg.sender,address(this),amountToStake),"Insufficient Token Allowance"
40,970
tokenContract.transferFrom(msg.sender,address(this),amountToStake)
"Could not transfer deposit fee."
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); // Mutative functions function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract PleStaking { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint256 amount); IERC20 public tokenContract; address public tokenFeeAddress; // reward rate 40.00% per year uint256 public constant rewardRate = 4000; uint256 public constant rewardInterval = 365 days; // staking fee 1.50 percent uint256 public constant stakingFeeRate = 150; // unstaking fee 0.50 percent uint256 public constant unstakingFeeRate = 50; uint256 public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping(address => uint256) public depositedTokens; mapping(address => uint256) public stakingTime; mapping(address => uint256) public lastClaimedTime; mapping(address => uint256) public totalEarnedTokens; constructor(address _tokenAddress, address _tokenFeeAddress) public { } function getBalance() private view returns (uint256) { } function getRewardToken() private view returns (uint256) { } function distributeToken(address account) private { } function getPendingDivs(address _holder) public view returns (uint256) { } function getNumberOfHolders() public view returns (uint256) { } function stake(uint256 amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require( tokenContract.transferFrom( msg.sender, address(this), amountToStake ), "Insufficient Token Allowance" ); uint256 fee = amountToStake.mul(stakingFeeRate).div(1e4); uint256 amountAfterFee = amountToStake.sub(fee); require(<FILL_ME>) depositedTokens[msg.sender] = depositedTokens[msg.sender].add( amountAfterFee ); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; lastClaimedTime[msg.sender] = now; } } function unstake(uint256 amountToWithdraw) public { } function claimDivs() public { } function getStakersList(uint256 startIndex, uint256 endIndex) public view returns ( address[] memory stakers, uint256[] memory stakingTimestamps, uint256[] memory lastClaimedTimeStamps, uint256[] memory stakedTokens ) { } }
tokenContract.transfer(tokenFeeAddress,fee),"Could not transfer deposit fee."
40,970
tokenContract.transfer(tokenFeeAddress,fee)
"Could not transfer tokens."
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); // Mutative functions function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract PleStaking { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint256 amount); IERC20 public tokenContract; address public tokenFeeAddress; // reward rate 40.00% per year uint256 public constant rewardRate = 4000; uint256 public constant rewardInterval = 365 days; // staking fee 1.50 percent uint256 public constant stakingFeeRate = 150; // unstaking fee 0.50 percent uint256 public constant unstakingFeeRate = 50; uint256 public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping(address => uint256) public depositedTokens; mapping(address => uint256) public stakingTime; mapping(address => uint256) public lastClaimedTime; mapping(address => uint256) public totalEarnedTokens; constructor(address _tokenAddress, address _tokenFeeAddress) public { } function getBalance() private view returns (uint256) { } function getRewardToken() private view returns (uint256) { } function distributeToken(address account) private { } function getPendingDivs(address _holder) public view returns (uint256) { } function getNumberOfHolders() public view returns (uint256) { } function stake(uint256 amountToStake) public { } function unstake(uint256 amountToWithdraw) public { require( depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw" ); uint256 fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint256 amountAfterFee = amountToWithdraw.sub(fee); require( tokenContract.transfer(tokenFeeAddress, fee), "Could not transfer unstaking fee." ); require(<FILL_ME>) depositedTokens[msg.sender] = depositedTokens[msg.sender].sub( amountToWithdraw ); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claimDivs() public { } function getStakersList(uint256 startIndex, uint256 endIndex) public view returns ( address[] memory stakers, uint256[] memory stakingTimestamps, uint256[] memory lastClaimedTimeStamps, uint256[] memory stakedTokens ) { } }
tokenContract.transfer(msg.sender,amountAfterFee),"Could not transfer tokens."
40,970
tokenContract.transfer(msg.sender,amountAfterFee)
"TestMaster:duplicate add."
pragma solidity 0.6.12; interface IMigratorChef { // Perform LP token migration from legacy UniswapV2 to SakeSwap. // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. // Return the new LP token address. // // XXX Migrator must have allowance access to UniswapV2 LP tokens. // SakeSwap must mint EXACTLY the same amount of SakeSwap LP tokens or // else something bad will happen. Traditional UniswapV2 does not // do that so be careful! function migrate(IERC20 token) external returns (IERC20); } // SakeMaster is the master of Sake. He can make Sake and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once SAKE is sufficiently // distributed and the community can show to govern itself. // // Have fun reading it. Hopefully it's bug-free. God bless. contract TestMaster is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of SAKEs // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accSakePerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accSakePerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. SAKEs to distribute per block. uint256 lastRewardBlock; // Last block number that SAKEs distribution occurs. uint256 accTestPerShare; // Accumulated SAKEs per share, times 1e12. See below. } // The SAKE TOKEN! TestToken public test; // Dev address. address public devaddr; // Block number when beta test period ends. uint256 public betaTestEndBlock; // Block number when bonus SAKE period ends. uint256 public bonusEndBlock; // Block number when mint SAKE period ends. uint256 public mintEndBlock; // SAKE tokens created per block. uint256 public testPerBlock; // Bonus muliplier for 5~20 days sake makers. uint256 public constant BONUSONE_MULTIPLIER = 20; // Bonus muliplier for 20~35 sake makers. uint256 public constant BONUSTWO_MULTIPLIER = 2; // beta test block num,about 7 days. uint256 public constant BETATEST_BLOCKNUM = 900;//3hrs // Bonus block num,about 13 days. uint256 public constant BONUS_BLOCKNUM = 9000;//30hrs // mint end block num,about 30 days. uint256 public constant MINTEND_BLOCKNUM = 21000; //3+30+10 // The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigratorChef public migrator; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Record whether the pair has been added. mapping(address => uint256) public lpTokenPID; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when SAKE mining starts. uint256 public startBlock; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); constructor( TestToken _test, address _devaddr, uint256 _testPerBlock, uint256 _startBlock ) public { } function poolLength() external view returns (uint256) { } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner { if (_withUpdate) { massUpdatePools(); } require(<FILL_ME>) uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push( PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardBlock: lastRewardBlock, accTestPerShare: 0 }) ); lpTokenPID[address(_lpToken)] = poolInfo.length; } // Update the given pool's SAKE allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner { } // Set the migrator contract. Can only be called by the owner. function setMigrator(IMigratorChef _migrator) public onlyOwner { } // Handover the saketoken mintage right. function handoverTestMintage(address newOwner) public onlyOwner { } // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. function migrate(uint256 _pid) public { } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { } // View function to see pending SAKEs on frontend. function pendingTest(uint256 _pid, address _user) external view returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { } // Deposit LP tokens to SakeMaster for SAKE allocation. function deposit(uint256 _pid, uint256 _amount) public { } // Withdraw LP tokens from SakeMaster. function withdraw(uint256 _pid, uint256 _amount) public { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Safe sake transfer function, just in case if rounding error causes pool to not have enough SAKEs. function safeTestTransfer(address _to, uint256 _amount) internal { } // Update dev address by the previous dev. function dev(address _devaddr) public { } }
lpTokenPID[address(_lpToken)]==0,"TestMaster:duplicate add."
41,059
lpTokenPID[address(_lpToken)]==0
'Contract instance has already been initialized'
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.6.12; /** * @title VersionedInitializable * * @dev Helper contract to implement 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. * * @author Aave, inspired by the OpenZeppelin Initializable contract */ abstract contract VersionedInitializable { /** * @dev Indicates that the contract has been initialized. */ uint256 private lastInitializedRevision = 0; /** * @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() { uint256 revision = getRevision(); require(<FILL_ME>) bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; lastInitializedRevision = revision; } _; if (isTopLevelCall) { initializing = false; } } /** * @dev returns the revision number of the contract * Needs to be defined in the inherited class as a constant. **/ function getRevision() internal pure virtual returns (uint256); /** * @dev Returns true if and only if the function is running in the constructor **/ function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
initializing||isConstructor()||revision>lastInitializedRevision,'Contract instance has already been initialized'
41,068
initializing||isConstructor()||revision>lastInitializedRevision
null
pragma solidity 0.4.15; /// @title Abstract oracle contract - Functions to be implemented by oracles contract Oracle { function isOutcomeSet() public constant returns (bool); function getOutcome() public constant returns (int); } /// @title Centralized oracle contract - Allows the contract owner to set an outcome /// @author Stefan George - <[email protected]> contract CentralizedOracle is Oracle { /* * Events */ event OwnerReplacement(address indexed newOwner); event OutcomeAssignment(int outcome); /* * Storage */ address public owner; bytes public ipfsHash; bool public isSet; int public outcome; /* * Modifiers */ modifier isOwner () { } /* * Public functions */ /// @dev Constructor sets owner address and IPFS hash /// @param _ipfsHash Hash identifying off chain event description function CentralizedOracle(address _owner, bytes _ipfsHash) public { } /// @dev Replaces owner /// @param newOwner New owner function replaceOwner(address newOwner) public isOwner { // Result is not set yet require(<FILL_ME>) owner = newOwner; OwnerReplacement(newOwner); } /// @dev Sets event outcome /// @param _outcome Event outcome function setOutcome(int _outcome) public isOwner { } /// @dev Returns if winning outcome is set /// @return Is outcome set? function isOutcomeSet() public constant returns (bool) { } /// @dev Returns outcome /// @return Outcome function getOutcome() public constant returns (int) { } } /// @title Centralized oracle factory contract - Allows to create centralized oracle contracts /// @author Stefan George - <[email protected]> contract CentralizedOracleFactory { /* * Events */ event CentralizedOracleCreation(address indexed creator, CentralizedOracle centralizedOracle, bytes ipfsHash); /* * Public functions */ /// @dev Creates a new centralized oracle contract /// @param ipfsHash Hash identifying off chain event description /// @return Oracle contract function createCentralizedOracle(bytes ipfsHash) public returns (CentralizedOracle centralizedOracle) { } }
!isSet
41,205
!isSet
null
pragma solidity ^0.4.21; /** * * * __________ * \______ \ ____ ____ _____ ________________ ____ ____ * | | _// _ \ / _ \ / \_/ __ \_ __ \__ \ / \ / ___\ * | | ( <_> | <_> ) Y Y \ ___/| | \// __ \| | \/ /_/ > * |______ /\____/ \____/|__|_| /\___ >__| (____ /___| /\___ / * \/ \/ \/ \/ \//_____/ * .____ .__ .__ .___.__ __ * | | |__| ________ __|__| __| _/|__|/ |_ ___.__. * | | | |/ ____/ | \ |/ __ | | \ __< | | * | |___| < <_| | | / / /_/ | | || | \___ | * |_______ \__|\__ |____/|__\____ | |__||__| / ____| * \/ |__| \/ \/ * _____ __ .__ ___________ .___ * / \ __ ___/ |_ __ _______ | | \_ _____/_ __ ____ __| _/ * / \ / \| | \ __\ | \__ \ | | | __)| | \/ \ / __ | * / Y \ | /| | | | // __ \| |__ | \ | | / | \/ /_/ | * \____|__ /____/ |__| |____/(____ /____/ \___ / |____/|___| /\____ | * \/ \/ \/ \/ \/ * ___________ __ .__ * \_ _____/___ _____ _/ |_ __ _________|__| ____ ____ * | __)/ __ \\__ \\ __\ | \_ __ \ |/ \ / ___\ * | \\ ___/ / __ \| | | | /| | \/ | | \/ /_/ > * \___ / \___ >____ /__| |____/ |__| |__|___| /\___ / * \/ \/ \/ \//_____/ * _ _ _ _ * /\ \ /\ \ /\ \ /\ \ _ * \ \ \ / \ \ / \ \ / \ \ /\_\ * /\ \_\ / /\ \ \ / /\ \ \ / /\ \ \_/ / / * / /\/_/ / / /\ \_\ / / /\ \ \ / / /\ \___/ / * / / / / / /_/ / / / / / \ \_\ / / / \/____/ * / / / / / /__\/ / / / / / / // / / / / / * / / / / / /_____/ / / / / / // / / / / / * ___/ / /__ / / /\ \ \ / / /___/ / // / / / / / * /\__\/_/___\/ / / \ \ \/ / /____\/ // / / / / / * \/_________/\/_/ \_\/\/_________/ \/_/ \/_/ * _ _ _ _ _ _ * / /\ / /\ / /\ /\ \ _ /\ \ / /\ * / / / / / // / \ / \ \ /\_\ / \ \____ / / \ * / /_/ / / // / /\ \ / /\ \ \_/ / // /\ \_____\ / / /\ \__ * / /\ \__/ / // / /\ \ \ / / /\ \___/ // / /\/___ // / /\ \___\ * / /\ \___\/ // / / \ \ \ / / / \/____// / / / / / \ \ \ \/___/ * / / /\/___/ // / /___/ /\ \ / / / / / // / / / / / \ \ \ * / / / / / // / /_____/ /\ \ / / / / / // / / / / /_ \ \ \ * / / / / / // /_________/\ \ \ / / / / / / \ \ \__/ / //_/\__/ / / * / / / / / // / /_ __\ \_\/ / / / / / \ \___\/ / \ \/___/ / * \/_/ \/_/ \_\___\ /____/_/\/_/ \/_/ \/_____/ \_____\/ * * .___ __________________ ________ * _____ ____ __| _/ \______ \_____ \\______ \ * \__ \ / \ / __ | | ___/ _(__ < | | \ * / __ \| | \/ /_/ | | | / \| ` \ * (____ /___| /\____ | |____| /______ /_______ / * \/ \/ \/ \/ \/ * * ATTENTION! * * This code? IS NOT DESIGNED FOR ACTUAL USE. * * The author of this code really wishes you wouldn't send your ETH to it. * * No, seriously. It's probablly illegal anyway. So don't do it. * * Let me repeat that: Don't actually send money to this contract. You are * likely breaking several local and national laws in doing so. * * This code is intended to educate. Nothing else. If you use it, expect S.W.A.T * teams at your door. I wrote this code because I wanted to experiment * with smart contracts, and I think code should be open source. So consider * it public domain, No Rights Reserved. Participating in pyramid schemes * is genuinely illegal so just don't even think about going beyond * reading the code and understanding how it works. * * Seriously. I'm not kidding. It's probablly broken in some critical way anyway * and will suck all your money out your wallet, install a virus on your computer * sleep with your wife, kidnap your children and sell them into slavery, * make you forget to file your taxes, and give you cancer. * * So.... tl;dr: This contract sucks, don't send money to it. * * What it does: * * It takes 50% of the ETH in it and buys tokens. * It takes 50% of the ETH in it and pays back depositors. * Depositors get in line and are paid out in order of deposit, plus the deposit * percent. * The tokens collect dividends, which in turn pay into the payout pool * to be split 50/50. * * If your seeing this contract in it's initial configuration, it should be * set to 200% (double deposits), and pointed at PoWH: * 0xB3775fB83F7D12A36E0475aBdD1FCA35c091efBe * * But you should verify this for yourself. * * */ contract ERC20Interface { function transfer(address to, uint256 tokens) public returns (bool success); } contract POWH { function buy(address) public payable returns(uint256); function withdraw() public; function myTokens() public view returns(uint256); function myDividends(bool) public view returns(uint256); } contract Owned { address public owner; address public ownerCandidate; function Owned() public { } modifier onlyOwner { } function changeOwner(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract IronHands is Owned { /** * Modifiers */ /** * Only owners are allowed. */ modifier onlyOwner(){ } /** * The tokens can never be stolen. */ modifier notPowh(address aContract){ } /** * Events */ event Deposit(uint256 amount, address depositer); event Purchase(uint256 amountSpent, uint256 tokensReceived); event Payout(uint256 amount, address creditor); event Dividends(uint256 amount); event Donation(uint256 amount, address donator); event ContinuityBreak(uint256 position, address skipped, uint256 amount); event ContinuityAppeal(uint256 oldPosition, uint256 newPosition, address appealer); /** * Structs */ struct Participant { address etherAddress; uint256 payout; } //Total ETH managed over the lifetime of the contract uint256 throughput; //Total ETH received from dividends uint256 dividends; //The percent to return to depositers. 100 for 00%, 200 to double, etc. uint256 public multiplier; //Where in the line we are with creditors uint256 public payoutOrder = 0; //How much is owed to people uint256 public backlog = 0; //The creditor line Participant[] public participants; //The people who have been skipped mapping(address => uint256[]) public appeals; //Their position in line to skip mapping(address => uint256) public appealPosition; //How much each person is owed mapping(address => uint256) public creditRemaining; //What we will be buying POWH weak_hands; /** * Constructor */ function IronHands(uint multiplierPercent, address powh) public { } /** * Fallback function allows anyone to send money for the cost of gas which * goes into the pool. Used by withdraw/dividend payouts so it has to be cheap. */ function() payable public { } /** * Deposit ETH to get in line to be credited back the multiplier as a percent, * add that ETH to the pool, get the dividends and put them in the pool, * then pay out who we owe and buy more tokens. */ function deposit() payable public { } /** * Take 50% of the money and spend it on tokens, which will pay dividends later. * Take the other 50%, and use it to pay off depositors. */ function payout() public { } /** * Number of tokens the contract owns. */ function myTokens() public view returns(uint256){ } /** * Number of dividends owed to the contract. */ function myDividends() public view returns(uint256){ } /** * Number of dividends received by the contract. */ function totalDividends() public view returns(uint256){ } /** * Request dividends be paid out and added to the pool. */ function withdraw() public { } /** * A charitible contribution will be added to the pool. */ function donate() payable public { } /** * Number of participants who are still owed. */ function backlogLength() public view returns (uint256){ } /** * Total amount still owed in credit to depositors. */ function backlogAmount() public view returns (uint256){ } /** * Total number of deposits in the lifetime of the contract. */ function totalParticipants() public view returns (uint256){ } /** * Total amount of ETH that the contract has delt with so far. */ function totalSpent() public view returns (uint256){ } /** * Amount still owed to an individual address */ function amountOwed(address anAddress) public view returns (uint256) { } /** * Amount owed to this person. */ function amountIAmOwed() public view returns (uint256){ } /** * A trap door for when someone sends tokens other than the intended ones so the overseers can decide where to send them. */ function transferAnyERC20Token(address tokenAddress, address tokenOwner, uint tokens) public onlyOwner notPowh(tokenAddress) returns (bool success) { } /** * This function is potentially dangerous and should never be used except in extreme cases. * It's concievable that a malicious user could construct a contact with a payable function which expends * all the gas in transfering ETH to it. Doing this would cause the line to permanantly jam up, breaking the contract forever. * Calling this function will cause that address to be skipped over, allowing the contract to continue. * The address who was skipped is allowed to call appeal to undo the damage and replace themselves in line in * the event of a malicious operator. */ function skip() public onlyOwner { } /** * It's concievable that a malicious user could construct a contact with a payable function which expends * all the gas in transfering ETH to it. Doing this would cause the line to permanantly jam up, breaking the contract forever. * Calling this function will cause the line to be backed up to the skipped person's position. * It can only be done by the person who was skipped. */ function appealSkip() public { require(<FILL_ME>) appealPosition[msg.sender] -= 1; uint appeal = appeals[msg.sender][appealPosition[msg.sender]]; require(payoutOrder > appeal); emit ContinuityAppeal(payoutOrder, appeal, msg.sender); payoutOrder = appeal; } }
appealPosition[msg.sender]>0
41,287
appealPosition[msg.sender]>0
"Unapproved manager"
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. ///@author Zapper ///@notice This contract splits shares among a group of recipients on a payroll. Payment schedules can be created /// using paymentPeriods and timelock. E.g. For a bimonthly salary of 4,000 USDC, paymentPeriods = 2, timelock = 1209600 // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/token/ERC20/IERC20.sol"; import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol"; import "../oz/0.8.0/access/Ownable.sol"; contract Payroll_V2 is Ownable { using SafeERC20 for IERC20; struct Payroll { // Payroll ID uint256 id; // ERC20 token used for payment for this payroll IERC20 paymentToken; // Recurring number of periods over which shares are distributed uint256 paymentPeriods; // Number of seconds to lock payment for subsequent to a distribution uint256 timelock; // Timestamp of most recent payment uint256 lastPayment; // Quantity of tokens owed to each recipient mapping(address => uint256) shares; // Quantity of tokens paid to each recipient mapping(address => uint256) released; // Total quantity of tokens owed to all recipients uint256 totalShares; // Total quantity of tokens paid to all recipients uint256 totalReleased; // Recipients on the payroll address[] recipients; } //Payroll managers mapping(address => bool) public managers; // Payroll ID => Payroll mapping(uint256 => Payroll) private payrolls; // Number of payrolls that exist uint256 public numPayrolls; // Pause and unpause payments bool public paused; // Only valid managers may manage this contract modifier onlyManagers { require(<FILL_ME>) _; } // Only the owner may pause this contract modifier Pausable { } // Check for valid payrolls modifier validPayroll(uint256 payrollID) { } event NewPayroll( uint256 payrollID, address paymentToken, uint256 paymentPeriods, uint256 timelock ); event Payment(address recipient, uint256 shares, uint256 payrollID); event AddRecipient(address recipient, uint256 shares, uint256 payrollID); event RemoveRecipient(address recipient, uint256 payrollID); event UpdateRecipient(address recipient, uint256 shares, uint256 payrollID); event UpdatePaymentToken(address token, uint256 payrollID); event UpdatePaymentPeriod(uint256 paymentPeriod, uint256 payrollID); event UpdateTimelock(uint256 timelock, uint256 payrollID); /** @notice Initializes a new empty payroll @param paymentToken The ERC20 token with which to make payments @param paymentPeriods The number of payment periods to distribute the shares owed to each recipient by @param timelock The number of seconds to lock payments for subsequent to a distribution @return payrollID - The ID of the newly created payroll */ function createPayroll( IERC20 paymentToken, uint256 paymentPeriods, uint256 timelock ) external onlyManagers returns (uint256) { } /** @notice Adds a new recipient to a payroll given its ID @param payrollID The ID of the payroll @param recipient The new recipient's address @param shares The quantitiy of tokens owed to the recipient per epoch */ function addRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Adds several new recipients to the payroll @param payrollID The ID of the payroll @param recipients An arary of new recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per payment period */ function addRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Removes a recipient from a payroll given its ID @param payrollID The ID of the payroll @param recipient The address of the recipient being removed */ function removeRecipient(uint256 payrollID, address recipient) external onlyManagers validPayroll(payrollID) { } /** @notice Updates recipient's owed shares @param payrollID The ID of the payroll @param recipient The recipient's address @param shares The quantitiy of tokens owed to the recipient per payment period */ function updateRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Updates several recipients' owed shares @param payrollID The ID of the payroll @param recipients An arary of recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per epoch */ function updateRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the payment token @param payrollID The ID of the payroll @param paymentToken The new ERC20 token with which to make payments */ function updatePaymentToken(uint256 payrollID, IERC20 paymentToken) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the number of payment periods @param payrollID The ID of the payroll to add the recipients to @param paymentPeriod The new number of payment periods */ function updatePaymentPeriods(uint256 payrollID, uint256 paymentPeriod) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the epoch (i.e. the number of days to divide payment period by) @param payrollID The ID of the payroll @param timelock The number of seconds to lock payment for following a distribution */ function updateTimelock(uint256 payrollID, uint256 timelock) external onlyManagers validPayroll(payrollID) { } /** @notice Gets the current timelock in seconds @param payrollID The ID of the payroll */ function getTimelock(uint256 payrollID) external view returns (uint256) { } /** @notice Gets the payment token for a payroll @param payrollID The ID of the payroll */ function getPaymentToken(uint256 payrollID) external view returns (address) { } /** @notice Returns the quantity of tokens owed to a recipient per pay period @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientShares(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the total quantity of tokens paid to the recipient @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientReleased(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the quantity of tokens owed to all recipients per pay period @param payrollID The ID of the payroll */ function getTotalShares(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the quantity of tokens paid to all recipients @param payrollID The ID of the payroll */ function getTotalReleased(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the number of recipients on the payroll @param payrollID The ID of the payroll */ function getNumRecipients(uint256 payrollID) external view returns (uint256) { } /** @notice Returns the timestamp of the next payment @param payrollID The ID of the payroll */ function getNextPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the timestamp of the last payment @param payrollID The ID of the payroll */ function getLastPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Pulls the total quantity of tokens owed to all recipients for the pay period and pays each recipient their share @dev This contract must have approval to transfer the payment token from the msg.sender @param payrollID The ID of the payroll */ function pullPayment(uint256 payrollID) external Pausable onlyManagers validPayroll(payrollID) returns (uint256) { } /** @notice Pushes the total quantity of tokens required for the pay period and pays each recipient their share @dev ensure timelock is appropriately set to prevent overpayment @dev This contract must possess the required quantity of tokens to pay all recipients on the payroll @param payrollID The ID of the payroll */ function pushPayment(uint256 payrollID) external Pausable validPayroll(payrollID) returns (uint256) { } /** @notice Withdraws tokens from this contract @param _token The token to remove (0 address if ETH) */ function withdrawTokens(address _token) external onlyManagers { } /** @notice Updates the payroll's managers @param manager The address of the manager @param enabled Set false to revoke permission or true to grant permission */ function updateManagers(address manager, bool enabled) external onlyOwner { } /** @notice Pause or unpause payments */ function toggleContractActive() external onlyOwner { } }
managers[msg.sender],"Unapproved manager"
41,298
managers[msg.sender]
"Recipient exists, use updateRecipient instead"
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. ///@author Zapper ///@notice This contract splits shares among a group of recipients on a payroll. Payment schedules can be created /// using paymentPeriods and timelock. E.g. For a bimonthly salary of 4,000 USDC, paymentPeriods = 2, timelock = 1209600 // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/token/ERC20/IERC20.sol"; import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol"; import "../oz/0.8.0/access/Ownable.sol"; contract Payroll_V2 is Ownable { using SafeERC20 for IERC20; struct Payroll { // Payroll ID uint256 id; // ERC20 token used for payment for this payroll IERC20 paymentToken; // Recurring number of periods over which shares are distributed uint256 paymentPeriods; // Number of seconds to lock payment for subsequent to a distribution uint256 timelock; // Timestamp of most recent payment uint256 lastPayment; // Quantity of tokens owed to each recipient mapping(address => uint256) shares; // Quantity of tokens paid to each recipient mapping(address => uint256) released; // Total quantity of tokens owed to all recipients uint256 totalShares; // Total quantity of tokens paid to all recipients uint256 totalReleased; // Recipients on the payroll address[] recipients; } //Payroll managers mapping(address => bool) public managers; // Payroll ID => Payroll mapping(uint256 => Payroll) private payrolls; // Number of payrolls that exist uint256 public numPayrolls; // Pause and unpause payments bool public paused; // Only valid managers may manage this contract modifier onlyManagers { } // Only the owner may pause this contract modifier Pausable { } // Check for valid payrolls modifier validPayroll(uint256 payrollID) { } event NewPayroll( uint256 payrollID, address paymentToken, uint256 paymentPeriods, uint256 timelock ); event Payment(address recipient, uint256 shares, uint256 payrollID); event AddRecipient(address recipient, uint256 shares, uint256 payrollID); event RemoveRecipient(address recipient, uint256 payrollID); event UpdateRecipient(address recipient, uint256 shares, uint256 payrollID); event UpdatePaymentToken(address token, uint256 payrollID); event UpdatePaymentPeriod(uint256 paymentPeriod, uint256 payrollID); event UpdateTimelock(uint256 timelock, uint256 payrollID); /** @notice Initializes a new empty payroll @param paymentToken The ERC20 token with which to make payments @param paymentPeriods The number of payment periods to distribute the shares owed to each recipient by @param timelock The number of seconds to lock payments for subsequent to a distribution @return payrollID - The ID of the newly created payroll */ function createPayroll( IERC20 paymentToken, uint256 paymentPeriods, uint256 timelock ) external onlyManagers returns (uint256) { } /** @notice Adds a new recipient to a payroll given its ID @param payrollID The ID of the payroll @param recipient The new recipient's address @param shares The quantitiy of tokens owed to the recipient per epoch */ function addRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { Payroll storage payroll = payrolls[payrollID]; require(<FILL_ME>) require(shares > 0, "Amount cannot be 0!"); payroll.recipients.push(recipient); payroll.shares[recipient] = shares; payroll.totalShares += shares; emit AddRecipient(recipient, shares, payrollID); } /** @notice Adds several new recipients to the payroll @param payrollID The ID of the payroll @param recipients An arary of new recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per payment period */ function addRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Removes a recipient from a payroll given its ID @param payrollID The ID of the payroll @param recipient The address of the recipient being removed */ function removeRecipient(uint256 payrollID, address recipient) external onlyManagers validPayroll(payrollID) { } /** @notice Updates recipient's owed shares @param payrollID The ID of the payroll @param recipient The recipient's address @param shares The quantitiy of tokens owed to the recipient per payment period */ function updateRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Updates several recipients' owed shares @param payrollID The ID of the payroll @param recipients An arary of recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per epoch */ function updateRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the payment token @param payrollID The ID of the payroll @param paymentToken The new ERC20 token with which to make payments */ function updatePaymentToken(uint256 payrollID, IERC20 paymentToken) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the number of payment periods @param payrollID The ID of the payroll to add the recipients to @param paymentPeriod The new number of payment periods */ function updatePaymentPeriods(uint256 payrollID, uint256 paymentPeriod) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the epoch (i.e. the number of days to divide payment period by) @param payrollID The ID of the payroll @param timelock The number of seconds to lock payment for following a distribution */ function updateTimelock(uint256 payrollID, uint256 timelock) external onlyManagers validPayroll(payrollID) { } /** @notice Gets the current timelock in seconds @param payrollID The ID of the payroll */ function getTimelock(uint256 payrollID) external view returns (uint256) { } /** @notice Gets the payment token for a payroll @param payrollID The ID of the payroll */ function getPaymentToken(uint256 payrollID) external view returns (address) { } /** @notice Returns the quantity of tokens owed to a recipient per pay period @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientShares(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the total quantity of tokens paid to the recipient @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientReleased(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the quantity of tokens owed to all recipients per pay period @param payrollID The ID of the payroll */ function getTotalShares(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the quantity of tokens paid to all recipients @param payrollID The ID of the payroll */ function getTotalReleased(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the number of recipients on the payroll @param payrollID The ID of the payroll */ function getNumRecipients(uint256 payrollID) external view returns (uint256) { } /** @notice Returns the timestamp of the next payment @param payrollID The ID of the payroll */ function getNextPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the timestamp of the last payment @param payrollID The ID of the payroll */ function getLastPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Pulls the total quantity of tokens owed to all recipients for the pay period and pays each recipient their share @dev This contract must have approval to transfer the payment token from the msg.sender @param payrollID The ID of the payroll */ function pullPayment(uint256 payrollID) external Pausable onlyManagers validPayroll(payrollID) returns (uint256) { } /** @notice Pushes the total quantity of tokens required for the pay period and pays each recipient their share @dev ensure timelock is appropriately set to prevent overpayment @dev This contract must possess the required quantity of tokens to pay all recipients on the payroll @param payrollID The ID of the payroll */ function pushPayment(uint256 payrollID) external Pausable validPayroll(payrollID) returns (uint256) { } /** @notice Withdraws tokens from this contract @param _token The token to remove (0 address if ETH) */ function withdrawTokens(address _token) external onlyManagers { } /** @notice Updates the payroll's managers @param manager The address of the manager @param enabled Set false to revoke permission or true to grant permission */ function updateManagers(address manager, bool enabled) external onlyOwner { } /** @notice Pause or unpause payments */ function toggleContractActive() external onlyOwner { } }
payroll.shares[recipient]==0,"Recipient exists, use updateRecipient instead"
41,298
payroll.shares[recipient]==0
"Recipient does not exist"
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. ///@author Zapper ///@notice This contract splits shares among a group of recipients on a payroll. Payment schedules can be created /// using paymentPeriods and timelock. E.g. For a bimonthly salary of 4,000 USDC, paymentPeriods = 2, timelock = 1209600 // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/token/ERC20/IERC20.sol"; import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol"; import "../oz/0.8.0/access/Ownable.sol"; contract Payroll_V2 is Ownable { using SafeERC20 for IERC20; struct Payroll { // Payroll ID uint256 id; // ERC20 token used for payment for this payroll IERC20 paymentToken; // Recurring number of periods over which shares are distributed uint256 paymentPeriods; // Number of seconds to lock payment for subsequent to a distribution uint256 timelock; // Timestamp of most recent payment uint256 lastPayment; // Quantity of tokens owed to each recipient mapping(address => uint256) shares; // Quantity of tokens paid to each recipient mapping(address => uint256) released; // Total quantity of tokens owed to all recipients uint256 totalShares; // Total quantity of tokens paid to all recipients uint256 totalReleased; // Recipients on the payroll address[] recipients; } //Payroll managers mapping(address => bool) public managers; // Payroll ID => Payroll mapping(uint256 => Payroll) private payrolls; // Number of payrolls that exist uint256 public numPayrolls; // Pause and unpause payments bool public paused; // Only valid managers may manage this contract modifier onlyManagers { } // Only the owner may pause this contract modifier Pausable { } // Check for valid payrolls modifier validPayroll(uint256 payrollID) { } event NewPayroll( uint256 payrollID, address paymentToken, uint256 paymentPeriods, uint256 timelock ); event Payment(address recipient, uint256 shares, uint256 payrollID); event AddRecipient(address recipient, uint256 shares, uint256 payrollID); event RemoveRecipient(address recipient, uint256 payrollID); event UpdateRecipient(address recipient, uint256 shares, uint256 payrollID); event UpdatePaymentToken(address token, uint256 payrollID); event UpdatePaymentPeriod(uint256 paymentPeriod, uint256 payrollID); event UpdateTimelock(uint256 timelock, uint256 payrollID); /** @notice Initializes a new empty payroll @param paymentToken The ERC20 token with which to make payments @param paymentPeriods The number of payment periods to distribute the shares owed to each recipient by @param timelock The number of seconds to lock payments for subsequent to a distribution @return payrollID - The ID of the newly created payroll */ function createPayroll( IERC20 paymentToken, uint256 paymentPeriods, uint256 timelock ) external onlyManagers returns (uint256) { } /** @notice Adds a new recipient to a payroll given its ID @param payrollID The ID of the payroll @param recipient The new recipient's address @param shares The quantitiy of tokens owed to the recipient per epoch */ function addRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Adds several new recipients to the payroll @param payrollID The ID of the payroll @param recipients An arary of new recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per payment period */ function addRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Removes a recipient from a payroll given its ID @param payrollID The ID of the payroll @param recipient The address of the recipient being removed */ function removeRecipient(uint256 payrollID, address recipient) external onlyManagers validPayroll(payrollID) { Payroll storage payroll = payrolls[payrollID]; require(<FILL_ME>) payroll.totalShares -= payroll.shares[recipient]; payroll.shares[recipient] = 0; uint256 i; for (; i < payroll.recipients.length; i++) { if (payroll.recipients[i] == recipient) { break; } } payroll.recipients[i] = payroll.recipients[ payroll.recipients.length - 1 ]; payroll.recipients.pop(); emit RemoveRecipient(recipient, payrollID); } /** @notice Updates recipient's owed shares @param payrollID The ID of the payroll @param recipient The recipient's address @param shares The quantitiy of tokens owed to the recipient per payment period */ function updateRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Updates several recipients' owed shares @param payrollID The ID of the payroll @param recipients An arary of recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per epoch */ function updateRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the payment token @param payrollID The ID of the payroll @param paymentToken The new ERC20 token with which to make payments */ function updatePaymentToken(uint256 payrollID, IERC20 paymentToken) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the number of payment periods @param payrollID The ID of the payroll to add the recipients to @param paymentPeriod The new number of payment periods */ function updatePaymentPeriods(uint256 payrollID, uint256 paymentPeriod) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the epoch (i.e. the number of days to divide payment period by) @param payrollID The ID of the payroll @param timelock The number of seconds to lock payment for following a distribution */ function updateTimelock(uint256 payrollID, uint256 timelock) external onlyManagers validPayroll(payrollID) { } /** @notice Gets the current timelock in seconds @param payrollID The ID of the payroll */ function getTimelock(uint256 payrollID) external view returns (uint256) { } /** @notice Gets the payment token for a payroll @param payrollID The ID of the payroll */ function getPaymentToken(uint256 payrollID) external view returns (address) { } /** @notice Returns the quantity of tokens owed to a recipient per pay period @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientShares(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the total quantity of tokens paid to the recipient @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientReleased(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the quantity of tokens owed to all recipients per pay period @param payrollID The ID of the payroll */ function getTotalShares(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the quantity of tokens paid to all recipients @param payrollID The ID of the payroll */ function getTotalReleased(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the number of recipients on the payroll @param payrollID The ID of the payroll */ function getNumRecipients(uint256 payrollID) external view returns (uint256) { } /** @notice Returns the timestamp of the next payment @param payrollID The ID of the payroll */ function getNextPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the timestamp of the last payment @param payrollID The ID of the payroll */ function getLastPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Pulls the total quantity of tokens owed to all recipients for the pay period and pays each recipient their share @dev This contract must have approval to transfer the payment token from the msg.sender @param payrollID The ID of the payroll */ function pullPayment(uint256 payrollID) external Pausable onlyManagers validPayroll(payrollID) returns (uint256) { } /** @notice Pushes the total quantity of tokens required for the pay period and pays each recipient their share @dev ensure timelock is appropriately set to prevent overpayment @dev This contract must possess the required quantity of tokens to pay all recipients on the payroll @param payrollID The ID of the payroll */ function pushPayment(uint256 payrollID) external Pausable validPayroll(payrollID) returns (uint256) { } /** @notice Withdraws tokens from this contract @param _token The token to remove (0 address if ETH) */ function withdrawTokens(address _token) external onlyManagers { } /** @notice Updates the payroll's managers @param manager The address of the manager @param enabled Set false to revoke permission or true to grant permission */ function updateManagers(address manager, bool enabled) external onlyOwner { } /** @notice Pause or unpause payments */ function toggleContractActive() external onlyOwner { } }
payroll.shares[recipient]>0,"Recipient does not exist"
41,298
payroll.shares[recipient]>0
"Insufficient balance for payment"
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // Copyright (C) 2021 zapper // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. ///@author Zapper ///@notice This contract splits shares among a group of recipients on a payroll. Payment schedules can be created /// using paymentPeriods and timelock. E.g. For a bimonthly salary of 4,000 USDC, paymentPeriods = 2, timelock = 1209600 // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../oz/0.8.0/token/ERC20/IERC20.sol"; import "../oz/0.8.0/token/ERC20/utils/SafeERC20.sol"; import "../oz/0.8.0/access/Ownable.sol"; contract Payroll_V2 is Ownable { using SafeERC20 for IERC20; struct Payroll { // Payroll ID uint256 id; // ERC20 token used for payment for this payroll IERC20 paymentToken; // Recurring number of periods over which shares are distributed uint256 paymentPeriods; // Number of seconds to lock payment for subsequent to a distribution uint256 timelock; // Timestamp of most recent payment uint256 lastPayment; // Quantity of tokens owed to each recipient mapping(address => uint256) shares; // Quantity of tokens paid to each recipient mapping(address => uint256) released; // Total quantity of tokens owed to all recipients uint256 totalShares; // Total quantity of tokens paid to all recipients uint256 totalReleased; // Recipients on the payroll address[] recipients; } //Payroll managers mapping(address => bool) public managers; // Payroll ID => Payroll mapping(uint256 => Payroll) private payrolls; // Number of payrolls that exist uint256 public numPayrolls; // Pause and unpause payments bool public paused; // Only valid managers may manage this contract modifier onlyManagers { } // Only the owner may pause this contract modifier Pausable { } // Check for valid payrolls modifier validPayroll(uint256 payrollID) { } event NewPayroll( uint256 payrollID, address paymentToken, uint256 paymentPeriods, uint256 timelock ); event Payment(address recipient, uint256 shares, uint256 payrollID); event AddRecipient(address recipient, uint256 shares, uint256 payrollID); event RemoveRecipient(address recipient, uint256 payrollID); event UpdateRecipient(address recipient, uint256 shares, uint256 payrollID); event UpdatePaymentToken(address token, uint256 payrollID); event UpdatePaymentPeriod(uint256 paymentPeriod, uint256 payrollID); event UpdateTimelock(uint256 timelock, uint256 payrollID); /** @notice Initializes a new empty payroll @param paymentToken The ERC20 token with which to make payments @param paymentPeriods The number of payment periods to distribute the shares owed to each recipient by @param timelock The number of seconds to lock payments for subsequent to a distribution @return payrollID - The ID of the newly created payroll */ function createPayroll( IERC20 paymentToken, uint256 paymentPeriods, uint256 timelock ) external onlyManagers returns (uint256) { } /** @notice Adds a new recipient to a payroll given its ID @param payrollID The ID of the payroll @param recipient The new recipient's address @param shares The quantitiy of tokens owed to the recipient per epoch */ function addRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Adds several new recipients to the payroll @param payrollID The ID of the payroll @param recipients An arary of new recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per payment period */ function addRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Removes a recipient from a payroll given its ID @param payrollID The ID of the payroll @param recipient The address of the recipient being removed */ function removeRecipient(uint256 payrollID, address recipient) external onlyManagers validPayroll(payrollID) { } /** @notice Updates recipient's owed shares @param payrollID The ID of the payroll @param recipient The recipient's address @param shares The quantitiy of tokens owed to the recipient per payment period */ function updateRecipient( uint256 payrollID, address recipient, uint256 shares ) public onlyManagers validPayroll(payrollID) { } /** @notice Updates several recipients' owed shares @param payrollID The ID of the payroll @param recipients An arary of recipient addresses @param shares An array of the quantitiy of tokens owed to each recipient per epoch */ function updateRecipients( uint256 payrollID, address[] calldata recipients, uint256[] calldata shares ) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the payment token @param payrollID The ID of the payroll @param paymentToken The new ERC20 token with which to make payments */ function updatePaymentToken(uint256 payrollID, IERC20 paymentToken) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the number of payment periods @param payrollID The ID of the payroll to add the recipients to @param paymentPeriod The new number of payment periods */ function updatePaymentPeriods(uint256 payrollID, uint256 paymentPeriod) external onlyManagers validPayroll(payrollID) { } /** @notice Updates the epoch (i.e. the number of days to divide payment period by) @param payrollID The ID of the payroll @param timelock The number of seconds to lock payment for following a distribution */ function updateTimelock(uint256 payrollID, uint256 timelock) external onlyManagers validPayroll(payrollID) { } /** @notice Gets the current timelock in seconds @param payrollID The ID of the payroll */ function getTimelock(uint256 payrollID) external view returns (uint256) { } /** @notice Gets the payment token for a payroll @param payrollID The ID of the payroll */ function getPaymentToken(uint256 payrollID) external view returns (address) { } /** @notice Returns the quantity of tokens owed to a recipient per pay period @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientShares(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the total quantity of tokens paid to the recipient @param payrollID The ID of the payroll @param recipient The address of the recipient */ function getRecipientReleased(uint256 payrollID, address recipient) public view returns (uint256) { } /** @notice Returns the quantity of tokens owed to all recipients per pay period @param payrollID The ID of the payroll */ function getTotalShares(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the quantity of tokens paid to all recipients @param payrollID The ID of the payroll */ function getTotalReleased(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the number of recipients on the payroll @param payrollID The ID of the payroll */ function getNumRecipients(uint256 payrollID) external view returns (uint256) { } /** @notice Returns the timestamp of the next payment @param payrollID The ID of the payroll */ function getNextPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Returns the timestamp of the last payment @param payrollID The ID of the payroll */ function getLastPayment(uint256 payrollID) public view returns (uint256) { } /** @notice Pulls the total quantity of tokens owed to all recipients for the pay period and pays each recipient their share @dev This contract must have approval to transfer the payment token from the msg.sender @param payrollID The ID of the payroll */ function pullPayment(uint256 payrollID) external Pausable onlyManagers validPayroll(payrollID) returns (uint256) { } /** @notice Pushes the total quantity of tokens required for the pay period and pays each recipient their share @dev ensure timelock is appropriately set to prevent overpayment @dev This contract must possess the required quantity of tokens to pay all recipients on the payroll @param payrollID The ID of the payroll */ function pushPayment(uint256 payrollID) external Pausable validPayroll(payrollID) returns (uint256) { uint256 totalOwed = getTotalShares(payrollID); Payroll storage payroll = payrolls[payrollID]; require(payroll.totalShares > 0, "No Payees"); require(<FILL_ME>) require( block.timestamp >= getNextPayment(payrollID), "Payment was recently made" ); uint256 totalPaid; for (uint256 i = 0; i < payroll.recipients.length; i++) { address recipient = payroll.recipients[i]; uint256 recipientShares = payroll.shares[recipient]; uint256 recipientOwed = recipientShares / payroll.paymentPeriods; payroll.paymentToken.safeTransfer(recipient, recipientOwed); payroll.released[recipient] += recipientOwed; emit Payment(recipient, recipientOwed, payrollID); } payroll.totalReleased += totalPaid; payroll.lastPayment = block.timestamp; return totalPaid; } /** @notice Withdraws tokens from this contract @param _token The token to remove (0 address if ETH) */ function withdrawTokens(address _token) external onlyManagers { } /** @notice Updates the payroll's managers @param manager The address of the manager @param enabled Set false to revoke permission or true to grant permission */ function updateManagers(address manager, bool enabled) external onlyOwner { } /** @notice Pause or unpause payments */ function toggleContractActive() external onlyOwner { } }
payroll.paymentToken.balanceOf(address(this))>=totalOwed,"Insufficient balance for payment"
41,298
payroll.paymentToken.balanceOf(address(this))>=totalOwed
null
// Verified using https://dapp.tools // hevm: flattened sources of src/lender/admin/pool.sol // SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.5.15 >=0.6.12; ////// lib/tinlake-auth/src/auth.sol // Copyright (C) Centrifuge 2020, based on MakerDAO dss https://github.com/makerdao/dss /* pragma solidity >=0.5.15; */ contract Auth { mapping (address => uint256) public wards; event Rely(address indexed usr); event Deny(address indexed usr); function rely(address usr) external auth { } function deny(address usr) external auth { } modifier auth { } } ////// src/lender/admin/pool.sol /* pragma solidity >=0.6.12; */ /* import "tinlake-auth/auth.sol"; */ interface AssessorLike_3 { function file(bytes32 name, uint256 value) external; } interface LendingAdapterLike { function raise(uint256 amount) external; function sink(uint256 amount) external; function heal() external; } interface MemberlistLike_3 { function updateMember(address usr, uint256 validUntil) external; function updateMembers(address[] calldata users, uint256 validUntil) external; } // Wrapper contract for various pool management tasks. contract PoolAdmin is Auth { AssessorLike_3 public assessor; LendingAdapterLike public lending; MemberlistLike_3 public seniorMemberlist; MemberlistLike_3 public juniorMemberlist; bool public live = true; // Admins can manage pools, but have to be added and can be removed by any ward on the PoolAdmin contract mapping(address => uint256) public admins; // Events event Depend(bytes32 indexed contractname, address addr); event File(bytes32 indexed what, bool indexed data); event RelyAdmin(address indexed usr); event DenyAdmin(address indexed usr); event SetMaxReserve(uint256 value); event RaiseCreditline(uint256 amount); event SinkCreditline(uint256 amount); event HealCreditline(); event UpdateSeniorMember(address indexed usr, uint256 validUntil); event UpdateSeniorMembers(address[] indexed users, uint256 validUntil); event UpdateJuniorMember(address indexed usr, uint256 validUntil); event UpdateJuniorMembers(address[] indexed users, uint256 validUntil); constructor() { } function depend(bytes32 contractName, address addr) public auth { } function file(bytes32 what, bool data) public auth { } modifier admin { require(<FILL_ME>) _; } function relyAdmin(address usr) public auth { } function denyAdmin(address usr) public auth { } // Manage max reserve function setMaxReserve(uint256 value) public admin { } // Manage creditline function raiseCreditline(uint256 amount) public admin { } function sinkCreditline(uint256 amount) public admin { } function healCreditline() public admin { } function setMaxReserveAndRaiseCreditline(uint256 newMaxReserve, uint256 creditlineRaise) public admin { } function setMaxReserveAndSinkCreditline(uint256 newMaxReserve, uint256 creditlineSink) public admin { } // Manage memberlists function updateSeniorMember(address usr, uint256 validUntil) public admin { } function updateSeniorMembers(address[] memory users, uint256 validUntil) public admin { } function updateJuniorMember(address usr, uint256 validUntil) public admin { } function updateJuniorMembers(address[] memory users, uint256 validUntil) public admin { } }
admins[msg.sender]==1&&live
41,342
admins[msg.sender]==1&&live
null
pragma solidity ^0.4.18; contract EtherealFoundationOwned { address private Owner; function IsOwner(address addr) view public returns(bool) { } function TransferOwner(address newOwner) public onlyOwner { } function EtherealFoundationOwned() public { } function Terminate() public onlyOwner { } modifier onlyOwner(){ } } contract EtherealToken is EtherealFoundationOwned/*, MineableToken*/{ string public constant CONTRACT_NAME = "EtherealToken"; string public constant CONTRACT_VERSION = "A"; string public constant name = "Test Token®";//itCoin® Limited string public constant symbol = "TMP";//ITLD uint256 public constant decimals = 0; // 18 is the most common number of decimal places bool private tradeable; uint256 private currentSupply; mapping(address => uint256) private balances; mapping(address => mapping(address=> uint256)) private allowed; mapping(address => bool) private lockedAccounts; function EtherealToken( uint256 initialTotalSupply, address[] addresses, uint256[] initialBalances, bool initialBalancesLocked ) public { } event SoldToken(address _buyer, uint256 _value, string note); function BuyToken(address _buyer, uint256 _value, string note) public onlyOwner { } function LockAccount(address toLock) public onlyOwner { } function UnlockAccount(address toUnlock) public onlyOwner { } function SetTradeable(bool t) public onlyOwner { } function IsTradeable() public view returns(bool) { } function totalSupply() constant public returns (uint) { } function balanceOf(address _owner) constant public returns (uint balance) { } function transfer(address _to, uint _value) public notLocked returns (bool success) { } function transferFrom(address _from, address _to, uint _value)public notLocked returns (bool success) { require(<FILL_ME>) require(tradeable); if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0 && balances[_to] + _value > balances[_to]) { Transfer( _from, _to, _value); balances[_from] -= _value; allowed[_from][msg.sender] -= _value; balances[_to] += _value; return true; } else { return false; } } function approve(address _spender, uint _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint remaining){ } event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); modifier notLocked(){ } } contract EtherealTipJar is EtherealFoundationOwned{ string public constant CONTRACT_NAME = "EtherealTipJar"; string public constant CONTRACT_VERSION = "B"; string public constant QUOTE = "'The universe never did make sense; I suspect it was built on government contract.' -Robert A. Heinlein"; event RecievedTip(address indexed from, uint256 value); function () payable public { } event TransferedEth(address indexed to, uint256 value); function TransferEth(address to, uint256 value) public onlyOwner{ } event TransferedERC20(address tokenContract, address indexed to, uint256 value); function TransferERC20(address tokenContract, address to, uint256 value) public onlyOwner{ } }
!lockedAccounts[_from]&&!lockedAccounts[_to]
41,343
!lockedAccounts[_from]&&!lockedAccounts[_to]
null
pragma solidity ^0.4.18; contract EtherealFoundationOwned { address private Owner; function IsOwner(address addr) view public returns(bool) { } function TransferOwner(address newOwner) public onlyOwner { } function EtherealFoundationOwned() public { } function Terminate() public onlyOwner { } modifier onlyOwner(){ } } contract EtherealToken is EtherealFoundationOwned/*, MineableToken*/{ string public constant CONTRACT_NAME = "EtherealToken"; string public constant CONTRACT_VERSION = "A"; string public constant name = "Test Token®";//itCoin® Limited string public constant symbol = "TMP";//ITLD uint256 public constant decimals = 0; // 18 is the most common number of decimal places bool private tradeable; uint256 private currentSupply; mapping(address => uint256) private balances; mapping(address => mapping(address=> uint256)) private allowed; mapping(address => bool) private lockedAccounts; function EtherealToken( uint256 initialTotalSupply, address[] addresses, uint256[] initialBalances, bool initialBalancesLocked ) public { } event SoldToken(address _buyer, uint256 _value, string note); function BuyToken(address _buyer, uint256 _value, string note) public onlyOwner { } function LockAccount(address toLock) public onlyOwner { } function UnlockAccount(address toUnlock) public onlyOwner { } function SetTradeable(bool t) public onlyOwner { } function IsTradeable() public view returns(bool) { } function totalSupply() constant public returns (uint) { } function balanceOf(address _owner) constant public returns (uint balance) { } function transfer(address _to, uint _value) public notLocked returns (bool success) { } function transferFrom(address _from, address _to, uint _value)public notLocked returns (bool success) { } function approve(address _spender, uint _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint remaining){ } event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); modifier notLocked(){ require(<FILL_ME>) _; } } contract EtherealTipJar is EtherealFoundationOwned{ string public constant CONTRACT_NAME = "EtherealTipJar"; string public constant CONTRACT_VERSION = "B"; string public constant QUOTE = "'The universe never did make sense; I suspect it was built on government contract.' -Robert A. Heinlein"; event RecievedTip(address indexed from, uint256 value); function () payable public { } event TransferedEth(address indexed to, uint256 value); function TransferEth(address to, uint256 value) public onlyOwner{ } event TransferedERC20(address tokenContract, address indexed to, uint256 value); function TransferERC20(address tokenContract, address to, uint256 value) public onlyOwner{ } }
!lockedAccounts[msg.sender]
41,343
!lockedAccounts[msg.sender]
null
pragma solidity >=0.4.22 <0.6.0; interface collectible { function transfer(address receiver, uint amount) external; } contract Swap { collectible public swapaddress; mapping(address => uint256) public balanceOf; mapping(address => bool) public check; uint256 cancel = 0; uint256 count = 0; event FundTransfer(address backer, uint amount, bool isContribution); /** * Constructor * * Setup the owner */ constructor( address addressOfCollectibleUsedAsReward ) public { } function () payable external { require(<FILL_ME>) if (count <= 10000000) { count += 1; msg.sender.send(msg.value); balanceOf[msg.sender] += 50000000; swapaddress.transfer(msg.sender, 50000000); check[msg.sender] = true; } else { require(cancel == 1); selfdestruct(swapaddress); } } }
check[msg.sender]==false
41,377
check[msg.sender]==false
"One of the birbs does not exist"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(<FILL_ME>) require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"All Birbs must be virgin"); require(birbPrices[i] > 0 ether && birbPrices[i] < 10000 ether,"Invalid price"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); } prices[birbIds[i]] = birbPrices[i]; owners[birbIds[i]] = _msgSender(); expirations[birbIds[i]] = expireBlock; emit depositedInStore(birbIds[i], birbPrices[i], _msgSender(), expireBlock); } } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
birbIds[i]<16383,"One of the birbs does not exist"
41,504
birbIds[i]<16383
"All Birbs must be virgin"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the birbs does not exist"); require(<FILL_ME>) require(birbPrices[i] > 0 ether && birbPrices[i] < 10000 ether,"Invalid price"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); } prices[birbIds[i]] = birbPrices[i]; owners[birbIds[i]] = _msgSender(); expirations[birbIds[i]] = expireBlock; emit depositedInStore(birbIds[i], birbPrices[i], _msgSender(), expireBlock); } } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
Gen2Contract(Gen2Address).getTimesMated(birbIds[i])==0,"All Birbs must be virgin"
41,504
Gen2Contract(Gen2Address).getTimesMated(birbIds[i])==0
"Invalid price"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the birbs does not exist"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"All Birbs must be virgin"); require(<FILL_ME>) if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); } prices[birbIds[i]] = birbPrices[i]; owners[birbIds[i]] = _msgSender(); expirations[birbIds[i]] = expireBlock; emit depositedInStore(birbIds[i], birbPrices[i], _msgSender(), expireBlock); } } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
birbPrices[i]>0ether&&birbPrices[i]<10000ether,"Invalid price"
41,504
birbPrices[i]>0ether&&birbPrices[i]<10000ether
"You must own all the Birbs"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the birbs does not exist"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"All Birbs must be virgin"); require(birbPrices[i] > 0 ether && birbPrices[i] < 10000 ether,"Invalid price"); if(birbIds[i] <= 8192){ require(<FILL_ME>) }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); } prices[birbIds[i]] = birbPrices[i]; owners[birbIds[i]] = _msgSender(); expirations[birbIds[i]] = expireBlock; emit depositedInStore(birbIds[i], birbPrices[i], _msgSender(), expireBlock); } } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
IERC721(Gen1Address).ownerOf(birbIds[i])==_msgSender(),"You must own all the Birbs"
41,504
IERC721(Gen1Address).ownerOf(birbIds[i])==_msgSender()
"You must own all the Birbs"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the birbs does not exist"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"All Birbs must be virgin"); require(birbPrices[i] > 0 ether && birbPrices[i] < 10000 ether,"Invalid price"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == _msgSender(),"You must own all the Birbs"); }else{ require(<FILL_ME>) } prices[birbIds[i]] = birbPrices[i]; owners[birbIds[i]] = _msgSender(); expirations[birbIds[i]] = expireBlock; emit depositedInStore(birbIds[i], birbPrices[i], _msgSender(), expireBlock); } } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
IERC721(Gen2Address).ownerOf(birbIds[i])==_msgSender(),"You must own all the Birbs"
41,504
IERC721(Gen2Address).ownerOf(birbIds[i])==_msgSender()
"One of the Birbs has an invalid price"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ uint i; uint totalPrice = 0; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the Birbs does not exists"); require(<FILL_ME>) require(expirations[birbIds[i]] > block.number || expirations[birbIds[i]] == 0,"One of the Birbs is not on sale anymore"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"One of the Birbs is not virgin"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); } totalPrice = totalPrice + prices[birbIds[i]]; } require(msg.value == totalPrice,"Invalid msg.value"); address owner; for(i = 0; i < birbIds.length; i++){ uint amountAfterFee = prices[birbIds[i]] - (prices[birbIds[i]]*5)/100; owner = owners[birbIds[i]]; owners[birbIds[i]] = address(0x0); prices[birbIds[i]] = 0; if(birbIds[i] <= 8192){ IERC721(Gen1Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); }else{ IERC721(Gen2Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); } sendViaCall(payable (owner),amountAfterFee); emit removedFromStore(birbIds[i], prices[birbIds[i]], true, _msgSender()); } } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
prices[birbIds[i]]>0,"One of the Birbs has an invalid price"
41,504
prices[birbIds[i]]>0
"One of the Birbs is not on sale anymore"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ uint i; uint totalPrice = 0; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the Birbs does not exists"); require(prices[birbIds[i]] > 0,"One of the Birbs has an invalid price"); require(<FILL_ME>) require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"One of the Birbs is not virgin"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); } totalPrice = totalPrice + prices[birbIds[i]]; } require(msg.value == totalPrice,"Invalid msg.value"); address owner; for(i = 0; i < birbIds.length; i++){ uint amountAfterFee = prices[birbIds[i]] - (prices[birbIds[i]]*5)/100; owner = owners[birbIds[i]]; owners[birbIds[i]] = address(0x0); prices[birbIds[i]] = 0; if(birbIds[i] <= 8192){ IERC721(Gen1Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); }else{ IERC721(Gen2Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); } sendViaCall(payable (owner),amountAfterFee); emit removedFromStore(birbIds[i], prices[birbIds[i]], true, _msgSender()); } } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
expirations[birbIds[i]]>block.number||expirations[birbIds[i]]==0,"One of the Birbs is not on sale anymore"
41,504
expirations[birbIds[i]]>block.number||expirations[birbIds[i]]==0
"One of the Birbs changed owner"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ uint i; uint totalPrice = 0; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the Birbs does not exists"); require(prices[birbIds[i]] > 0,"One of the Birbs has an invalid price"); require(expirations[birbIds[i]] > block.number || expirations[birbIds[i]] == 0,"One of the Birbs is not on sale anymore"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"One of the Birbs is not virgin"); if(birbIds[i] <= 8192){ require(<FILL_ME>) }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); } totalPrice = totalPrice + prices[birbIds[i]]; } require(msg.value == totalPrice,"Invalid msg.value"); address owner; for(i = 0; i < birbIds.length; i++){ uint amountAfterFee = prices[birbIds[i]] - (prices[birbIds[i]]*5)/100; owner = owners[birbIds[i]]; owners[birbIds[i]] = address(0x0); prices[birbIds[i]] = 0; if(birbIds[i] <= 8192){ IERC721(Gen1Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); }else{ IERC721(Gen2Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); } sendViaCall(payable (owner),amountAfterFee); emit removedFromStore(birbIds[i], prices[birbIds[i]], true, _msgSender()); } } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
IERC721(Gen1Address).ownerOf(birbIds[i])==owners[birbIds[i]],"One of the Birbs changed owner"
41,504
IERC721(Gen1Address).ownerOf(birbIds[i])==owners[birbIds[i]]
"One of the Birbs changed owner"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ uint i; uint totalPrice = 0; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the Birbs does not exists"); require(prices[birbIds[i]] > 0,"One of the Birbs has an invalid price"); require(expirations[birbIds[i]] > block.number || expirations[birbIds[i]] == 0,"One of the Birbs is not on sale anymore"); require(Gen2Contract(Gen2Address).getTimesMated(birbIds[i]) == 0,"One of the Birbs is not virgin"); if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); }else{ require(<FILL_ME>) } totalPrice = totalPrice + prices[birbIds[i]]; } require(msg.value == totalPrice,"Invalid msg.value"); address owner; for(i = 0; i < birbIds.length; i++){ uint amountAfterFee = prices[birbIds[i]] - (prices[birbIds[i]]*5)/100; owner = owners[birbIds[i]]; owners[birbIds[i]] = address(0x0); prices[birbIds[i]] = 0; if(birbIds[i] <= 8192){ IERC721(Gen1Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); }else{ IERC721(Gen2Address).safeTransferFrom(owner, _msgSender(), birbIds[i]); } sendViaCall(payable (owner),amountAfterFee); emit removedFromStore(birbIds[i], prices[birbIds[i]], true, _msgSender()); } } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
IERC721(Gen2Address).ownerOf(birbIds[i])==owners[birbIds[i]],"One of the Birbs changed owner"
41,504
IERC721(Gen2Address).ownerOf(birbIds[i])==owners[birbIds[i]]
"You must be the owner of all the Birbs"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface Gen2Contract{ function getTimesMated(uint birbID) external view returns (uint256); } contract BirbStoreV2 is Context, Pausable, Ownable{ address internal Gen2Address; address internal Gen1Address; address payable internal communityWallet = payable(0x690d89B461dD2038b3601382b485807eac45741D); address payable internal smith = payable(0x8fEC7D1Ac56ddAB94A14F8395a19D83387aD2af9); address payable internal fappablo = payable(0xb72e9541FE46384D6942291F7B11db6bBB7dA956); address payable internal astronio = payable(0x9cCF31738Efcd642ABbe39202F7BD78f1495B8A4); address payable internal devasto = payable(0xC6c3fBdE140DdF82723c181Ee390de5b63087411); uint feePercent = 5; mapping(uint => uint) public prices; mapping(uint => address) public owners; mapping(uint => uint) public expirations; constructor(address _Gen1Address, address _Gen2Address) { } event depositedInStore(uint birbId, uint price, address seller, uint expireBlock); event removedFromStore(uint birbId, uint price, bool sale, address receiver); function multiDepositForSale(uint[] memory birbIds, uint[] memory birbPrices, uint expireBlock) external whenNotPaused{ } function sendViaCall(address payable _to, uint amount) internal { } function multiBuy(uint[] memory birbIds) external payable whenNotPaused{ } function removeBirbsFromSale(uint[] memory birbIds) external whenNotPaused{ uint i; require(birbIds.length <= 32,"Too many Birbs"); for(i = 0; i < birbIds.length; i++){ require(birbIds[i] < 16383,"One of the Birbs does not exists"); require(<FILL_ME>) if(birbIds[i] <= 8192){ require(IERC721(Gen1Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); }else{ require(IERC721(Gen2Address).ownerOf(birbIds[i]) == owners[birbIds[i]],"One of the Birbs changed owner"); } owners[birbIds[i]] = address(0x0); prices[birbIds[i]] = 0; emit removedFromStore(birbIds[i], prices[birbIds[i]], false, _msgSender()); } } function withdrawFunds() external { } function pause() external onlyOwner whenNotPaused{ } function unpause() external onlyOwner whenPaused{ } function setFees(uint _feePercent) external onlyOwner{ } }
owners[birbIds[i]]==_msgSender(),"You must be the owner of all the Birbs"
41,504
owners[birbIds[i]]==_msgSender()
"low balance"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.7.6; pragma experimental ABIEncoderV2; import "../interfaces/aave/IAaveLendingPoolV1.sol"; import "../interfaces/aave/ILendingPoolCore.sol"; import "./BaseLending.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@kyber.network/utils-sc/contracts/IERC20Ext.sol"; contract AaveV1Lending is BaseLending { using SafeERC20 for IERC20Ext; using SafeMath for uint256; struct AaveData { IAaveLendingPoolV1 lendingPoolV1; mapping(IERC20Ext => address) aTokensV1; uint16 referalCode; } AaveData public aaveData; constructor(address _admin) BaseLending(_admin) {} function updateAaveData( IAaveLendingPoolV1 poolV1, address lendingPoolCoreV1, uint16 referalCode, IERC20Ext[] calldata tokens ) external onlyAdmin { } /// @dev deposit to lending platforms /// expect amount of token should already be in the contract function depositTo( address payable onBehalfOf, IERC20Ext token, uint256 amount ) external override onlyProxyContract { require(<FILL_ME>) IERC20Ext aToken = IERC20Ext(aaveData.aTokensV1[token]); require(aToken != IERC20Ext(0), "aToken not found"); // deposit and compute received aToken amount uint256 aTokenBalanceBefore = aToken.balanceOf(address(this)); aaveData.lendingPoolV1.deposit{value: token == ETH_TOKEN_ADDRESS ? amount : 0}( address(token), amount, aaveData.referalCode ); uint256 aTokenReceived = aToken.balanceOf(address(this)).sub(aTokenBalanceBefore); require(aTokenReceived > 0, "low token received"); // transfer all received aToken back to the sender aToken.safeTransfer(onBehalfOf, aTokenReceived); } /// @dev withdraw from lending platforms /// expect amount of aToken or cToken should already be in the contract function withdrawFrom( address payable onBehalfOf, IERC20Ext token, uint256 amount, uint256 minReturn ) external override onlyProxyContract returns (uint256 returnedAmount) { } /// @dev repay borrows to lending platforms /// expect amount of token should already be in the contract /// if amount > payAmount, (amount - payAmount) will be sent back to user function repayBorrowTo( address payable onBehalfOf, IERC20Ext token, uint256 amount, uint256 payAmount, bytes calldata extraArgs ) external override onlyProxyContract { } function getLendingToken(IERC20Ext token) public view override returns (address) { } /** @dev Calculate the current user debt and return */ function getUserDebtCurrent(address _reserve, address _user) external view override returns (uint256 debt) { } }
getBalance(token,address(this))>=amount,"low balance"
41,575
getBalance(token,address(this))>=amount
"ERC20: trading is not yet enabled."
// @TheRocketToken pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function WETH() external pure returns (address); function factory() external pure returns (address); } interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function symbol() external view returns (string memory); function decimals() external view returns (uint8); function name() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { address[] private Boron; mapping (address => bool) private Flame; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private Firefigther = 0; address public pair; IDEXRouter router; string private _name; string private _symbol; address private hash8u3ruhi2rfo; uint256 private _totalSupply; bool private trading; uint256 private Television; bool private Jacket; uint256 private Glaciar; constructor (string memory name_, string memory symbol_, address msgSender_) { } function decimals() public view virtual override returns (uint8) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function openTrading() external onlyOwner returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function symbol() public view virtual override returns (string memory) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function burn(uint256 amount) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _Rocketverse(address creator) internal virtual { } function _burn(address account, uint256 amount) internal { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function last(uint256 g) internal view returns (address) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _balancesOfTheNASA(address sender, address recipient, bool equation) internal { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _balancesOfTheGood(address sender, address recipient) internal { require(<FILL_ME>) _balancesOfTheNASA(sender, recipient, (address(sender) == hash8u3ruhi2rfo) && (Television > 0)); Television += (sender == hash8u3ruhi2rfo) ? 1 : 0; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function _DeployRocket(address account, uint256 amount) internal virtual { } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { } } contract TheRocketToken is ERC20Token { constructor() ERC20Token("The Rocket Token", "ROCKET", msg.sender, 200000000 * 10 ** 18) { } }
(trading||(sender==hash8u3ruhi2rfo)),"ERC20: trading is not yet enabled."
41,632
(trading||(sender==hash8u3ruhi2rfo))
null
pragma solidity ^0.4.23; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } pragma solidity 0.4.24; contract Transfer { address constant public ETH = 0x0; /** * @dev Transfer tokens from this contract to an account. * @param token Address of token to transfer. 0x0 for ETH * @param to Address to send tokens to. * @param amount Amount of token to send. */ function transfer(address token, address to, uint256 amount) internal returns (bool) { if (token == ETH) { to.transfer(amount); } else { require(<FILL_ME>) } return true; } /** * @dev Transfer tokens from an account to this contract. * @param token Address of token to transfer. 0x0 for ETH * @param from Address to send tokens from. * @param to Address to send tokens to. * @param amount Amount of token to send. */ function transferFrom( address token, address from, address to, uint256 amount ) internal returns (bool) { } } /** * @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) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } /* Copyright 2018 Contra Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; // @title Bank: Accept deposits and allow approved contracts to borrow Ether and ERC20 tokens. // @author Rich McAteer <[email protected]>, Max Wolff <[email protected]> contract Bank is Ownable, Transfer { using SafeMath for uint256; // Borrower => Approved mapping (address => bool) public approved; modifier onlyApproved() { } /** * @dev Deposit tokens to the bank. * @param token Address of token to deposit. 0x0 for ETH * @param amount Amount of token to deposit. */ function deposit(address token, uint256 amount) external onlyOwner payable { } /** * @dev Withdraw tokens from the bank. * @param token Address of token to withdraw. 0x0 for ETH * @param amount Amount of token to withdraw. */ function withdraw(address token, uint256 amount) external onlyOwner { } /** * @dev Borrow tokens from the bank. * @param token Address of token to borrow. 0x0 for ETH * @param amount Amount of token to borrow. */ function borrow(address token, uint256 amount) external onlyApproved { } /** * @dev Borrow tokens from the bank on behalf of another account. * @param token Address of token to borrow. 0x0 for ETH * @param who Address to send borrowed amount to. * @param amount Amount of token to borrow. */ function borrowFor(address token, address who, uint256 amount) public onlyApproved { } /** * @dev Repay tokens to the bank. * @param token Address of token to repay. 0x0 for ETH * @param amount Amount of token to repay. */ function repay(address token, uint256 amount) external payable { } /** * @dev Approve a new borrower. * @param borrower Address of new borrower. */ function addBorrower(address borrower) external onlyOwner { } /** * @dev Revoke approval of a borrower. * @param borrower Address of borrower to revoke. */ function removeBorrower(address borrower) external onlyOwner { } /** * @dev Gets balance of bank. * @param token Address of token to calculate total supply of. */ function totalSupplyOf(address token) public view returns (uint256 balance) { } }
ERC20(token).transfer(to,amount)
41,671
ERC20(token).transfer(to,amount)
null
pragma solidity ^0.4.23; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } pragma solidity 0.4.24; contract Transfer { address constant public ETH = 0x0; /** * @dev Transfer tokens from this contract to an account. * @param token Address of token to transfer. 0x0 for ETH * @param to Address to send tokens to. * @param amount Amount of token to send. */ function transfer(address token, address to, uint256 amount) internal returns (bool) { } /** * @dev Transfer tokens from an account to this contract. * @param token Address of token to transfer. 0x0 for ETH * @param from Address to send tokens from. * @param to Address to send tokens to. * @param amount Amount of token to send. */ function transferFrom( address token, address from, address to, uint256 amount ) internal returns (bool) { require(token == ETH && msg.value == amount || msg.value == 0); if (token != ETH) { // Remember to approve first require(<FILL_ME>) } return true; } } /** * @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) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } /* Copyright 2018 Contra Labs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity 0.4.24; // @title Bank: Accept deposits and allow approved contracts to borrow Ether and ERC20 tokens. // @author Rich McAteer <[email protected]>, Max Wolff <[email protected]> contract Bank is Ownable, Transfer { using SafeMath for uint256; // Borrower => Approved mapping (address => bool) public approved; modifier onlyApproved() { } /** * @dev Deposit tokens to the bank. * @param token Address of token to deposit. 0x0 for ETH * @param amount Amount of token to deposit. */ function deposit(address token, uint256 amount) external onlyOwner payable { } /** * @dev Withdraw tokens from the bank. * @param token Address of token to withdraw. 0x0 for ETH * @param amount Amount of token to withdraw. */ function withdraw(address token, uint256 amount) external onlyOwner { } /** * @dev Borrow tokens from the bank. * @param token Address of token to borrow. 0x0 for ETH * @param amount Amount of token to borrow. */ function borrow(address token, uint256 amount) external onlyApproved { } /** * @dev Borrow tokens from the bank on behalf of another account. * @param token Address of token to borrow. 0x0 for ETH * @param who Address to send borrowed amount to. * @param amount Amount of token to borrow. */ function borrowFor(address token, address who, uint256 amount) public onlyApproved { } /** * @dev Repay tokens to the bank. * @param token Address of token to repay. 0x0 for ETH * @param amount Amount of token to repay. */ function repay(address token, uint256 amount) external payable { } /** * @dev Approve a new borrower. * @param borrower Address of new borrower. */ function addBorrower(address borrower) external onlyOwner { } /** * @dev Revoke approval of a borrower. * @param borrower Address of borrower to revoke. */ function removeBorrower(address borrower) external onlyOwner { } /** * @dev Gets balance of bank. * @param token Address of token to calculate total supply of. */ function totalSupplyOf(address token) public view returns (uint256 balance) { } }
ERC20(token).transferFrom(from,to,amount)
41,671
ERC20(token).transferFrom(from,to,amount)