comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
pragma solidity ^0.6.7; contract Versus { function rewardPrediction(address user, uint256 amount) public {} } contract Prediction { address public owner; address public versusContract; address public versusRewards; address public nyanRewards; address public devFund; address[] public markets; struct marketData { string marketName; uint256 startBlock; uint256 expirationBlock; int currentRound; int targetPrice; uint256 ETHLong; uint256 ETHShort; int[] priceHistory; uint256[] longHistory; uint256[] shortHistory; } mapping(address => marketData) public eachMarketData; struct marketPrediction { address pair; int price; int round; uint256 ETHUsed; bool isLonging; uint256 expirationBlock; } mapping(address => marketPrediction) public userPrediction; using SafeMath for uint256; using SafeMath for uint112; using SafeMath for int256; constructor(address _devFund, address _nyanRewards, address _versusRewards) public { } function setOwner(address _owner) public { } function setVersus(address _versus) public { } function setRewards(address _devFund, address _nyanRewards, address _versusRewards) public { } function createMarket(address pair, string memory marketName) public { } function getLatestPrice(address pair) public view returns (int) { } function predict(address pair, bool isLonging) public payable { } function handleFees(uint256 ETHAmount) internal { } function expire(address pair) public { } function closePrediction() public { require(<FILL_ME>) bool longWins; //check if current block has passed the prediction expiration require(block.number > userPrediction[msg.sender].expirationBlock, "Prediction has not expired."); //check if the price is higher than the price history for the round address pair = userPrediction[msg.sender].pair; if (eachMarketData[pair].priceHistory[uint(userPrediction[msg.sender].round-1)] > userPrediction[msg.sender].price) { longWins = true; } //if isLonged is equal to isLonging, send the user their ETH + ETH from opponents based on pool percentages uint256 poolPerc; uint256 ETHWon; if (longWins) { if (userPrediction[msg.sender].isLonging) { poolPerc = userPrediction[msg.sender].ETHUsed .mul(100) .div(eachMarketData[pair].longHistory[uint(userPrediction[msg.sender].round-1)]); ETHWon = poolPerc .mul(eachMarketData[pair].shortHistory[uint(userPrediction[msg.sender].round-1)]) .div(100); ETHWon = ETHWon.add(userPrediction[msg.sender].ETHUsed); //send ETHWon to user msg.sender.call{value: ETHWon}(""); } } else { if (!userPrediction[msg.sender].isLonging) { poolPerc = userPrediction[msg.sender].ETHUsed .mul(100) .div(eachMarketData[pair].shortHistory[uint(userPrediction[msg.sender].round-1)]); ETHWon = poolPerc .mul(eachMarketData[pair].longHistory[uint(userPrediction[msg.sender].round-1)]) .div(100); ETHWon = ETHWon.add(userPrediction[msg.sender].ETHUsed); //send ETHWon to user msg.sender.call{value: ETHWon}(""); } } //mint user Versus(call Versus token) Versus(versusContract).rewardPrediction(msg.sender, userPrediction[msg.sender].ETHUsed.div(10)); if (eachMarketData[userPrediction[msg.sender].pair].expirationBlock < block.number) { expire(userPrediction[msg.sender].pair); } //reset all fields for the user userPrediction[msg.sender].pair = address(0); userPrediction[msg.sender].price = 0; userPrediction[msg.sender].round = 0; userPrediction[msg.sender].ETHUsed = 0; userPrediction[msg.sender].isLonging = false; userPrediction[msg.sender].expirationBlock = 0; } function getMarkets() public view returns(address[] memory) { } function getMarketDetails(address market) public view returns(uint256, uint256, int, int, uint256, uint256, string memory) { } receive() external payable { } }
userPrediction[msg.sender].pair!=address(0)
341,982
userPrediction[msg.sender].pair!=address(0)
null
pragma solidity ^0.4.24; contract LiquidPledging { /// Create a "giver" pledge admin for the sender & donate /// @param idReceiver The Admin receiving the donation; can be any Admin: /// the Giver themselves, another Giver, a Delegate or a Project /// @param token The address of the token being donated. /// @param amount The amount of tokens being donated function addGiverAndDonate(uint64 idReceiver, address donarAddress, address token, uint amount) public {} } contract SwapProxy is Pausable, SafeToken { address public ETH; address public vault; uint public maxSlippage; KyberNetworkProxy public kyberProxy; LiquidPledging public liquidPledging; /** * @param _liquidPledging LiquidPledging contract address * @param _kyberProxy Kyber Network Proxy address * @param _ETH Kyber ETH address * @param _vault address that receives swap fees * @param _maxSlippage most slippage as a percentage */ function SwapProxy(address _liquidPledging, address _kyberProxy, address _ETH, address _vault, uint _maxSlippage) public { } event SlippageUpdated(uint maxSlippage); /** * @param _maxSlippage most slippage as a percentage */ function updateSlippage(uint _maxSlippage) public onlyOwner { } event VaultUpdated(address vault); /** * @param _vault address that receives swap fees */ function updateVault(address _vault) public onlyOwner { } event KyberUpdated(address kyber); /** * @param _kyberProxy Kyber Network Proxy address */ function updateKyber(address _kyberProxy) public onlyOwner { } event LiquidPledgingUpdated(address liquidPledging); /** * @param _liquidPledging LiquidPledging Network Proxy address */ function updateLiquidPledging(address _liquidPledging) public onlyOwner { } /** * @notice Gets the conversion rate for the destToken given the srcQty. * @param srcToken source token contract address * @param srcQty amount of source tokens * @param destToken destination token contract address * @return exchange rate */ function getConversionRates(address srcToken, uint srcQty, address destToken) public view returns (uint exchangeRate) { } event Swap(address sender, address srcToken, address destToken, uint srcAmount, uint destAmount); /** * @notice Funds a project in desired token using ETH * @dev Requires a msg.value * @param idReceiver receiver of donation * @param token token to convert from ETH */ function fundWithETH(uint64 idReceiver, address token) public payable whenNotPaused { require(msg.value > 0); uint expectedRate; uint slippageRate; (expectedRate, slippageRate) = kyberProxy.getExpectedRate(ETH, token, msg.value); require(expectedRate > 0); uint slippagePercent = 100 - ((slippageRate * 100) / expectedRate); require(slippagePercent <= maxSlippage); uint maxDestinationAmount = (slippageRate / (10**18)) * msg.value; uint amount = kyberProxy.trade.value(msg.value)(ETH, msg.value, token, address(this), maxDestinationAmount, slippageRate, vault); require(amount > 0); require(<FILL_ME>) liquidPledging.addGiverAndDonate(idReceiver, msg.sender, token, amount); Swap(msg.sender, ETH, token, msg.value, amount); } /** * @notice Funds a project in desired token using an ERC20 Token * @param idReceiver receiver of donation * @param token token to convert from * @param amount being sent * @param receiverToken token being converted to */ function fundWithToken(uint64 idReceiver, address token, uint amount, address receiverToken) public whenNotPaused { } function transferOut(address asset, address to, uint amount) public onlyOwner { } function() payable external {} }
EIP20Interface(token).approve(address(liquidPledging),amount)
342,029
EIP20Interface(token).approve(address(liquidPledging),amount)
null
pragma solidity ^0.4.24; contract LiquidPledging { /// Create a "giver" pledge admin for the sender & donate /// @param idReceiver The Admin receiving the donation; can be any Admin: /// the Giver themselves, another Giver, a Delegate or a Project /// @param token The address of the token being donated. /// @param amount The amount of tokens being donated function addGiverAndDonate(uint64 idReceiver, address donarAddress, address token, uint amount) public {} } contract SwapProxy is Pausable, SafeToken { address public ETH; address public vault; uint public maxSlippage; KyberNetworkProxy public kyberProxy; LiquidPledging public liquidPledging; /** * @param _liquidPledging LiquidPledging contract address * @param _kyberProxy Kyber Network Proxy address * @param _ETH Kyber ETH address * @param _vault address that receives swap fees * @param _maxSlippage most slippage as a percentage */ function SwapProxy(address _liquidPledging, address _kyberProxy, address _ETH, address _vault, uint _maxSlippage) public { } event SlippageUpdated(uint maxSlippage); /** * @param _maxSlippage most slippage as a percentage */ function updateSlippage(uint _maxSlippage) public onlyOwner { } event VaultUpdated(address vault); /** * @param _vault address that receives swap fees */ function updateVault(address _vault) public onlyOwner { } event KyberUpdated(address kyber); /** * @param _kyberProxy Kyber Network Proxy address */ function updateKyber(address _kyberProxy) public onlyOwner { } event LiquidPledgingUpdated(address liquidPledging); /** * @param _liquidPledging LiquidPledging Network Proxy address */ function updateLiquidPledging(address _liquidPledging) public onlyOwner { } /** * @notice Gets the conversion rate for the destToken given the srcQty. * @param srcToken source token contract address * @param srcQty amount of source tokens * @param destToken destination token contract address * @return exchange rate */ function getConversionRates(address srcToken, uint srcQty, address destToken) public view returns (uint exchangeRate) { } event Swap(address sender, address srcToken, address destToken, uint srcAmount, uint destAmount); /** * @notice Funds a project in desired token using ETH * @dev Requires a msg.value * @param idReceiver receiver of donation * @param token token to convert from ETH */ function fundWithETH(uint64 idReceiver, address token) public payable whenNotPaused { } /** * @notice Funds a project in desired token using an ERC20 Token * @param idReceiver receiver of donation * @param token token to convert from * @param amount being sent * @param receiverToken token being converted to */ function fundWithToken(uint64 idReceiver, address token, uint amount, address receiverToken) public whenNotPaused { Error err = doTransferIn(token, msg.sender, amount); require(err == Error.NO_ERROR); uint expectedRate; uint slippageRate; (expectedRate, slippageRate) = kyberProxy.getExpectedRate(token, receiverToken, amount); require(expectedRate > 0); uint slippagePercent = 100 - (slippageRate * 100) / expectedRate; require(slippagePercent <= maxSlippage); require(<FILL_ME>) require(EIP20Interface(token).approve(address(kyberProxy), amount)); uint maxDestinationAmount = (slippageRate / (10**18)) * amount; uint receiverAmount = kyberProxy.trade(token, amount, receiverToken, address(this), maxDestinationAmount, slippageRate, vault); require(receiverAmount > 0); require(EIP20Interface(token).approve(address(liquidPledging), receiverAmount)); liquidPledging.addGiverAndDonate(idReceiver, msg.sender, receiverToken, receiverAmount); Swap(msg.sender, token, receiverToken, amount, receiverAmount); } function transferOut(address asset, address to, uint amount) public onlyOwner { } function() payable external {} }
EIP20Interface(token).approve(address(kyberProxy),0)
342,029
EIP20Interface(token).approve(address(kyberProxy),0)
null
pragma solidity ^0.4.24; contract LiquidPledging { /// Create a "giver" pledge admin for the sender & donate /// @param idReceiver The Admin receiving the donation; can be any Admin: /// the Giver themselves, another Giver, a Delegate or a Project /// @param token The address of the token being donated. /// @param amount The amount of tokens being donated function addGiverAndDonate(uint64 idReceiver, address donarAddress, address token, uint amount) public {} } contract SwapProxy is Pausable, SafeToken { address public ETH; address public vault; uint public maxSlippage; KyberNetworkProxy public kyberProxy; LiquidPledging public liquidPledging; /** * @param _liquidPledging LiquidPledging contract address * @param _kyberProxy Kyber Network Proxy address * @param _ETH Kyber ETH address * @param _vault address that receives swap fees * @param _maxSlippage most slippage as a percentage */ function SwapProxy(address _liquidPledging, address _kyberProxy, address _ETH, address _vault, uint _maxSlippage) public { } event SlippageUpdated(uint maxSlippage); /** * @param _maxSlippage most slippage as a percentage */ function updateSlippage(uint _maxSlippage) public onlyOwner { } event VaultUpdated(address vault); /** * @param _vault address that receives swap fees */ function updateVault(address _vault) public onlyOwner { } event KyberUpdated(address kyber); /** * @param _kyberProxy Kyber Network Proxy address */ function updateKyber(address _kyberProxy) public onlyOwner { } event LiquidPledgingUpdated(address liquidPledging); /** * @param _liquidPledging LiquidPledging Network Proxy address */ function updateLiquidPledging(address _liquidPledging) public onlyOwner { } /** * @notice Gets the conversion rate for the destToken given the srcQty. * @param srcToken source token contract address * @param srcQty amount of source tokens * @param destToken destination token contract address * @return exchange rate */ function getConversionRates(address srcToken, uint srcQty, address destToken) public view returns (uint exchangeRate) { } event Swap(address sender, address srcToken, address destToken, uint srcAmount, uint destAmount); /** * @notice Funds a project in desired token using ETH * @dev Requires a msg.value * @param idReceiver receiver of donation * @param token token to convert from ETH */ function fundWithETH(uint64 idReceiver, address token) public payable whenNotPaused { } /** * @notice Funds a project in desired token using an ERC20 Token * @param idReceiver receiver of donation * @param token token to convert from * @param amount being sent * @param receiverToken token being converted to */ function fundWithToken(uint64 idReceiver, address token, uint amount, address receiverToken) public whenNotPaused { Error err = doTransferIn(token, msg.sender, amount); require(err == Error.NO_ERROR); uint expectedRate; uint slippageRate; (expectedRate, slippageRate) = kyberProxy.getExpectedRate(token, receiverToken, amount); require(expectedRate > 0); uint slippagePercent = 100 - (slippageRate * 100) / expectedRate; require(slippagePercent <= maxSlippage); require(EIP20Interface(token).approve(address(kyberProxy), 0)); require(<FILL_ME>) uint maxDestinationAmount = (slippageRate / (10**18)) * amount; uint receiverAmount = kyberProxy.trade(token, amount, receiverToken, address(this), maxDestinationAmount, slippageRate, vault); require(receiverAmount > 0); require(EIP20Interface(token).approve(address(liquidPledging), receiverAmount)); liquidPledging.addGiverAndDonate(idReceiver, msg.sender, receiverToken, receiverAmount); Swap(msg.sender, token, receiverToken, amount, receiverAmount); } function transferOut(address asset, address to, uint amount) public onlyOwner { } function() payable external {} }
EIP20Interface(token).approve(address(kyberProxy),amount)
342,029
EIP20Interface(token).approve(address(kyberProxy),amount)
null
pragma solidity ^0.4.24; contract LiquidPledging { /// Create a "giver" pledge admin for the sender & donate /// @param idReceiver The Admin receiving the donation; can be any Admin: /// the Giver themselves, another Giver, a Delegate or a Project /// @param token The address of the token being donated. /// @param amount The amount of tokens being donated function addGiverAndDonate(uint64 idReceiver, address donarAddress, address token, uint amount) public {} } contract SwapProxy is Pausable, SafeToken { address public ETH; address public vault; uint public maxSlippage; KyberNetworkProxy public kyberProxy; LiquidPledging public liquidPledging; /** * @param _liquidPledging LiquidPledging contract address * @param _kyberProxy Kyber Network Proxy address * @param _ETH Kyber ETH address * @param _vault address that receives swap fees * @param _maxSlippage most slippage as a percentage */ function SwapProxy(address _liquidPledging, address _kyberProxy, address _ETH, address _vault, uint _maxSlippage) public { } event SlippageUpdated(uint maxSlippage); /** * @param _maxSlippage most slippage as a percentage */ function updateSlippage(uint _maxSlippage) public onlyOwner { } event VaultUpdated(address vault); /** * @param _vault address that receives swap fees */ function updateVault(address _vault) public onlyOwner { } event KyberUpdated(address kyber); /** * @param _kyberProxy Kyber Network Proxy address */ function updateKyber(address _kyberProxy) public onlyOwner { } event LiquidPledgingUpdated(address liquidPledging); /** * @param _liquidPledging LiquidPledging Network Proxy address */ function updateLiquidPledging(address _liquidPledging) public onlyOwner { } /** * @notice Gets the conversion rate for the destToken given the srcQty. * @param srcToken source token contract address * @param srcQty amount of source tokens * @param destToken destination token contract address * @return exchange rate */ function getConversionRates(address srcToken, uint srcQty, address destToken) public view returns (uint exchangeRate) { } event Swap(address sender, address srcToken, address destToken, uint srcAmount, uint destAmount); /** * @notice Funds a project in desired token using ETH * @dev Requires a msg.value * @param idReceiver receiver of donation * @param token token to convert from ETH */ function fundWithETH(uint64 idReceiver, address token) public payable whenNotPaused { } /** * @notice Funds a project in desired token using an ERC20 Token * @param idReceiver receiver of donation * @param token token to convert from * @param amount being sent * @param receiverToken token being converted to */ function fundWithToken(uint64 idReceiver, address token, uint amount, address receiverToken) public whenNotPaused { Error err = doTransferIn(token, msg.sender, amount); require(err == Error.NO_ERROR); uint expectedRate; uint slippageRate; (expectedRate, slippageRate) = kyberProxy.getExpectedRate(token, receiverToken, amount); require(expectedRate > 0); uint slippagePercent = 100 - (slippageRate * 100) / expectedRate; require(slippagePercent <= maxSlippage); require(EIP20Interface(token).approve(address(kyberProxy), 0)); require(EIP20Interface(token).approve(address(kyberProxy), amount)); uint maxDestinationAmount = (slippageRate / (10**18)) * amount; uint receiverAmount = kyberProxy.trade(token, amount, receiverToken, address(this), maxDestinationAmount, slippageRate, vault); require(receiverAmount > 0); require(<FILL_ME>) liquidPledging.addGiverAndDonate(idReceiver, msg.sender, receiverToken, receiverAmount); Swap(msg.sender, token, receiverToken, amount, receiverAmount); } function transferOut(address asset, address to, uint amount) public onlyOwner { } function() payable external {} }
EIP20Interface(token).approve(address(liquidPledging),receiverAmount)
342,029
EIP20Interface(token).approve(address(liquidPledging),receiverAmount)
null
contract MoonRaffleMain { address addressOne; address moonRaffleFactoryAddress; uint256 moonRaffleCounter = 0; //Keeps track of how many raffles have been completed string publicMessage = "when moon? buy your ticket now!"; // ECONOMIC SETTINGS uint256 pricePerTicket = 1 finney; uint256 maxTicketsPerTransaction = 300; uint256 prizePoolPercentage = 75; uint256 firstPrizePercentage = 55; uint256 secondPrizePercentage = 15; uint256 thirdPrizePercentage = 5; uint256 contractFeePercentage = 5; uint256 rolloverPercentage = 10; uint256 referralPercentage = 10; uint256 referralHurdle = 10; uint256 referralFloorTimePercentage = 75; // TIME SETTINGS uint256 moonRaffleLiveSecs = 518400; // 6 DAYS default uint256 winnerCalcSecs = 345600; // 4 DAYS default uint256 claimSecs = 15552000; // 180 DAYS default uint256 latestMoonRaffleCompleteTime = 0; bool latestMoonRaffleSeeded = true; // CURRENT LIVE ITERATION ADDRESS address[] oldMoonRaffleAddresses; address currentMoonRaffleAddress = 0; mapping(address => address[]) winners; // EVENTS event logNewMoonRaffleFactorySet(address _moonRaffleFactory); event logDonation(address _sender, uint256 _amount); event logNewMoonRaffle(address _newMoonRaffle); event logUpdatedPricePerTicket(uint256 _newPricePerTicket); event logUpdatedMaxTicketsPerTransaction(uint256 _newMaxTicketsPerTransaction); event logUpdatedPayoutEconomics(uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle); event logUpdatedTimeParams(uint256 _newMoonRaffleLiveSecs, uint256 _newWinnerCalcSecs, uint256 _newClaimSecs, uint256 _referralFloorTimePercentage); event logChangedAddressOne(address _newAddressOne); event logAddedToCurrentMoonRaffle(uint256 _addedAmount); event logChangedPublicMessage(string _newPublicMessage); modifier onlyAddressOne() { } modifier isNoLottoLive() { } // FALLBACK function() public payable { } constructor() public payable { } function newMoonRaffle( bytes32 _initialSecretHash1, bytes32 _initialSecretHash2, bytes32 _initialSecretHash3, bytes32 _initialSecretHash4 ) onlyAddressOne isNoLottoLive external { } function seedMoonRaffle(uint256 _seedAmount) onlyAddressOne external { } function retractMoonRaffle() onlyAddressOne external { require(latestMoonRaffleCompleteTime != 0); require(<FILL_ME>) if (address(currentMoonRaffleAddress).balance > 0) { MoonRaffleContractInterface(currentMoonRaffleAddress).retractContract();} latestMoonRaffleCompleteTime = 0; moonRaffleCounter -= 1; latestMoonRaffleSeeded = true; if (oldMoonRaffleAddresses.length > 0) { currentMoonRaffleAddress = oldMoonRaffleAddresses[(oldMoonRaffleAddresses.length - 1)]; } else { currentMoonRaffleAddress = 0; } } function logFinishedInstance() onlyAddressOne public { } function updatePricePerTicket(uint256 _newPricePerTicket) onlyAddressOne public { } function updateMaxTicketsPerTransaction(uint256 _newMaxTickets) onlyAddressOne public { } function updatePayoutEconomics( uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle ) onlyAddressOne public { } function updateTimeParams( uint256 _moonRaffleLiveSecs, uint256 _winnerCalcSecs, uint256 _claimSecs, uint256 _referralFloorTimePercentage ) onlyAddressOne public { } function updatePublicMessage(string _newPublicMessage) onlyAddressOne public { } // CHANGE ADMIN ADDRESSES function updateAddressOne(address _newAddressOne) onlyAddressOne public { } function addToCurrentMoonRaffle(uint256 _amountAdded) onlyAddressOne external { } function updateMoonRaffleFactoryAddress(address _newMoonRaffleFactoryAddress) onlyAddressOne external { } function donate() external payable { } function getNextMoonRaffleParameters() external view returns ( uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256 ) { } function getCurrentMoonRaffleAddress() external view returns (address) { } function getMoonRaffleCounter() external view returns (uint256) { } function getLastMoonRaffleAddress() external view returns (address) { } function getAllPreviousMoonRaffleAddresses() external view returns (address[]) { } function getMainAddresses() external view returns (address, address) { } function getLatestMoonRaffleCompleteTime() external view returns (uint256) { } function getPublicMessage() external view returns (string) { } function checkAddressForWins() external view returns (address[]) { } function getContractBalance() external view returns (uint256) { } function getMainStatus() external view returns (string) { } }
MoonRaffleContractInterface(currentMoonRaffleAddress).isRetractable()==true
342,113
MoonRaffleContractInterface(currentMoonRaffleAddress).isRetractable()==true
null
contract MoonRaffleMain { address addressOne; address moonRaffleFactoryAddress; uint256 moonRaffleCounter = 0; //Keeps track of how many raffles have been completed string publicMessage = "when moon? buy your ticket now!"; // ECONOMIC SETTINGS uint256 pricePerTicket = 1 finney; uint256 maxTicketsPerTransaction = 300; uint256 prizePoolPercentage = 75; uint256 firstPrizePercentage = 55; uint256 secondPrizePercentage = 15; uint256 thirdPrizePercentage = 5; uint256 contractFeePercentage = 5; uint256 rolloverPercentage = 10; uint256 referralPercentage = 10; uint256 referralHurdle = 10; uint256 referralFloorTimePercentage = 75; // TIME SETTINGS uint256 moonRaffleLiveSecs = 518400; // 6 DAYS default uint256 winnerCalcSecs = 345600; // 4 DAYS default uint256 claimSecs = 15552000; // 180 DAYS default uint256 latestMoonRaffleCompleteTime = 0; bool latestMoonRaffleSeeded = true; // CURRENT LIVE ITERATION ADDRESS address[] oldMoonRaffleAddresses; address currentMoonRaffleAddress = 0; mapping(address => address[]) winners; // EVENTS event logNewMoonRaffleFactorySet(address _moonRaffleFactory); event logDonation(address _sender, uint256 _amount); event logNewMoonRaffle(address _newMoonRaffle); event logUpdatedPricePerTicket(uint256 _newPricePerTicket); event logUpdatedMaxTicketsPerTransaction(uint256 _newMaxTicketsPerTransaction); event logUpdatedPayoutEconomics(uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle); event logUpdatedTimeParams(uint256 _newMoonRaffleLiveSecs, uint256 _newWinnerCalcSecs, uint256 _newClaimSecs, uint256 _referralFloorTimePercentage); event logChangedAddressOne(address _newAddressOne); event logAddedToCurrentMoonRaffle(uint256 _addedAmount); event logChangedPublicMessage(string _newPublicMessage); modifier onlyAddressOne() { } modifier isNoLottoLive() { } // FALLBACK function() public payable { } constructor() public payable { } function newMoonRaffle( bytes32 _initialSecretHash1, bytes32 _initialSecretHash2, bytes32 _initialSecretHash3, bytes32 _initialSecretHash4 ) onlyAddressOne isNoLottoLive external { } function seedMoonRaffle(uint256 _seedAmount) onlyAddressOne external { } function retractMoonRaffle() onlyAddressOne external { } function logFinishedInstance() onlyAddressOne public { } function updatePricePerTicket(uint256 _newPricePerTicket) onlyAddressOne public { } function updateMaxTicketsPerTransaction(uint256 _newMaxTickets) onlyAddressOne public { } function updatePayoutEconomics( uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle ) onlyAddressOne public { require(<FILL_ME>) require(_newPrizePoolPercentage == _newFirstPrizePercentage + _newSecondPrizePercentage + _newThirdPrizePercentage); require(_newContractFeePercentage <= 10); require(_newRolloverPercentage <= 20); require(_newReferralPercentage <= 20); require(_newReferralHurdle <= maxTicketsPerTransaction); prizePoolPercentage = _newPrizePoolPercentage; firstPrizePercentage = _newFirstPrizePercentage; secondPrizePercentage = _newSecondPrizePercentage; thirdPrizePercentage = _newThirdPrizePercentage; contractFeePercentage = _newContractFeePercentage; rolloverPercentage = _newRolloverPercentage; referralPercentage = _newReferralPercentage; referralHurdle = _newReferralHurdle; emit logUpdatedPayoutEconomics(_newPrizePoolPercentage, _newFirstPrizePercentage, _newSecondPrizePercentage, _newThirdPrizePercentage, _newContractFeePercentage, _newRolloverPercentage, _newReferralPercentage, _newReferralHurdle); } function updateTimeParams( uint256 _moonRaffleLiveSecs, uint256 _winnerCalcSecs, uint256 _claimSecs, uint256 _referralFloorTimePercentage ) onlyAddressOne public { } function updatePublicMessage(string _newPublicMessage) onlyAddressOne public { } // CHANGE ADMIN ADDRESSES function updateAddressOne(address _newAddressOne) onlyAddressOne public { } function addToCurrentMoonRaffle(uint256 _amountAdded) onlyAddressOne external { } function updateMoonRaffleFactoryAddress(address _newMoonRaffleFactoryAddress) onlyAddressOne external { } function donate() external payable { } function getNextMoonRaffleParameters() external view returns ( uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256 ) { } function getCurrentMoonRaffleAddress() external view returns (address) { } function getMoonRaffleCounter() external view returns (uint256) { } function getLastMoonRaffleAddress() external view returns (address) { } function getAllPreviousMoonRaffleAddresses() external view returns (address[]) { } function getMainAddresses() external view returns (address, address) { } function getLatestMoonRaffleCompleteTime() external view returns (uint256) { } function getPublicMessage() external view returns (string) { } function checkAddressForWins() external view returns (address[]) { } function getContractBalance() external view returns (uint256) { } function getMainStatus() external view returns (string) { } }
_newPrizePoolPercentage+_newContractFeePercentage+_newRolloverPercentage+_newReferralPercentage==100
342,113
_newPrizePoolPercentage+_newContractFeePercentage+_newRolloverPercentage+_newReferralPercentage==100
null
contract MoonRaffleMain { address addressOne; address moonRaffleFactoryAddress; uint256 moonRaffleCounter = 0; //Keeps track of how many raffles have been completed string publicMessage = "when moon? buy your ticket now!"; // ECONOMIC SETTINGS uint256 pricePerTicket = 1 finney; uint256 maxTicketsPerTransaction = 300; uint256 prizePoolPercentage = 75; uint256 firstPrizePercentage = 55; uint256 secondPrizePercentage = 15; uint256 thirdPrizePercentage = 5; uint256 contractFeePercentage = 5; uint256 rolloverPercentage = 10; uint256 referralPercentage = 10; uint256 referralHurdle = 10; uint256 referralFloorTimePercentage = 75; // TIME SETTINGS uint256 moonRaffleLiveSecs = 518400; // 6 DAYS default uint256 winnerCalcSecs = 345600; // 4 DAYS default uint256 claimSecs = 15552000; // 180 DAYS default uint256 latestMoonRaffleCompleteTime = 0; bool latestMoonRaffleSeeded = true; // CURRENT LIVE ITERATION ADDRESS address[] oldMoonRaffleAddresses; address currentMoonRaffleAddress = 0; mapping(address => address[]) winners; // EVENTS event logNewMoonRaffleFactorySet(address _moonRaffleFactory); event logDonation(address _sender, uint256 _amount); event logNewMoonRaffle(address _newMoonRaffle); event logUpdatedPricePerTicket(uint256 _newPricePerTicket); event logUpdatedMaxTicketsPerTransaction(uint256 _newMaxTicketsPerTransaction); event logUpdatedPayoutEconomics(uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle); event logUpdatedTimeParams(uint256 _newMoonRaffleLiveSecs, uint256 _newWinnerCalcSecs, uint256 _newClaimSecs, uint256 _referralFloorTimePercentage); event logChangedAddressOne(address _newAddressOne); event logAddedToCurrentMoonRaffle(uint256 _addedAmount); event logChangedPublicMessage(string _newPublicMessage); modifier onlyAddressOne() { } modifier isNoLottoLive() { } // FALLBACK function() public payable { } constructor() public payable { } function newMoonRaffle( bytes32 _initialSecretHash1, bytes32 _initialSecretHash2, bytes32 _initialSecretHash3, bytes32 _initialSecretHash4 ) onlyAddressOne isNoLottoLive external { } function seedMoonRaffle(uint256 _seedAmount) onlyAddressOne external { } function retractMoonRaffle() onlyAddressOne external { } function logFinishedInstance() onlyAddressOne public { } function updatePricePerTicket(uint256 _newPricePerTicket) onlyAddressOne public { } function updateMaxTicketsPerTransaction(uint256 _newMaxTickets) onlyAddressOne public { } function updatePayoutEconomics( uint256 _newPrizePoolPercentage, uint256 _newFirstPrizePercentage, uint256 _newSecondPrizePercentage, uint256 _newThirdPrizePercentage, uint256 _newContractFeePercentage, uint256 _newRolloverPercentage, uint256 _newReferralPercentage, uint256 _newReferralHurdle ) onlyAddressOne public { } function updateTimeParams( uint256 _moonRaffleLiveSecs, uint256 _winnerCalcSecs, uint256 _claimSecs, uint256 _referralFloorTimePercentage ) onlyAddressOne public { } function updatePublicMessage(string _newPublicMessage) onlyAddressOne public { } // CHANGE ADMIN ADDRESSES function updateAddressOne(address _newAddressOne) onlyAddressOne public { } function addToCurrentMoonRaffle(uint256 _amountAdded) onlyAddressOne external { require(now < latestMoonRaffleCompleteTime); require(<FILL_ME>) emit logAddedToCurrentMoonRaffle(_amountAdded); currentMoonRaffleAddress.transfer(_amountAdded); } function updateMoonRaffleFactoryAddress(address _newMoonRaffleFactoryAddress) onlyAddressOne external { } function donate() external payable { } function getNextMoonRaffleParameters() external view returns ( uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256 ) { } function getCurrentMoonRaffleAddress() external view returns (address) { } function getMoonRaffleCounter() external view returns (uint256) { } function getLastMoonRaffleAddress() external view returns (address) { } function getAllPreviousMoonRaffleAddresses() external view returns (address[]) { } function getMainAddresses() external view returns (address, address) { } function getLatestMoonRaffleCompleteTime() external view returns (uint256) { } function getPublicMessage() external view returns (string) { } function checkAddressForWins() external view returns (address[]) { } function getContractBalance() external view returns (uint256) { } function getMainStatus() external view returns (string) { } }
address(this).balance>=_amountAdded
342,113
address(this).balance>=_amountAdded
"Purchase would exceed max supply of Toads"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; contract TrippyToadz is ERC721, Ownable { using SafeMath for uint256; uint256 public startingIndex; uint256 public constant toadPrice = 0.07 ether; //0.07 ETH uint public maxToadMintPerTxn = 10; address public companyWallet; uint256 public MAX_TOADS = 9696; bool public saleIsActive = false; constructor(address _companyWallet) ERC721("TrippyToadz", "TOADZ") { } function withdraw() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } function setMaxToadzMintPerTxn(uint num) public onlyOwner { } function mintToads(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint toads"); require(numberOfTokens <= maxToadMintPerTxn, "Can only mint 20 tokens at a time"); require(<FILL_ME>) require(toadPrice.mul(numberOfTokens) <= msg.value, "Ether value sent is not correct"); for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < MAX_TOADS) { _safeMint(msg.sender, mintIndex); } } payable(companyWallet).transfer(address(this).balance); } }
totalSupply().add(numberOfTokens)<=MAX_TOADS,"Purchase would exceed max supply of Toads"
342,203
totalSupply().add(numberOfTokens)<=MAX_TOADS
"Ether value sent is not correct"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; contract TrippyToadz is ERC721, Ownable { using SafeMath for uint256; uint256 public startingIndex; uint256 public constant toadPrice = 0.07 ether; //0.07 ETH uint public maxToadMintPerTxn = 10; address public companyWallet; uint256 public MAX_TOADS = 9696; bool public saleIsActive = false; constructor(address _companyWallet) ERC721("TrippyToadz", "TOADZ") { } function withdraw() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } function setMaxToadzMintPerTxn(uint num) public onlyOwner { } function mintToads(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint toads"); require(numberOfTokens <= maxToadMintPerTxn, "Can only mint 20 tokens at a time"); require(totalSupply().add(numberOfTokens) <= MAX_TOADS, "Purchase would exceed max supply of Toads"); require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < MAX_TOADS) { _safeMint(msg.sender, mintIndex); } } payable(companyWallet).transfer(address(this).balance); } }
toadPrice.mul(numberOfTokens)<=msg.value,"Ether value sent is not correct"
342,203
toadPrice.mul(numberOfTokens)<=msg.value
'Giveaway not supported'
// SPDX-License-Identifier: UNLICENSED import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import './lib/IGiveaway.sol'; pragma solidity ^0.8.0; contract CodeMakesArt is ERC721Enumerable, Ownable { enum State { Paused, Presale, Active, Locked } struct Drop { // General info string name; string description; address payable artist; // art uint256 lib; string script; // Price, supply & minting uint256 price; uint256 royalty; uint256 minted; uint256 maxSupply; uint256 maxPerMint; IGiveaway giveaway; // State State state; } mapping(uint256 => Drop) private drops; mapping(address => string) private artistNames; mapping(address => string) private artistURLs; mapping(uint256 => uint256) private creationBlocks; mapping(uint256 => uint256) private creationTimestamps; mapping(uint256 => string) private libIpfsHashes; string private metadataBaseURI = 'https://codemakes.art/token/'; constructor() ERC721('Code Makes Art', 'CMA') {} // Creation function mint(uint256 dropId, uint256 count) public payable { } function claimFree(uint256 dropId, uint256 count) public { Drop storage drop = drops[dropId]; require(drop.state == State.Presale || drop.state == State.Active, 'Sale is not active'); require(<FILL_ME>) drop.giveaway.onClaimFree(msg.sender, dropId, count); _mintDrop(dropId, count); } function _mintDrop(uint256 dropId, uint256 count) internal { } // Reading data function tokenHash(uint256 tokenId) public view returns (bytes32) { } function dropDetails(uint256 dropId) public view returns ( string memory name, string memory description, string memory artistName, string memory artistUrl, uint256 price, uint256 minted, uint256 maxSupply, uint256 maxPerMint, State state ) { } function renderTokenHtml(uint256 tokenId) public view returns (string memory) { } // Drops management function setDrop( uint256 dropId, string memory name, string memory description, address payable artist, uint256 price, uint256 royalty, uint256 maxSupply, uint256 maxPerMint, IGiveaway giveaway, State state ) public onlyOwner { } function setScript( uint256 dropId, uint256 lib, string memory script ) public onlyOwner { } function setState(uint256 dropId, State state) public onlyOwner { } function setArtist( address artist, string memory name, string memory url ) public onlyOwner { } function setLibIpfsHash(uint256 lib, string memory hash) public onlyOwner { } function _splitReward(uint256 dropId) internal { } // Metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
address(drop.giveaway)!=address(0),'Giveaway not supported'
342,225
address(drop.giveaway)!=address(0)
'Not enough left'
// SPDX-License-Identifier: UNLICENSED import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import './lib/IGiveaway.sol'; pragma solidity ^0.8.0; contract CodeMakesArt is ERC721Enumerable, Ownable { enum State { Paused, Presale, Active, Locked } struct Drop { // General info string name; string description; address payable artist; // art uint256 lib; string script; // Price, supply & minting uint256 price; uint256 royalty; uint256 minted; uint256 maxSupply; uint256 maxPerMint; IGiveaway giveaway; // State State state; } mapping(uint256 => Drop) private drops; mapping(address => string) private artistNames; mapping(address => string) private artistURLs; mapping(uint256 => uint256) private creationBlocks; mapping(uint256 => uint256) private creationTimestamps; mapping(uint256 => string) private libIpfsHashes; string private metadataBaseURI = 'https://codemakes.art/token/'; constructor() ERC721('Code Makes Art', 'CMA') {} // Creation function mint(uint256 dropId, uint256 count) public payable { } function claimFree(uint256 dropId, uint256 count) public { } function _mintDrop(uint256 dropId, uint256 count) internal { Drop storage drop = drops[dropId]; require(<FILL_ME>) for (uint256 i = 0; i < count; i++) { uint256 tokenId = (dropId * 1_000_000) + drop.minted + i + 1; creationBlocks[tokenId] = block.number; creationTimestamps[tokenId] = block.timestamp; _safeMint(msg.sender, tokenId); } drop.minted += count; } // Reading data function tokenHash(uint256 tokenId) public view returns (bytes32) { } function dropDetails(uint256 dropId) public view returns ( string memory name, string memory description, string memory artistName, string memory artistUrl, uint256 price, uint256 minted, uint256 maxSupply, uint256 maxPerMint, State state ) { } function renderTokenHtml(uint256 tokenId) public view returns (string memory) { } // Drops management function setDrop( uint256 dropId, string memory name, string memory description, address payable artist, uint256 price, uint256 royalty, uint256 maxSupply, uint256 maxPerMint, IGiveaway giveaway, State state ) public onlyOwner { } function setScript( uint256 dropId, uint256 lib, string memory script ) public onlyOwner { } function setState(uint256 dropId, State state) public onlyOwner { } function setArtist( address artist, string memory name, string memory url ) public onlyOwner { } function setLibIpfsHash(uint256 lib, string memory hash) public onlyOwner { } function _splitReward(uint256 dropId) internal { } // Metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
drop.minted+count<=drop.maxSupply,'Not enough left'
342,225
drop.minted+count<=drop.maxSupply
'Not available'
// SPDX-License-Identifier: UNLICENSED import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import './lib/IGiveaway.sol'; pragma solidity ^0.8.0; contract CodeMakesArt is ERC721Enumerable, Ownable { enum State { Paused, Presale, Active, Locked } struct Drop { // General info string name; string description; address payable artist; // art uint256 lib; string script; // Price, supply & minting uint256 price; uint256 royalty; uint256 minted; uint256 maxSupply; uint256 maxPerMint; IGiveaway giveaway; // State State state; } mapping(uint256 => Drop) private drops; mapping(address => string) private artistNames; mapping(address => string) private artistURLs; mapping(uint256 => uint256) private creationBlocks; mapping(uint256 => uint256) private creationTimestamps; mapping(uint256 => string) private libIpfsHashes; string private metadataBaseURI = 'https://codemakes.art/token/'; constructor() ERC721('Code Makes Art', 'CMA') {} // Creation function mint(uint256 dropId, uint256 count) public payable { } function claimFree(uint256 dropId, uint256 count) public { } function _mintDrop(uint256 dropId, uint256 count) internal { } // Reading data function tokenHash(uint256 tokenId) public view returns (bytes32) { } function dropDetails(uint256 dropId) public view returns ( string memory name, string memory description, string memory artistName, string memory artistUrl, uint256 price, uint256 minted, uint256 maxSupply, uint256 maxPerMint, State state ) { } function renderTokenHtml(uint256 tokenId) public view returns (string memory) { bytes32 hash = tokenHash(tokenId); uint256 dropId = tokenId / 1000000; require(<FILL_ME>) string memory dependency = drops[dropId].lib > 0 ? string( abi.encodePacked('<script src="https://ipfs.io/ipfs/', libIpfsHashes[drops[dropId].lib], '"></script>') ) : ''; string memory prelude = string( abi.encodePacked( "var HASH='", Strings.toHexString(uint256(hash)), "',ID='", Strings.toString(tokenId), "',N=", Strings.toString(tokenId % 1000000), ',BLOCK_N=', Strings.toString(creationBlocks[tokenId]), ',BLOCK_TS=', Strings.toString(creationTimestamps[tokenId]), ',OWNER="', Strings.toHexString(uint160(ownerOf(tokenId))), '";\n' ) ); return string( abi.encodePacked( '<title>', drops[dropId].name, ' #', Strings.toString(tokenId % 1000000), '</title>', dependency, '<script>', prelude, drops[dropId].script, '</script>' ) ); } // Drops management function setDrop( uint256 dropId, string memory name, string memory description, address payable artist, uint256 price, uint256 royalty, uint256 maxSupply, uint256 maxPerMint, IGiveaway giveaway, State state ) public onlyOwner { } function setScript( uint256 dropId, uint256 lib, string memory script ) public onlyOwner { } function setState(uint256 dropId, State state) public onlyOwner { } function setArtist( address artist, string memory name, string memory url ) public onlyOwner { } function setLibIpfsHash(uint256 lib, string memory hash) public onlyOwner { } function _splitReward(uint256 dropId) internal { } // Metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
bytes(drops[dropId].script).length!=0||drops[dropId].lib>0,'Not available'
342,225
bytes(drops[dropId].script).length!=0||drops[dropId].lib>0
'Drop locked'
// SPDX-License-Identifier: UNLICENSED import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import './lib/IGiveaway.sol'; pragma solidity ^0.8.0; contract CodeMakesArt is ERC721Enumerable, Ownable { enum State { Paused, Presale, Active, Locked } struct Drop { // General info string name; string description; address payable artist; // art uint256 lib; string script; // Price, supply & minting uint256 price; uint256 royalty; uint256 minted; uint256 maxSupply; uint256 maxPerMint; IGiveaway giveaway; // State State state; } mapping(uint256 => Drop) private drops; mapping(address => string) private artistNames; mapping(address => string) private artistURLs; mapping(uint256 => uint256) private creationBlocks; mapping(uint256 => uint256) private creationTimestamps; mapping(uint256 => string) private libIpfsHashes; string private metadataBaseURI = 'https://codemakes.art/token/'; constructor() ERC721('Code Makes Art', 'CMA') {} // Creation function mint(uint256 dropId, uint256 count) public payable { } function claimFree(uint256 dropId, uint256 count) public { } function _mintDrop(uint256 dropId, uint256 count) internal { } // Reading data function tokenHash(uint256 tokenId) public view returns (bytes32) { } function dropDetails(uint256 dropId) public view returns ( string memory name, string memory description, string memory artistName, string memory artistUrl, uint256 price, uint256 minted, uint256 maxSupply, uint256 maxPerMint, State state ) { } function renderTokenHtml(uint256 tokenId) public view returns (string memory) { } // Drops management function setDrop( uint256 dropId, string memory name, string memory description, address payable artist, uint256 price, uint256 royalty, uint256 maxSupply, uint256 maxPerMint, IGiveaway giveaway, State state ) public onlyOwner { require(<FILL_ME>) drops[dropId].name = name; drops[dropId].description = description; drops[dropId].artist = artist; drops[dropId].price = price; drops[dropId].royalty = royalty; drops[dropId].maxSupply = maxSupply; drops[dropId].maxPerMint = maxPerMint; drops[dropId].giveaway = giveaway; drops[dropId].state = state; } function setScript( uint256 dropId, uint256 lib, string memory script ) public onlyOwner { } function setState(uint256 dropId, State state) public onlyOwner { } function setArtist( address artist, string memory name, string memory url ) public onlyOwner { } function setLibIpfsHash(uint256 lib, string memory hash) public onlyOwner { } function _splitReward(uint256 dropId) internal { } // Metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
drops[dropId].state!=State.Locked,'Drop locked'
342,225
drops[dropId].state!=State.Locked
"Must meet required conditions to activate mint"
/* HTTPS://QBURN.CASH HTTPS://T.ME/QUICKBURN ---------------------------------------------- Community driven project ---------------------------------------------- _______ ______ _______ _ ( ___ )( ___ \ |\ /|( ____ )( ( /| | ( ) || ( ) )| ) ( || ( )|| \ ( | | | | || (__/ / | | | || (____)|| \ | | | | | || __ ( | | | || __)| (\ \) | | | /\| || ( \ \ | | | || (\ ( | | \ | | (_\ \ || )___) )| (___) || ) \ \__| ) \ | (____\/_)|/ \___/ (_______)|/ \__/|/ )_) QUICKBURN - Deflationary & Fast eco system ---------------------------------------------- - 20% Penalty when claiming rewards < 4 days - 100% Truly Decentralized ---------------------------------------------- */ // SPDX-License-Identifier: MIT pragma solidity ^0.7.2; 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) { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed from, address indexed _to); constructor(address _owner) { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } function acceptOwnership() external { } } abstract contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused external { } function unpause() onlyOwner whenPaused external { } } 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); } abstract contract ERC20 is IERC20, Pausable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public override view returns (uint256) { } function balanceOf(address account) public override view returns (uint256) { } function allowance(address owner, address spender) public override view returns (uint256) { } function approve(address spender, uint256 value) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal { } function _mint(address account, uint256 amount) internal { } function _burn(address account, uint256 value) internal { } function _transferFrom(address sender, address recipient, uint256 amount) internal whenNotPaused returns (bool) { } function _approve(address owner, address spender, uint256 value) internal { } } contract qburnToken is ERC20 { using SafeMath for uint256; IERC20 private qburnAddress; string public name; string public symbol; uint8 public decimals; uint private setTime; uint public maxValue; uint256 public totalMinted; uint256 public totalBurnt; mapping(address => uint256) private time; constructor(IERC20 _qburnAddress, string memory _name, string memory _symbol) Owned(msg.sender) { } modifier validateMint(uint _mint) { require(_mint >= maxValue, "Amount is above treshold of 300 Ether max."); require(<FILL_ME>) _; } function burn(uint256 _amount) external whenNotPaused returns (bool) { } function transfer(address _recipient, uint256 _amount) public override whenNotPaused returns (bool) { } function transferFrom(address _sender, address _recipient, uint256 _amount) public override whenNotPaused returns (bool) { } function approvedTokenBalance(address _sender) public view returns(uint) { } function mint(address _account, uint _amount, uint _mint) external validateMint(_mint) { } receive() external payable { } }
qburnAddress.balanceOf(msg.sender)>=_mint,"Must meet required conditions to activate mint"
342,381
qburnAddress.balanceOf(msg.sender)>=_mint
null
pragma solidity 0.4.24; contract AbcdEfg { mapping (address => uint256) private balances; mapping (address => uint256) private marked; uint256 private totalSupply_ = 1000; uint256 private markId = 0; mapping (uint256 => bytes) public marks; string public name = "abcdEfg"; string public symbol = "a2g"; uint8 public decimals = 0; string public memo = "Fit in the words here!Fit in the words here!Fit in the words here!Fit in the words here!"; event Transfer( address indexed from, address indexed to, uint256 value ); constructor() public { } function () public { } function mark() internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { require(<FILL_ME>) require(_to != address(0)); balances[msg.sender] = balances[msg.sender] - _value; balances[_to] = balances[_to] + _value; emit Transfer(msg.sender, _to, _value); return true; } }
_value+marked[msg.sender]<=balances[msg.sender]
342,410
_value+marked[msg.sender]<=balances[msg.sender]
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /* When executed after the Kings contract, the entire token balance inside the contract will be transferred to the minter if they becomes the king which they are already the king. */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ERC918Interface { function epochCount() public constant returns (uint); function totalSupply() public constant returns (uint); function getMiningDifficulty() public constant returns (uint); function getMiningTarget() public constant returns (uint); function getMiningReward() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber); } contract mintForwarderInterface { function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool success); } contract proxyMinterInterface { function proxyMint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); } contract miningKingContract { function getKing() public returns (address king); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract DoubleKingsReward is Owned { using SafeMath for uint; address public kingContract; address public minedToken; // 0xBTC is 0xb6ed7644c69416d67b522e20bc294a9a9b405b31; constructor(address mToken, address mkContract) public { } function getBalance() view public returns (uint) { } //do not allow ether to enter function() public payable { } /** Pay out the token balance if the king becomes the king twice in a row **/ //proxyMintWithKing function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool) { require(proxyMintArray.length > 0); uint previousEpochCount = ERC918Interface(minedToken).epochCount(); address proxyMinter = proxyMintArray[0]; if(proxyMintArray.length == 1) { //Forward to the last proxyMint contract, typically a pool's owned mint contract require(<FILL_ME>) }else{ //if array length is greater than 1, pop the proxyMinter from the front of the array and keep cascading down the chain... address[] memory remainingProxyMintArray = popFirstFromArray(proxyMintArray); require(mintForwarderInterface(proxyMinter).mintForwarder(nonce, challenge_digest,remainingProxyMintArray)); } //make sure that the minedToken really was proxy minted through the proxyMint delegate call chain require( ERC918Interface(minedToken).epochCount() == previousEpochCount.add(1) ); // UNIQUE CONTRACT ACTION SPACE address miningKing = miningKingContract(kingContract).getKing(); bytes memory nonceBytes = uintToBytesForAddress(nonce); address newKing = bytesToAddress(nonceBytes); if(miningKing == newKing) { uint balance = ERC20Interface(minedToken).balanceOf(this); require(ERC20Interface(minedToken).transfer(newKing,balance)); } // -------- return true; } function popFirstFromArray(address[] array) pure public returns (address[] memory) { } function uintToBytesForAddress(uint256 x) pure public returns (bytes b) { } function bytesToAddress (bytes b) pure public returns (address) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } }
proxyMinterInterface(proxyMinter).proxyMint(nonce,challenge_digest)
342,445
proxyMinterInterface(proxyMinter).proxyMint(nonce,challenge_digest)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /* When executed after the Kings contract, the entire token balance inside the contract will be transferred to the minter if they becomes the king which they are already the king. */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ERC918Interface { function epochCount() public constant returns (uint); function totalSupply() public constant returns (uint); function getMiningDifficulty() public constant returns (uint); function getMiningTarget() public constant returns (uint); function getMiningReward() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber); } contract mintForwarderInterface { function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool success); } contract proxyMinterInterface { function proxyMint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); } contract miningKingContract { function getKing() public returns (address king); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract DoubleKingsReward is Owned { using SafeMath for uint; address public kingContract; address public minedToken; // 0xBTC is 0xb6ed7644c69416d67b522e20bc294a9a9b405b31; constructor(address mToken, address mkContract) public { } function getBalance() view public returns (uint) { } //do not allow ether to enter function() public payable { } /** Pay out the token balance if the king becomes the king twice in a row **/ //proxyMintWithKing function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool) { require(proxyMintArray.length > 0); uint previousEpochCount = ERC918Interface(minedToken).epochCount(); address proxyMinter = proxyMintArray[0]; if(proxyMintArray.length == 1) { //Forward to the last proxyMint contract, typically a pool's owned mint contract require(proxyMinterInterface(proxyMinter).proxyMint(nonce, challenge_digest)); }else{ //if array length is greater than 1, pop the proxyMinter from the front of the array and keep cascading down the chain... address[] memory remainingProxyMintArray = popFirstFromArray(proxyMintArray); require(<FILL_ME>) } //make sure that the minedToken really was proxy minted through the proxyMint delegate call chain require( ERC918Interface(minedToken).epochCount() == previousEpochCount.add(1) ); // UNIQUE CONTRACT ACTION SPACE address miningKing = miningKingContract(kingContract).getKing(); bytes memory nonceBytes = uintToBytesForAddress(nonce); address newKing = bytesToAddress(nonceBytes); if(miningKing == newKing) { uint balance = ERC20Interface(minedToken).balanceOf(this); require(ERC20Interface(minedToken).transfer(newKing,balance)); } // -------- return true; } function popFirstFromArray(address[] array) pure public returns (address[] memory) { } function uintToBytesForAddress(uint256 x) pure public returns (bytes b) { } function bytesToAddress (bytes b) pure public returns (address) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } }
mintForwarderInterface(proxyMinter).mintForwarder(nonce,challenge_digest,remainingProxyMintArray)
342,445
mintForwarderInterface(proxyMinter).mintForwarder(nonce,challenge_digest,remainingProxyMintArray)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /* When executed after the Kings contract, the entire token balance inside the contract will be transferred to the minter if they becomes the king which they are already the king. */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ERC918Interface { function epochCount() public constant returns (uint); function totalSupply() public constant returns (uint); function getMiningDifficulty() public constant returns (uint); function getMiningTarget() public constant returns (uint); function getMiningReward() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber); } contract mintForwarderInterface { function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool success); } contract proxyMinterInterface { function proxyMint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); } contract miningKingContract { function getKing() public returns (address king); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract DoubleKingsReward is Owned { using SafeMath for uint; address public kingContract; address public minedToken; // 0xBTC is 0xb6ed7644c69416d67b522e20bc294a9a9b405b31; constructor(address mToken, address mkContract) public { } function getBalance() view public returns (uint) { } //do not allow ether to enter function() public payable { } /** Pay out the token balance if the king becomes the king twice in a row **/ //proxyMintWithKing function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool) { require(proxyMintArray.length > 0); uint previousEpochCount = ERC918Interface(minedToken).epochCount(); address proxyMinter = proxyMintArray[0]; if(proxyMintArray.length == 1) { //Forward to the last proxyMint contract, typically a pool's owned mint contract require(proxyMinterInterface(proxyMinter).proxyMint(nonce, challenge_digest)); }else{ //if array length is greater than 1, pop the proxyMinter from the front of the array and keep cascading down the chain... address[] memory remainingProxyMintArray = popFirstFromArray(proxyMintArray); require(mintForwarderInterface(proxyMinter).mintForwarder(nonce, challenge_digest,remainingProxyMintArray)); } //make sure that the minedToken really was proxy minted through the proxyMint delegate call chain require(<FILL_ME>) // UNIQUE CONTRACT ACTION SPACE address miningKing = miningKingContract(kingContract).getKing(); bytes memory nonceBytes = uintToBytesForAddress(nonce); address newKing = bytesToAddress(nonceBytes); if(miningKing == newKing) { uint balance = ERC20Interface(minedToken).balanceOf(this); require(ERC20Interface(minedToken).transfer(newKing,balance)); } // -------- return true; } function popFirstFromArray(address[] array) pure public returns (address[] memory) { } function uintToBytesForAddress(uint256 x) pure public returns (bytes b) { } function bytesToAddress (bytes b) pure public returns (address) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } }
ERC918Interface(minedToken).epochCount()==previousEpochCount.add(1)
342,445
ERC918Interface(minedToken).epochCount()==previousEpochCount.add(1)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /* When executed after the Kings contract, the entire token balance inside the contract will be transferred to the minter if they becomes the king which they are already the king. */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract ERC918Interface { function epochCount() public constant returns (uint); function totalSupply() public constant returns (uint); function getMiningDifficulty() public constant returns (uint); function getMiningTarget() public constant returns (uint); function getMiningReward() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function mint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); event Mint(address indexed from, uint reward_amount, uint epochCount, bytes32 newChallengeNumber); } contract mintForwarderInterface { function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool success); } contract proxyMinterInterface { function proxyMint(uint256 nonce, bytes32 challenge_digest) public returns (bool success); } contract miningKingContract { function getKing() public returns (address king); } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); function Owned() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } contract DoubleKingsReward is Owned { using SafeMath for uint; address public kingContract; address public minedToken; // 0xBTC is 0xb6ed7644c69416d67b522e20bc294a9a9b405b31; constructor(address mToken, address mkContract) public { } function getBalance() view public returns (uint) { } //do not allow ether to enter function() public payable { } /** Pay out the token balance if the king becomes the king twice in a row **/ //proxyMintWithKing function mintForwarder(uint256 nonce, bytes32 challenge_digest, address[] proxyMintArray) public returns (bool) { require(proxyMintArray.length > 0); uint previousEpochCount = ERC918Interface(minedToken).epochCount(); address proxyMinter = proxyMintArray[0]; if(proxyMintArray.length == 1) { //Forward to the last proxyMint contract, typically a pool's owned mint contract require(proxyMinterInterface(proxyMinter).proxyMint(nonce, challenge_digest)); }else{ //if array length is greater than 1, pop the proxyMinter from the front of the array and keep cascading down the chain... address[] memory remainingProxyMintArray = popFirstFromArray(proxyMintArray); require(mintForwarderInterface(proxyMinter).mintForwarder(nonce, challenge_digest,remainingProxyMintArray)); } //make sure that the minedToken really was proxy minted through the proxyMint delegate call chain require( ERC918Interface(minedToken).epochCount() == previousEpochCount.add(1) ); // UNIQUE CONTRACT ACTION SPACE address miningKing = miningKingContract(kingContract).getKing(); bytes memory nonceBytes = uintToBytesForAddress(nonce); address newKing = bytesToAddress(nonceBytes); if(miningKing == newKing) { uint balance = ERC20Interface(minedToken).balanceOf(this); require(<FILL_ME>) } // -------- return true; } function popFirstFromArray(address[] array) pure public returns (address[] memory) { } function uintToBytesForAddress(uint256 x) pure public returns (bytes b) { } function bytesToAddress (bytes b) pure public returns (address) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } }
ERC20Interface(minedToken).transfer(newKing,balance)
342,445
ERC20Interface(minedToken).transfer(newKing,balance)
"_isExcludedFromMaxWallet already set to that value for one wallet"
// SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.0; /* $$$$$$$\ $$\ $$$$$$\ $$\ $$ __$$\ $$ | $$ __$$\ \__| $$ | $$ | $$$$$$\ $$$$$$\ $$ | $$\ $$ / $$ |$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$ | \____$$\ $$ __$$\ $$ | $$ | $$ | $$ |$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ | $$ | $$$$$$$ |$$ | \__|$$$$$$ / $$ | $$ |$$ | $$ |$$ |$$ / $$ |$$ | $$ | $$ | $$ |$$ __$$ |$$ | $$ _$$< $$ | $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ | $$$$$$$ |\$$$$$$$ |$$ | $$ | \$$\ $$$$$$ |$$ | $$ |$$ |\$$$$$$ |$$ | $$ | \_______/ \_______|\__| \__| \__| \______/ \__| \__|\__| \______/ \__| \__| 🔥 Launch: 20th December @ 11pm UTC Website: www.darkonion.co Telegram: @darkoniontoken Twitter: @darkoniontoken Dark-Webbing The Metaverses! ⭐️ $DARK TOKENOMICS ⭐️ 🔸 Supply: 100 Billion 🔸 Team Tokens: 3% (100% vested, 90 days) 🔸 Private Sale: 3% (50% Vested) 🔸 Liquidity Pool: 96% 🔹Starting LP: $30,000 USD. (7.6 ETH) 🔸 Tax: 10% 🔸 Reflection: 3% 🔸 Virtual Asset Wallet: 7% ❗️During the first 24 hours, sell tax is set at 25%. */ import "./Ownable.sol"; import "./IERC20.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./Address.sol"; contract DarkOnion is Context, IERC20, Ownable { using Address for address payable; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isExcludedFromMaxWallet; mapping (address => bool) public isBot; address[] private _excluded; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10**11 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public maxTxAmountBuy = _tTotal/142; uint256 public maxTxAmountSell = _tTotal/333; uint256 public maxWalletAmount = _tTotal/100; //antisnipers uint256 public liqAddedBlockNumber; uint256 public blocksToWait = 2; address payable public marketingAddress; mapping (address => bool) public isAutomatedMarketMakerPair; string private constant _name = "Dark Onion"; string private constant _symbol = "DARK"; bool private inSwapAndLiquify; IUniswapV2Router02 public UniswapV2Router; address public uniswapPair; bool public swapAndLiquifyEnabled = true; uint256 public numTokensSellToAddToLiquidity = _tTotal/500; struct feeRatesStruct { uint8 rfi; uint8 marketing; uint8 autolp; uint8 toSwap; } feeRatesStruct public buyRates = feeRatesStruct( { rfi: 3, marketing: 7, autolp: 0, toSwap: 7 }); feeRatesStruct public sellRates = feeRatesStruct( { rfi: 3, marketing: 22, autolp: 0, toSwap: 22 }); feeRatesStruct private appliedRates = buyRates; struct TotFeesPaidStruct{ uint256 rfi; uint256 toSwap; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rToSwap; uint256 tTransferAmount; uint256 tRfi; uint256 tToSwap; } event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap); event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event BlacklistedUser(address botAddress, bool indexed value); event MaxWalletAmountUpdated(uint256 amount); event ExcludeFromMaxWallet(address account, bool indexed isExcluded); modifier lockTheSwap { } constructor () { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public view 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) external onlyOwner() { } function includeInReward(address account) external onlyOwner() { } function excludeFromFee(address account) external onlyOwner { } function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { require(<FILL_ME>) _isExcludedFromMaxWallet[accounts[i]] = excluded; emit ExcludeFromMaxWallet(accounts[i], excluded); } } function includeInFee(address account) external onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { } // @dev receive ETH from UniswapV2Router when swapping receive() external payable {} function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private { } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{ } function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner { } function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner { } function setMarketingAddress(address payable _marketingAddress) external onlyOwner { } function manualSwapAndAddToLiq() external onlyOwner { } // Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1. function unblacklistSniper(address botAddress) external onlyOwner { } function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) external onlyOwner { } }
_isExcludedFromMaxWallet[accounts[i]]!=excluded,"_isExcludedFromMaxWallet already set to that value for one wallet"
342,490
_isExcludedFromMaxWallet[accounts[i]]!=excluded
"Recipient cannot hold more than maxWalletAmount"
// SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.0; /* $$$$$$$\ $$\ $$$$$$\ $$\ $$ __$$\ $$ | $$ __$$\ \__| $$ | $$ | $$$$$$\ $$$$$$\ $$ | $$\ $$ / $$ |$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$ | \____$$\ $$ __$$\ $$ | $$ | $$ | $$ |$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ | $$ | $$$$$$$ |$$ | \__|$$$$$$ / $$ | $$ |$$ | $$ |$$ |$$ / $$ |$$ | $$ | $$ | $$ |$$ __$$ |$$ | $$ _$$< $$ | $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ | $$$$$$$ |\$$$$$$$ |$$ | $$ | \$$\ $$$$$$ |$$ | $$ |$$ |\$$$$$$ |$$ | $$ | \_______/ \_______|\__| \__| \__| \______/ \__| \__|\__| \______/ \__| \__| 🔥 Launch: 20th December @ 11pm UTC Website: www.darkonion.co Telegram: @darkoniontoken Twitter: @darkoniontoken Dark-Webbing The Metaverses! ⭐️ $DARK TOKENOMICS ⭐️ 🔸 Supply: 100 Billion 🔸 Team Tokens: 3% (100% vested, 90 days) 🔸 Private Sale: 3% (50% Vested) 🔸 Liquidity Pool: 96% 🔹Starting LP: $30,000 USD. (7.6 ETH) 🔸 Tax: 10% 🔸 Reflection: 3% 🔸 Virtual Asset Wallet: 7% ❗️During the first 24 hours, sell tax is set at 25%. */ import "./Ownable.sol"; import "./IERC20.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./Address.sol"; contract DarkOnion is Context, IERC20, Ownable { using Address for address payable; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isExcludedFromMaxWallet; mapping (address => bool) public isBot; address[] private _excluded; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10**11 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public maxTxAmountBuy = _tTotal/142; uint256 public maxTxAmountSell = _tTotal/333; uint256 public maxWalletAmount = _tTotal/100; //antisnipers uint256 public liqAddedBlockNumber; uint256 public blocksToWait = 2; address payable public marketingAddress; mapping (address => bool) public isAutomatedMarketMakerPair; string private constant _name = "Dark Onion"; string private constant _symbol = "DARK"; bool private inSwapAndLiquify; IUniswapV2Router02 public UniswapV2Router; address public uniswapPair; bool public swapAndLiquifyEnabled = true; uint256 public numTokensSellToAddToLiquidity = _tTotal/500; struct feeRatesStruct { uint8 rfi; uint8 marketing; uint8 autolp; uint8 toSwap; } feeRatesStruct public buyRates = feeRatesStruct( { rfi: 3, marketing: 7, autolp: 0, toSwap: 7 }); feeRatesStruct public sellRates = feeRatesStruct( { rfi: 3, marketing: 22, autolp: 0, toSwap: 22 }); feeRatesStruct private appliedRates = buyRates; struct TotFeesPaidStruct{ uint256 rfi; uint256 toSwap; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rToSwap; uint256 tTransferAmount; uint256 tRfi; uint256 tToSwap; } event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap); event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event BlacklistedUser(address botAddress, bool indexed value); event MaxWalletAmountUpdated(uint256 amount); event ExcludeFromMaxWallet(address account, bool indexed isExcluded); modifier lockTheSwap { } constructor () { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public view 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) external onlyOwner() { } function includeInReward(address account) external onlyOwner() { } function excludeFromFee(address account) external onlyOwner { } function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner { } function includeInFee(address account) external onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { } // @dev receive ETH from UniswapV2Router when swapping receive() external payable {} function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private { } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { valuesFromGetValues memory s = _getValues(tAmount, takeFee); if (_isExcluded[sender]) { _tOwned[sender] -= tAmount; } if (_isExcluded[recipient]) { _tOwned[recipient] += s.tTransferAmount; } _rOwned[sender] -= s.rAmount; _rOwned[recipient] += s.rTransferAmount; if(takeFee) { _reflectRfi(s.rRfi, s.tRfi); _takeToSwap(s.rToSwap,s.tToSwap); emit Transfer(sender, address(this), s.tToSwap); } require(<FILL_ME>) emit Transfer(sender, recipient, s.tTransferAmount); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{ } function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner { } function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner { } function setMarketingAddress(address payable _marketingAddress) external onlyOwner { } function manualSwapAndAddToLiq() external onlyOwner { } // Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1. function unblacklistSniper(address botAddress) external onlyOwner { } function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) external onlyOwner { } }
_isExcludedFromMaxWallet[recipient]||balanceOf(recipient)<=maxWalletAmount,"Recipient cannot hold more than maxWalletAmount"
342,490
_isExcludedFromMaxWallet[recipient]||balanceOf(recipient)<=maxWalletAmount
"Automated market maker pair is already set to that value"
// SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.0; /* $$$$$$$\ $$\ $$$$$$\ $$\ $$ __$$\ $$ | $$ __$$\ \__| $$ | $$ | $$$$$$\ $$$$$$\ $$ | $$\ $$ / $$ |$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$ | \____$$\ $$ __$$\ $$ | $$ | $$ | $$ |$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ | $$ | $$$$$$$ |$$ | \__|$$$$$$ / $$ | $$ |$$ | $$ |$$ |$$ / $$ |$$ | $$ | $$ | $$ |$$ __$$ |$$ | $$ _$$< $$ | $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ | $$$$$$$ |\$$$$$$$ |$$ | $$ | \$$\ $$$$$$ |$$ | $$ |$$ |\$$$$$$ |$$ | $$ | \_______/ \_______|\__| \__| \__| \______/ \__| \__|\__| \______/ \__| \__| 🔥 Launch: 20th December @ 11pm UTC Website: www.darkonion.co Telegram: @darkoniontoken Twitter: @darkoniontoken Dark-Webbing The Metaverses! ⭐️ $DARK TOKENOMICS ⭐️ 🔸 Supply: 100 Billion 🔸 Team Tokens: 3% (100% vested, 90 days) 🔸 Private Sale: 3% (50% Vested) 🔸 Liquidity Pool: 96% 🔹Starting LP: $30,000 USD. (7.6 ETH) 🔸 Tax: 10% 🔸 Reflection: 3% 🔸 Virtual Asset Wallet: 7% ❗️During the first 24 hours, sell tax is set at 25%. */ import "./Ownable.sol"; import "./IERC20.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./Address.sol"; contract DarkOnion is Context, IERC20, Ownable { using Address for address payable; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isExcludedFromMaxWallet; mapping (address => bool) public isBot; address[] private _excluded; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10**11 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public maxTxAmountBuy = _tTotal/142; uint256 public maxTxAmountSell = _tTotal/333; uint256 public maxWalletAmount = _tTotal/100; //antisnipers uint256 public liqAddedBlockNumber; uint256 public blocksToWait = 2; address payable public marketingAddress; mapping (address => bool) public isAutomatedMarketMakerPair; string private constant _name = "Dark Onion"; string private constant _symbol = "DARK"; bool private inSwapAndLiquify; IUniswapV2Router02 public UniswapV2Router; address public uniswapPair; bool public swapAndLiquifyEnabled = true; uint256 public numTokensSellToAddToLiquidity = _tTotal/500; struct feeRatesStruct { uint8 rfi; uint8 marketing; uint8 autolp; uint8 toSwap; } feeRatesStruct public buyRates = feeRatesStruct( { rfi: 3, marketing: 7, autolp: 0, toSwap: 7 }); feeRatesStruct public sellRates = feeRatesStruct( { rfi: 3, marketing: 22, autolp: 0, toSwap: 22 }); feeRatesStruct private appliedRates = buyRates; struct TotFeesPaidStruct{ uint256 rfi; uint256 toSwap; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rToSwap; uint256 tTransferAmount; uint256 tRfi; uint256 tToSwap; } event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap); event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event BlacklistedUser(address botAddress, bool indexed value); event MaxWalletAmountUpdated(uint256 amount); event ExcludeFromMaxWallet(address account, bool indexed isExcluded); modifier lockTheSwap { } constructor () { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public view 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) external onlyOwner() { } function includeInReward(address account) external onlyOwner() { } function excludeFromFee(address account) external onlyOwner { } function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner { } function includeInFee(address account) external onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { } // @dev receive ETH from UniswapV2Router when swapping receive() external payable {} function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private { } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{ require(<FILL_ME>) isAutomatedMarketMakerPair[_pair] = value; if(value) { _isExcludedFromMaxWallet[_pair] = true; emit ExcludeFromMaxWallet(_pair, value); } emit SetAutomatedMarketMakerPair(_pair, value); } function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner { } function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner { } function setMarketingAddress(address payable _marketingAddress) external onlyOwner { } function manualSwapAndAddToLiq() external onlyOwner { } // Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1. function unblacklistSniper(address botAddress) external onlyOwner { } function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) external onlyOwner { } }
isAutomatedMarketMakerPair[_pair]!=value,"Automated market maker pair is already set to that value"
342,490
isAutomatedMarketMakerPair[_pair]!=value
"address provided is already not blacklisted"
// SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.0; /* $$$$$$$\ $$\ $$$$$$\ $$\ $$ __$$\ $$ | $$ __$$\ \__| $$ | $$ | $$$$$$\ $$$$$$\ $$ | $$\ $$ / $$ |$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$ | \____$$\ $$ __$$\ $$ | $$ | $$ | $$ |$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ | $$ | $$$$$$$ |$$ | \__|$$$$$$ / $$ | $$ |$$ | $$ |$$ |$$ / $$ |$$ | $$ | $$ | $$ |$$ __$$ |$$ | $$ _$$< $$ | $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ | $$$$$$$ |\$$$$$$$ |$$ | $$ | \$$\ $$$$$$ |$$ | $$ |$$ |\$$$$$$ |$$ | $$ | \_______/ \_______|\__| \__| \__| \______/ \__| \__|\__| \______/ \__| \__| 🔥 Launch: 20th December @ 11pm UTC Website: www.darkonion.co Telegram: @darkoniontoken Twitter: @darkoniontoken Dark-Webbing The Metaverses! ⭐️ $DARK TOKENOMICS ⭐️ 🔸 Supply: 100 Billion 🔸 Team Tokens: 3% (100% vested, 90 days) 🔸 Private Sale: 3% (50% Vested) 🔸 Liquidity Pool: 96% 🔹Starting LP: $30,000 USD. (7.6 ETH) 🔸 Tax: 10% 🔸 Reflection: 3% 🔸 Virtual Asset Wallet: 7% ❗️During the first 24 hours, sell tax is set at 25%. */ import "./Ownable.sol"; import "./IERC20.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./Address.sol"; contract DarkOnion is Context, IERC20, Ownable { using Address for address payable; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isExcludedFromMaxWallet; mapping (address => bool) public isBot; address[] private _excluded; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10**11 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public maxTxAmountBuy = _tTotal/142; uint256 public maxTxAmountSell = _tTotal/333; uint256 public maxWalletAmount = _tTotal/100; //antisnipers uint256 public liqAddedBlockNumber; uint256 public blocksToWait = 2; address payable public marketingAddress; mapping (address => bool) public isAutomatedMarketMakerPair; string private constant _name = "Dark Onion"; string private constant _symbol = "DARK"; bool private inSwapAndLiquify; IUniswapV2Router02 public UniswapV2Router; address public uniswapPair; bool public swapAndLiquifyEnabled = true; uint256 public numTokensSellToAddToLiquidity = _tTotal/500; struct feeRatesStruct { uint8 rfi; uint8 marketing; uint8 autolp; uint8 toSwap; } feeRatesStruct public buyRates = feeRatesStruct( { rfi: 3, marketing: 7, autolp: 0, toSwap: 7 }); feeRatesStruct public sellRates = feeRatesStruct( { rfi: 3, marketing: 22, autolp: 0, toSwap: 22 }); feeRatesStruct private appliedRates = buyRates; struct TotFeesPaidStruct{ uint256 rfi; uint256 toSwap; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rToSwap; uint256 tTransferAmount; uint256 tRfi; uint256 tToSwap; } event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap); event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event BlacklistedUser(address botAddress, bool indexed value); event MaxWalletAmountUpdated(uint256 amount); event ExcludeFromMaxWallet(address account, bool indexed isExcluded); modifier lockTheSwap { } constructor () { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public view 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) external onlyOwner() { } function includeInReward(address account) external onlyOwner() { } function excludeFromFee(address account) external onlyOwner { } function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner { } function includeInFee(address account) external onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { } // @dev receive ETH from UniswapV2Router when swapping receive() external payable {} function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private { } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{ } function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner { } function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner { } function setMarketingAddress(address payable _marketingAddress) external onlyOwner { } function manualSwapAndAddToLiq() external onlyOwner { } // Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1. function unblacklistSniper(address botAddress) external onlyOwner { require(<FILL_ME>) isBot[botAddress] = false; emit BlacklistedUser(botAddress,false); } function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) external onlyOwner { } }
!isBot[botAddress],"address provided is already not blacklisted"
342,490
!isBot[botAddress]
"_isExcludedFromMaxWallet already set to that value"
// SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.0; /* $$$$$$$\ $$\ $$$$$$\ $$\ $$ __$$\ $$ | $$ __$$\ \__| $$ | $$ | $$$$$$\ $$$$$$\ $$ | $$\ $$ / $$ |$$$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$ | $$ | \____$$\ $$ __$$\ $$ | $$ | $$ | $$ |$$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ | $$ | $$$$$$$ |$$ | \__|$$$$$$ / $$ | $$ |$$ | $$ |$$ |$$ / $$ |$$ | $$ | $$ | $$ |$$ __$$ |$$ | $$ _$$< $$ | $$ |$$ | $$ |$$ |$$ | $$ |$$ | $$ | $$$$$$$ |\$$$$$$$ |$$ | $$ | \$$\ $$$$$$ |$$ | $$ |$$ |\$$$$$$ |$$ | $$ | \_______/ \_______|\__| \__| \__| \______/ \__| \__|\__| \______/ \__| \__| 🔥 Launch: 20th December @ 11pm UTC Website: www.darkonion.co Telegram: @darkoniontoken Twitter: @darkoniontoken Dark-Webbing The Metaverses! ⭐️ $DARK TOKENOMICS ⭐️ 🔸 Supply: 100 Billion 🔸 Team Tokens: 3% (100% vested, 90 days) 🔸 Private Sale: 3% (50% Vested) 🔸 Liquidity Pool: 96% 🔹Starting LP: $30,000 USD. (7.6 ETH) 🔸 Tax: 10% 🔸 Reflection: 3% 🔸 Virtual Asset Wallet: 7% ❗️During the first 24 hours, sell tax is set at 25%. */ import "./Ownable.sol"; import "./IERC20.sol"; import "./IUniswapV2Router02.sol"; import "./IUniswapV2Factory.sol"; import "./Address.sol"; contract DarkOnion is Context, IERC20, Ownable { using Address for address payable; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private _isExcludedFromMaxWallet; mapping (address => bool) public isBot; address[] private _excluded; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10**11 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public maxTxAmountBuy = _tTotal/142; uint256 public maxTxAmountSell = _tTotal/333; uint256 public maxWalletAmount = _tTotal/100; //antisnipers uint256 public liqAddedBlockNumber; uint256 public blocksToWait = 2; address payable public marketingAddress; mapping (address => bool) public isAutomatedMarketMakerPair; string private constant _name = "Dark Onion"; string private constant _symbol = "DARK"; bool private inSwapAndLiquify; IUniswapV2Router02 public UniswapV2Router; address public uniswapPair; bool public swapAndLiquifyEnabled = true; uint256 public numTokensSellToAddToLiquidity = _tTotal/500; struct feeRatesStruct { uint8 rfi; uint8 marketing; uint8 autolp; uint8 toSwap; } feeRatesStruct public buyRates = feeRatesStruct( { rfi: 3, marketing: 7, autolp: 0, toSwap: 7 }); feeRatesStruct public sellRates = feeRatesStruct( { rfi: 3, marketing: 22, autolp: 0, toSwap: 22 }); feeRatesStruct private appliedRates = buyRates; struct TotFeesPaidStruct{ uint256 rfi; uint256 toSwap; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rToSwap; uint256 tTransferAmount; uint256 tRfi; uint256 tToSwap; } event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap); event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event BlacklistedUser(address botAddress, bool indexed value); event MaxWalletAmountUpdated(uint256 amount); event ExcludeFromMaxWallet(address account, bool indexed isExcluded); modifier lockTheSwap { } constructor () { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public view 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) external onlyOwner() { } function includeInReward(address account) external onlyOwner() { } function excludeFromFee(address account) external onlyOwner { } function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner { } function includeInFee(address account) external onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { } // @dev receive ETH from UniswapV2Router when swapping receive() external payable {} function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private { } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{ } function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner { } function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner { } function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner { } function setMarketingAddress(address payable _marketingAddress) external onlyOwner { } function manualSwapAndAddToLiq() external onlyOwner { } // Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1. function unblacklistSniper(address botAddress) external onlyOwner { } function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) external onlyOwner { require(<FILL_ME>) _isExcludedFromMaxWallet[account] = excluded; emit ExcludeFromMaxWallet(account, excluded); } }
_isExcludedFromMaxWallet[account]!=excluded,"_isExcludedFromMaxWallet already set to that value"
342,490
_isExcludedFromMaxWallet[account]!=excluded
"msg.sender is not a signer"
// SPDX-License-Identifier: MIT // this is copied from MintableOwnableToken // https://etherscan.io/address/0x987a4d3edbe363bc351771bb8abdf2a332a19131#code // modified by TART-tokyo pragma solidity =0.8.6; import "../interface/iSignerRole.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; contract SignerRole is iSignerRole, AccessControlEnumerable { bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); constructor() { } modifier onlySigner() { require(<FILL_ME>) _; } function isSigner(address account) public override view returns (bool) { } }
isSigner(msg.sender),"msg.sender is not a signer"
342,552
isSigner(msg.sender)
"Mint limit exceeded"
// ██████ ██████ ██████ ███ ███ ███████ ██████ █████ ██ ██ ██ ██ // ██ ██ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██ ██ ██ ██ ██ ████ ██ ███████ ██ ██ ███████ ████ ███ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ██████ ██████ ██ ██ ███████ ██████ ██ ██ ██ ██ ██ // // ------------------------------------------------------------------------------ // // THE PRODUCER NFT COLLECTION // // X // // HALEEK MAUL // // ------------------------------------------------------------------------------ pragma solidity >=0.7.0 <0.9.0; contract DoomsdayXProducer is ERC721, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply; string public uriPrefix = "ipfs://QmQpuqvuAfcqdhLuAc3Xj2uJzjt1auW6a9YSNA87nigR4X/"; string public uriSuffix = ".json"; uint256 public cost = 0.2 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmountPerTx = 5; uint256 public mintPerAddress = 5; bool public paused = true; mapping(address => uint256) public minted; constructor() ERC721("DOOMSDAYX Gen 01: Haleek Maul Producer NFT", "DOOMSDAYX_01") { } modifier mintCompliance(uint256 _mintAmount) { } function totalSupply() public view returns (uint256) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { require(!paused, "The contract is paused!"); require(msg.value >= cost * _mintAmount, "Insufficient funds!"); require(<FILL_ME>) minted[msg.sender] += _mintAmount; _mintLoop(msg.sender, _mintAmount); } // Can be used by contract owner to mint freely (max of 5 per tx) function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function burn(uint256 tokenId) public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setMintPerAddress(uint256 _mintPerAddress) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function _baseURI() internal view virtual override returns (string memory) { } }
minted[msg.sender]+_mintAmount<=mintPerAddress,"Mint limit exceeded"
342,573
minted[msg.sender]+_mintAmount<=mintPerAddress
"HARDCORE: liquidVault + burnPercentage incorrect sets"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./facades/ERC20Like.sol"; contract FeeDistributor is Ownable { using SafeMath for uint; ERC20Like public hcore; struct FeeRecipient { address liquidVault; address dev; uint256 liquidVaultShare; //percentage between 0 and 100 uint256 burnPercentage; } FeeRecipient public recipients; bool public initialized; modifier seeded { } function seed( address hardCore, address liquidVault, address dev, uint256 liquidVaultShare, uint256 burnPercentage ) public onlyOwner { require(<FILL_ME>) hcore = ERC20Like(hardCore); recipients.liquidVault = liquidVault; recipients.dev = dev; recipients.liquidVaultShare = liquidVaultShare; recipients.burnPercentage = burnPercentage; initialized = true; } function distributeFees() public seeded { } }
liquidVaultShare.add(burnPercentage)<=100,"HARDCORE: liquidVault + burnPercentage incorrect sets"
342,735
liquidVaultShare.add(burnPercentage)<=100
"HARDCORE: transfer to liquidVault failed"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./facades/ERC20Like.sol"; contract FeeDistributor is Ownable { using SafeMath for uint; ERC20Like public hcore; struct FeeRecipient { address liquidVault; address dev; uint256 liquidVaultShare; //percentage between 0 and 100 uint256 burnPercentage; } FeeRecipient public recipients; bool public initialized; modifier seeded { } function seed( address hardCore, address liquidVault, address dev, uint256 liquidVaultShare, uint256 burnPercentage ) public onlyOwner { } function distributeFees() public seeded { uint256 balance = hcore.balanceOf(address(this)); if (balance < 100) { return; } uint256 liquidShare; uint256 burningShare; if (recipients.liquidVaultShare > 0) { liquidShare = recipients.liquidVaultShare.mul(balance).div(100); require(<FILL_ME>) } if (recipients.burnPercentage > 0) { burningShare = recipients.burnPercentage.mul(balance).div(100); hcore.burn(burningShare); } require( hcore.transfer(recipients.dev, balance.sub(liquidShare).sub(burningShare)), "HARDCORE: transfer to dev failed" ); } }
hcore.transfer(recipients.liquidVault,liquidShare),"HARDCORE: transfer to liquidVault failed"
342,735
hcore.transfer(recipients.liquidVault,liquidShare)
"HARDCORE: transfer to dev failed"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./facades/ERC20Like.sol"; contract FeeDistributor is Ownable { using SafeMath for uint; ERC20Like public hcore; struct FeeRecipient { address liquidVault; address dev; uint256 liquidVaultShare; //percentage between 0 and 100 uint256 burnPercentage; } FeeRecipient public recipients; bool public initialized; modifier seeded { } function seed( address hardCore, address liquidVault, address dev, uint256 liquidVaultShare, uint256 burnPercentage ) public onlyOwner { } function distributeFees() public seeded { uint256 balance = hcore.balanceOf(address(this)); if (balance < 100) { return; } uint256 liquidShare; uint256 burningShare; if (recipients.liquidVaultShare > 0) { liquidShare = recipients.liquidVaultShare.mul(balance).div(100); require( hcore.transfer(recipients.liquidVault, liquidShare), "HARDCORE: transfer to liquidVault failed" ); } if (recipients.burnPercentage > 0) { burningShare = recipients.burnPercentage.mul(balance).div(100); hcore.burn(burningShare); } require(<FILL_ME>) } }
hcore.transfer(recipients.dev,balance.sub(liquidShare).sub(burningShare)),"HARDCORE: transfer to dev failed"
342,735
hcore.transfer(recipients.dev,balance.sub(liquidShare).sub(burningShare))
null
pragma solidity ^0.4.24; contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } function imin(int x, int y) internal pure returns (int z) { } function imax(int x, int y) internal pure returns (int z) { } uint constant WAD = 10 ** 18; uint constant RAY = 10 ** 27; function wmul(uint x, uint y) internal pure returns (uint z) { } function rmul(uint x, uint y) internal pure returns (uint z) { } function wdiv(uint x, uint y) internal pure returns (uint z) { } function rdiv(uint x, uint y) internal pure returns (uint z) { } function rpow(uint x, uint n) internal pure returns (uint z) { } } contract Bank is DSMath { mapping(address => uint) public balances; event LogDepositMade(address accountAddress, uint amount); function deposit() public payable returns (uint balance) { } function withdraw(uint amount) public returns (uint remainingBalance){ require(<FILL_ME>) balances[msg.sender] = sub(balances[msg.sender],amount); msg.sender.transfer(amount); return balances[msg.sender]; } function balance() view public returns (uint) { } } contract OwnsArt is DSMath, Bank{ address public artist; address public artOwner; uint public price; uint public resaleFee; uint public constant maxFlatIncreaseAmount = 0.01 ether; uint public constant maxPercentIncreaseAmount = 10; event LogArtBought(address purchaserAddress, uint price, uint resalePrice); bool private buyArtMutex = false; constructor() public { } function buyArt(uint maxBid, uint resalePrice) public returns (uint){ } function maxResalePrice() view public returns (uint){ } }
min(amount,balances[msg.sender])==amount
342,962
min(amount,balances[msg.sender])==amount
null
pragma solidity ^0.4.24; contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } function imin(int x, int y) internal pure returns (int z) { } function imax(int x, int y) internal pure returns (int z) { } uint constant WAD = 10 ** 18; uint constant RAY = 10 ** 27; function wmul(uint x, uint y) internal pure returns (uint z) { } function rmul(uint x, uint y) internal pure returns (uint z) { } function wdiv(uint x, uint y) internal pure returns (uint z) { } function rdiv(uint x, uint y) internal pure returns (uint z) { } function rpow(uint x, uint n) internal pure returns (uint z) { } } contract Bank is DSMath { mapping(address => uint) public balances; event LogDepositMade(address accountAddress, uint amount); function deposit() public payable returns (uint balance) { } function withdraw(uint amount) public returns (uint remainingBalance){ } function balance() view public returns (uint) { } } contract OwnsArt is DSMath, Bank{ address public artist; address public artOwner; uint public price; uint public resaleFee; uint public constant maxFlatIncreaseAmount = 0.01 ether; uint public constant maxPercentIncreaseAmount = 10; event LogArtBought(address purchaserAddress, uint price, uint resalePrice); bool private buyArtMutex = false; constructor() public { } function buyArt(uint maxBid, uint resalePrice) public returns (uint){ require(msg.sender != artOwner); require(<FILL_ME>) require(min(maxBid,balances[msg.sender]) == maxBid); require(min(resalePrice,maxResalePrice()) == resalePrice); require(!buyArtMutex); buyArtMutex = true; balances[msg.sender] = sub(balances[msg.sender],price); balances[artOwner] = add(balances[artOwner],sub(price,resaleFee)); balances[artist] = add(balances[artist],resaleFee); artOwner = msg.sender; if(min(resalePrice,price)==resalePrice){ resaleFee = 0 ether; } else{ resaleFee = rdiv(sub(resalePrice,price),2*RAY); } emit LogArtBought(msg.sender,price,resalePrice); price = resalePrice; buyArtMutex = false; return balances[msg.sender]; } function maxResalePrice() view public returns (uint){ } }
max(maxBid,price)==maxBid
342,962
max(maxBid,price)==maxBid
null
pragma solidity ^0.4.24; contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } function imin(int x, int y) internal pure returns (int z) { } function imax(int x, int y) internal pure returns (int z) { } uint constant WAD = 10 ** 18; uint constant RAY = 10 ** 27; function wmul(uint x, uint y) internal pure returns (uint z) { } function rmul(uint x, uint y) internal pure returns (uint z) { } function wdiv(uint x, uint y) internal pure returns (uint z) { } function rdiv(uint x, uint y) internal pure returns (uint z) { } function rpow(uint x, uint n) internal pure returns (uint z) { } } contract Bank is DSMath { mapping(address => uint) public balances; event LogDepositMade(address accountAddress, uint amount); function deposit() public payable returns (uint balance) { } function withdraw(uint amount) public returns (uint remainingBalance){ } function balance() view public returns (uint) { } } contract OwnsArt is DSMath, Bank{ address public artist; address public artOwner; uint public price; uint public resaleFee; uint public constant maxFlatIncreaseAmount = 0.01 ether; uint public constant maxPercentIncreaseAmount = 10; event LogArtBought(address purchaserAddress, uint price, uint resalePrice); bool private buyArtMutex = false; constructor() public { } function buyArt(uint maxBid, uint resalePrice) public returns (uint){ require(msg.sender != artOwner); require(max(maxBid,price) == maxBid); require(<FILL_ME>) require(min(resalePrice,maxResalePrice()) == resalePrice); require(!buyArtMutex); buyArtMutex = true; balances[msg.sender] = sub(balances[msg.sender],price); balances[artOwner] = add(balances[artOwner],sub(price,resaleFee)); balances[artist] = add(balances[artist],resaleFee); artOwner = msg.sender; if(min(resalePrice,price)==resalePrice){ resaleFee = 0 ether; } else{ resaleFee = rdiv(sub(resalePrice,price),2*RAY); } emit LogArtBought(msg.sender,price,resalePrice); price = resalePrice; buyArtMutex = false; return balances[msg.sender]; } function maxResalePrice() view public returns (uint){ } }
min(maxBid,balances[msg.sender])==maxBid
342,962
min(maxBid,balances[msg.sender])==maxBid
null
pragma solidity ^0.4.24; contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } function imin(int x, int y) internal pure returns (int z) { } function imax(int x, int y) internal pure returns (int z) { } uint constant WAD = 10 ** 18; uint constant RAY = 10 ** 27; function wmul(uint x, uint y) internal pure returns (uint z) { } function rmul(uint x, uint y) internal pure returns (uint z) { } function wdiv(uint x, uint y) internal pure returns (uint z) { } function rdiv(uint x, uint y) internal pure returns (uint z) { } function rpow(uint x, uint n) internal pure returns (uint z) { } } contract Bank is DSMath { mapping(address => uint) public balances; event LogDepositMade(address accountAddress, uint amount); function deposit() public payable returns (uint balance) { } function withdraw(uint amount) public returns (uint remainingBalance){ } function balance() view public returns (uint) { } } contract OwnsArt is DSMath, Bank{ address public artist; address public artOwner; uint public price; uint public resaleFee; uint public constant maxFlatIncreaseAmount = 0.01 ether; uint public constant maxPercentIncreaseAmount = 10; event LogArtBought(address purchaserAddress, uint price, uint resalePrice); bool private buyArtMutex = false; constructor() public { } function buyArt(uint maxBid, uint resalePrice) public returns (uint){ require(msg.sender != artOwner); require(max(maxBid,price) == maxBid); require(min(maxBid,balances[msg.sender]) == maxBid); require(<FILL_ME>) require(!buyArtMutex); buyArtMutex = true; balances[msg.sender] = sub(balances[msg.sender],price); balances[artOwner] = add(balances[artOwner],sub(price,resaleFee)); balances[artist] = add(balances[artist],resaleFee); artOwner = msg.sender; if(min(resalePrice,price)==resalePrice){ resaleFee = 0 ether; } else{ resaleFee = rdiv(sub(resalePrice,price),2*RAY); } emit LogArtBought(msg.sender,price,resalePrice); price = resalePrice; buyArtMutex = false; return balances[msg.sender]; } function maxResalePrice() view public returns (uint){ } }
min(resalePrice,maxResalePrice())==resalePrice
342,962
min(resalePrice,maxResalePrice())==resalePrice
null
pragma solidity ^0.4.24; contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } function imin(int x, int y) internal pure returns (int z) { } function imax(int x, int y) internal pure returns (int z) { } uint constant WAD = 10 ** 18; uint constant RAY = 10 ** 27; function wmul(uint x, uint y) internal pure returns (uint z) { } function rmul(uint x, uint y) internal pure returns (uint z) { } function wdiv(uint x, uint y) internal pure returns (uint z) { } function rdiv(uint x, uint y) internal pure returns (uint z) { } function rpow(uint x, uint n) internal pure returns (uint z) { } } contract Bank is DSMath { mapping(address => uint) public balances; event LogDepositMade(address accountAddress, uint amount); function deposit() public payable returns (uint balance) { } function withdraw(uint amount) public returns (uint remainingBalance){ } function balance() view public returns (uint) { } } contract OwnsArt is DSMath, Bank{ address public artist; address public artOwner; uint public price; uint public resaleFee; uint public constant maxFlatIncreaseAmount = 0.01 ether; uint public constant maxPercentIncreaseAmount = 10; event LogArtBought(address purchaserAddress, uint price, uint resalePrice); bool private buyArtMutex = false; constructor() public { } function buyArt(uint maxBid, uint resalePrice) public returns (uint){ require(msg.sender != artOwner); require(max(maxBid,price) == maxBid); require(min(maxBid,balances[msg.sender]) == maxBid); require(min(resalePrice,maxResalePrice()) == resalePrice); require(<FILL_ME>) buyArtMutex = true; balances[msg.sender] = sub(balances[msg.sender],price); balances[artOwner] = add(balances[artOwner],sub(price,resaleFee)); balances[artist] = add(balances[artist],resaleFee); artOwner = msg.sender; if(min(resalePrice,price)==resalePrice){ resaleFee = 0 ether; } else{ resaleFee = rdiv(sub(resalePrice,price),2*RAY); } emit LogArtBought(msg.sender,price,resalePrice); price = resalePrice; buyArtMutex = false; return balances[msg.sender]; } function maxResalePrice() view public returns (uint){ } }
!buyArtMutex
342,962
!buyArtMutex
"Not enough Bikerz remaining to mint"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; /* CHAIN BIKERZ - EXCITE WHITELIST NFT GAME */ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface animations { function draw(uint256 tokenId, uint256 pts) external view returns (string memory); } contract BikerzExcite is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; uint8 private tricks; uint256 public maxBikerz; uint256 public maxGiftedBikerz; uint256 public maxFreeBikerz; uint256 public numGiftedBikerz; uint256 public cooldown = 6000; uint256 public constant PUBLIC_SALE_PRICE = 0.02 ether; uint256 public startBlock; uint8 public MAX_PER_WALLET = 5; uint8 public MAX_FREE_PER_WALLET = 2; string private randomizer; animations[9] private animationAddress; uint256[9] private pointValues; struct Score { uint256 currentTrick; uint256 pts; } mapping (uint256 => Score) public scoreMap; modifier canMintBikerz(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier canMintFreeBikerz(uint256 numberOfTokens) { } modifier canGiftBikerz(uint256 num) { } constructor( uint256 _maxBikerz, uint256 _maxGiftedBikerz, uint256 _maxFreeBikerz, animations[9] memory createTricks, uint256[9] memory vals ) ERC721("Bikerz Excite", "BIKERZ") { } function resetData (animations[9] memory createTricks, uint256[9] memory vals, string memory randomizePhrase) public onlyOwner { } function setRandomizer(string memory str) public onlyOwner { } function setCooldown(uint256 cd) public onlyOwner { } function setMetadataAddress(animations[9] memory addrs) public onlyOwner { } function setPointValues(uint256[9] memory values) public onlyOwner { } modifier maxBikerzPerWallet(uint256 numberOfTokens) { } modifier maxFreeBikerzPerWallet(uint256 numberOfTokens) { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } function mintFree(uint256 numberOfTokens) external nonReentrant canMintFreeBikerz(numberOfTokens) maxFreeBikerzPerWallet(numberOfTokens) { } function mint(uint256 numberOfTokens) external nonReentrant payable canMintBikerz(numberOfTokens) maxBikerzPerWallet(numberOfTokens) isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function toString(uint256 value) public pure returns (string memory) { } function randomizeTrick(uint256 tokenId) private view returns (uint256){ } function trick(uint256 tokenId) private view returns (uint256) { } function saveAllPoints() public onlyOwner { } function savePoints(uint256 tokenId) private onlyOwner { } function giftBikerz(address[] calldata addresses) external nonReentrant onlyOwner canGiftBikerz(addresses.length) { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } function nextTokenId() private returns (uint256) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
tokenCounter.current()+numberOfTokens<=maxBikerz-maxGiftedBikerz,"Not enough Bikerz remaining to mint"
342,994
tokenCounter.current()+numberOfTokens<=maxBikerz-maxGiftedBikerz
"Not enough Free Bikerz remaining to mint"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; /* CHAIN BIKERZ - EXCITE WHITELIST NFT GAME */ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface animations { function draw(uint256 tokenId, uint256 pts) external view returns (string memory); } contract BikerzExcite is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; uint8 private tricks; uint256 public maxBikerz; uint256 public maxGiftedBikerz; uint256 public maxFreeBikerz; uint256 public numGiftedBikerz; uint256 public cooldown = 6000; uint256 public constant PUBLIC_SALE_PRICE = 0.02 ether; uint256 public startBlock; uint8 public MAX_PER_WALLET = 5; uint8 public MAX_FREE_PER_WALLET = 2; string private randomizer; animations[9] private animationAddress; uint256[9] private pointValues; struct Score { uint256 currentTrick; uint256 pts; } mapping (uint256 => Score) public scoreMap; modifier canMintBikerz(uint256 numberOfTokens) { } modifier canMintFreeBikerz(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier canGiftBikerz(uint256 num) { } constructor( uint256 _maxBikerz, uint256 _maxGiftedBikerz, uint256 _maxFreeBikerz, animations[9] memory createTricks, uint256[9] memory vals ) ERC721("Bikerz Excite", "BIKERZ") { } function resetData (animations[9] memory createTricks, uint256[9] memory vals, string memory randomizePhrase) public onlyOwner { } function setRandomizer(string memory str) public onlyOwner { } function setCooldown(uint256 cd) public onlyOwner { } function setMetadataAddress(animations[9] memory addrs) public onlyOwner { } function setPointValues(uint256[9] memory values) public onlyOwner { } modifier maxBikerzPerWallet(uint256 numberOfTokens) { } modifier maxFreeBikerzPerWallet(uint256 numberOfTokens) { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } function mintFree(uint256 numberOfTokens) external nonReentrant canMintFreeBikerz(numberOfTokens) maxFreeBikerzPerWallet(numberOfTokens) { } function mint(uint256 numberOfTokens) external nonReentrant payable canMintBikerz(numberOfTokens) maxBikerzPerWallet(numberOfTokens) isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function toString(uint256 value) public pure returns (string memory) { } function randomizeTrick(uint256 tokenId) private view returns (uint256){ } function trick(uint256 tokenId) private view returns (uint256) { } function saveAllPoints() public onlyOwner { } function savePoints(uint256 tokenId) private onlyOwner { } function giftBikerz(address[] calldata addresses) external nonReentrant onlyOwner canGiftBikerz(addresses.length) { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } function nextTokenId() private returns (uint256) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
tokenCounter.current()+numberOfTokens<=maxFreeBikerz,"Not enough Free Bikerz remaining to mint"
342,994
tokenCounter.current()+numberOfTokens<=maxFreeBikerz
"Not enough Bikerz remaining to gift"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; /* CHAIN BIKERZ - EXCITE WHITELIST NFT GAME */ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface animations { function draw(uint256 tokenId, uint256 pts) external view returns (string memory); } contract BikerzExcite is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; uint8 private tricks; uint256 public maxBikerz; uint256 public maxGiftedBikerz; uint256 public maxFreeBikerz; uint256 public numGiftedBikerz; uint256 public cooldown = 6000; uint256 public constant PUBLIC_SALE_PRICE = 0.02 ether; uint256 public startBlock; uint8 public MAX_PER_WALLET = 5; uint8 public MAX_FREE_PER_WALLET = 2; string private randomizer; animations[9] private animationAddress; uint256[9] private pointValues; struct Score { uint256 currentTrick; uint256 pts; } mapping (uint256 => Score) public scoreMap; modifier canMintBikerz(uint256 numberOfTokens) { } modifier canMintFreeBikerz(uint256 numberOfTokens) { } modifier canGiftBikerz(uint256 num) { require(<FILL_ME>) require( tokenCounter.current() + num <= maxBikerz, "Not enough Bikerz remaining to mint" ); _; } constructor( uint256 _maxBikerz, uint256 _maxGiftedBikerz, uint256 _maxFreeBikerz, animations[9] memory createTricks, uint256[9] memory vals ) ERC721("Bikerz Excite", "BIKERZ") { } function resetData (animations[9] memory createTricks, uint256[9] memory vals, string memory randomizePhrase) public onlyOwner { } function setRandomizer(string memory str) public onlyOwner { } function setCooldown(uint256 cd) public onlyOwner { } function setMetadataAddress(animations[9] memory addrs) public onlyOwner { } function setPointValues(uint256[9] memory values) public onlyOwner { } modifier maxBikerzPerWallet(uint256 numberOfTokens) { } modifier maxFreeBikerzPerWallet(uint256 numberOfTokens) { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } function mintFree(uint256 numberOfTokens) external nonReentrant canMintFreeBikerz(numberOfTokens) maxFreeBikerzPerWallet(numberOfTokens) { } function mint(uint256 numberOfTokens) external nonReentrant payable canMintBikerz(numberOfTokens) maxBikerzPerWallet(numberOfTokens) isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function toString(uint256 value) public pure returns (string memory) { } function randomizeTrick(uint256 tokenId) private view returns (uint256){ } function trick(uint256 tokenId) private view returns (uint256) { } function saveAllPoints() public onlyOwner { } function savePoints(uint256 tokenId) private onlyOwner { } function giftBikerz(address[] calldata addresses) external nonReentrant onlyOwner canGiftBikerz(addresses.length) { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } function nextTokenId() private returns (uint256) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
numGiftedBikerz+num<=maxGiftedBikerz,"Not enough Bikerz remaining to gift"
342,994
numGiftedBikerz+num<=maxGiftedBikerz
"Not enough Bikerz remaining to mint"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; /* CHAIN BIKERZ - EXCITE WHITELIST NFT GAME */ import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface animations { function draw(uint256 tokenId, uint256 pts) external view returns (string memory); } contract BikerzExcite is ERC721, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; uint8 private tricks; uint256 public maxBikerz; uint256 public maxGiftedBikerz; uint256 public maxFreeBikerz; uint256 public numGiftedBikerz; uint256 public cooldown = 6000; uint256 public constant PUBLIC_SALE_PRICE = 0.02 ether; uint256 public startBlock; uint8 public MAX_PER_WALLET = 5; uint8 public MAX_FREE_PER_WALLET = 2; string private randomizer; animations[9] private animationAddress; uint256[9] private pointValues; struct Score { uint256 currentTrick; uint256 pts; } mapping (uint256 => Score) public scoreMap; modifier canMintBikerz(uint256 numberOfTokens) { } modifier canMintFreeBikerz(uint256 numberOfTokens) { } modifier canGiftBikerz(uint256 num) { require( numGiftedBikerz + num <= maxGiftedBikerz, "Not enough Bikerz remaining to gift" ); require(<FILL_ME>) _; } constructor( uint256 _maxBikerz, uint256 _maxGiftedBikerz, uint256 _maxFreeBikerz, animations[9] memory createTricks, uint256[9] memory vals ) ERC721("Bikerz Excite", "BIKERZ") { } function resetData (animations[9] memory createTricks, uint256[9] memory vals, string memory randomizePhrase) public onlyOwner { } function setRandomizer(string memory str) public onlyOwner { } function setCooldown(uint256 cd) public onlyOwner { } function setMetadataAddress(animations[9] memory addrs) public onlyOwner { } function setPointValues(uint256[9] memory values) public onlyOwner { } modifier maxBikerzPerWallet(uint256 numberOfTokens) { } modifier maxFreeBikerzPerWallet(uint256 numberOfTokens) { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } function mintFree(uint256 numberOfTokens) external nonReentrant canMintFreeBikerz(numberOfTokens) maxFreeBikerzPerWallet(numberOfTokens) { } function mint(uint256 numberOfTokens) external nonReentrant payable canMintBikerz(numberOfTokens) maxBikerzPerWallet(numberOfTokens) isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } function toString(uint256 value) public pure returns (string memory) { } function randomizeTrick(uint256 tokenId) private view returns (uint256){ } function trick(uint256 tokenId) private view returns (uint256) { } function saveAllPoints() public onlyOwner { } function savePoints(uint256 tokenId) private onlyOwner { } function giftBikerz(address[] calldata addresses) external nonReentrant onlyOwner canGiftBikerz(addresses.length) { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } function nextTokenId() private returns (uint256) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
tokenCounter.current()+num<=maxBikerz,"Not enough Bikerz remaining to mint"
342,994
tokenCounter.current()+num<=maxBikerz
"you're trying to cheat!"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/IShatteredEON.sol"; import "./interfaces/IPytheas.sol"; import "./interfaces/IOrbitalBlockade.sol"; import "./interfaces/IColonist.sol"; import "./interfaces/ITColonist.sol"; import "./interfaces/IEON.sol"; import "./interfaces/IRAW.sol"; import "./interfaces/IImperialGuild.sol"; import "./interfaces/IRandomizer.sol"; contract ShatteredEON is IShatteredEON, Pausable { uint256 public OnosiaLiquorId; uint256 public constant maxRawEonCost = 250000; //250k rEON uint256 public constant maxEonCost = 200000 ether; //200k EON address public auth; bool public eonOnlyActive; // address => can call setters mapping(address => bool) private admins; event newUser(address newUser); bytes32 internal entropySauce; // reference to Pytheas for mint and stake of colonist IPytheas public pytheas; //reference to the oribitalBlockade of pirates for choosing random theives IOrbitalBlockade public orbital; // reference to $rEON for minting and refining IRAW public raw; // reference to refined EON for mininting and burning IEON public EON; // reference to colonist traits ITColonist public colTraits; // reference to the colonist NFT collection IColonist public colonistNFT; // reference to the galactic imperialGuild collection IImperialGuild public imperialGuild; //randy the randomizer IRandomizer public randomizer; constructor() { } modifier noCheaters() { uint256 size = 0; address acc = msg.sender; assembly { size := extcodesize(acc) } require(<FILL_ME>) _; // We'll use the last caller hash to add entropy to next caller entropySauce = keccak256(abi.encodePacked(acc, block.coinbase)); } modifier onlyOwner() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { } function setContracts( address _rEON, address _EON, address _colTraits, address _colonistNFT, address _pytheas, address _orbital, address _imperialGuild, address _randomizer ) external onlyOwner { } /** EXTERNAL */ /** Mint colonist. Payable with either rEON or EON after gen 0. * payments scaled accordingly *bool rayPayment = rEON payment */ function mintColonist( uint256 amount, uint8 paymentId, bool stake ) external noCheaters { } /** * @param tokenId the ID to check the cost of to mint * @return the cost of the given token ID */ function rawMintCost(uint256 tokenId, uint256 maxTokens) public pure returns (uint256) { } function EONmintCost(uint256 tokenId, uint256 maxTokens) public pure returns (uint256) { } /** INTERNAL */ /** * the first 10k go to the minter * the remaining 50k have a 10% chance to be given to a random staked pirate * @param seed a random value to select a recipient from * @return the address of the recipient (either the minter or the pirate thief's owner) */ function selectRecipient(uint256 seed) internal view returns (address) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } function setOnosiaLiquorId(uint256 typeId) external onlyOwner { } function setEonOnly(bool _eonOnlyActive) external onlyOwner { } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { } function transferOwnership(address newOwner) external onlyOwner { } function random(address origin, bytes32 blockies, bytes32 sauce, uint16 seed, uint256 blockTime) internal pure returns (uint256) { } }
admins[msg.sender]||(msg.sender==tx.origin&&size==0),"you're trying to cheat!"
343,030
admins[msg.sender]||(msg.sender==tx.origin&&size==0)
"Contracts not set"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/IShatteredEON.sol"; import "./interfaces/IPytheas.sol"; import "./interfaces/IOrbitalBlockade.sol"; import "./interfaces/IColonist.sol"; import "./interfaces/ITColonist.sol"; import "./interfaces/IEON.sol"; import "./interfaces/IRAW.sol"; import "./interfaces/IImperialGuild.sol"; import "./interfaces/IRandomizer.sol"; contract ShatteredEON is IShatteredEON, Pausable { uint256 public OnosiaLiquorId; uint256 public constant maxRawEonCost = 250000; //250k rEON uint256 public constant maxEonCost = 200000 ether; //200k EON address public auth; bool public eonOnlyActive; // address => can call setters mapping(address => bool) private admins; event newUser(address newUser); bytes32 internal entropySauce; // reference to Pytheas for mint and stake of colonist IPytheas public pytheas; //reference to the oribitalBlockade of pirates for choosing random theives IOrbitalBlockade public orbital; // reference to $rEON for minting and refining IRAW public raw; // reference to refined EON for mininting and burning IEON public EON; // reference to colonist traits ITColonist public colTraits; // reference to the colonist NFT collection IColonist public colonistNFT; // reference to the galactic imperialGuild collection IImperialGuild public imperialGuild; //randy the randomizer IRandomizer public randomizer; constructor() { } modifier noCheaters() { } modifier onlyOwner() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { require(<FILL_ME>) _; } function setContracts( address _rEON, address _EON, address _colTraits, address _colonistNFT, address _pytheas, address _orbital, address _imperialGuild, address _randomizer ) external onlyOwner { } /** EXTERNAL */ /** Mint colonist. Payable with either rEON or EON after gen 0. * payments scaled accordingly *bool rayPayment = rEON payment */ function mintColonist( uint256 amount, uint8 paymentId, bool stake ) external noCheaters { } /** * @param tokenId the ID to check the cost of to mint * @return the cost of the given token ID */ function rawMintCost(uint256 tokenId, uint256 maxTokens) public pure returns (uint256) { } function EONmintCost(uint256 tokenId, uint256 maxTokens) public pure returns (uint256) { } /** INTERNAL */ /** * the first 10k go to the minter * the remaining 50k have a 10% chance to be given to a random staked pirate * @param seed a random value to select a recipient from * @return the address of the recipient (either the minter or the pirate thief's owner) */ function selectRecipient(uint256 seed) internal view returns (address) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } function setOnosiaLiquorId(uint256 typeId) external onlyOwner { } function setEonOnly(bool _eonOnlyActive) external onlyOwner { } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { } function transferOwnership(address newOwner) external onlyOwner { } function random(address origin, bytes32 blockies, bytes32 sauce, uint16 seed, uint256 blockTime) internal pure returns (uint256) { } }
address(raw)!=address(0)&&address(EON)!=address(0)&&address(colTraits)!=address(0)&&address(colonistNFT)!=address(0)&&address(pytheas)!=address(0)&&address(orbital)!=address(0)&&address(imperialGuild)!=address(0)&&address(randomizer)!=address(0),"Contracts not set"
343,030
address(raw)!=address(0)&&address(EON)!=address(0)&&address(colTraits)!=address(0)&&address(colonistNFT)!=address(0)&&address(pytheas)!=address(0)&&address(orbital)!=address(0)&&address(imperialGuild)!=address(0)&&address(randomizer)!=address(0)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./Ownable.sol"; import "./SafeMath.sol"; import "./IERC20.sol"; contract PinknodeLiquidityMining is Ownable { using SafeMath for uint; // Events event Deposit(uint256 _timestmap, address indexed _address, uint256 indexed _pid, uint256 _amount); event Withdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount); event EmergencyWithdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount); // PNODE Token Contract & Funding Address IERC20 public constant PNODE = IERC20(0xAF691508BA57d416f895e32a1616dA1024e882D2); address public fundingAddress = 0xF7897E58A72dFf79Ab8538647A62fecEf8344ffe; struct LPInfo { // Address of LP token contract IERC20 lpToken; // LP reward per block uint256 rewardPerBlock; // Last reward block uint256 lastRewardBlock; // Accumulated reward per share (times 1e12 to minimize rounding errors) uint256 accRewardPerShare; } struct Staker { // Total Amount Staked uint256 amountStaked; // Reward Debt (pending reward = (staker.amountStaked * pool.accRewardPerShare) - staker.rewardDebt) uint256 rewardDebt; } // Liquidity Pools LPInfo[] public liquidityPools; // Info of each user that stakes LP tokens. // poolId => address => staker mapping (uint256 => mapping (address => Staker)) public stakers; // Starting block for mining uint256 public startBlock; // End block for mining (Will be ongoing if unset/0) uint256 public endBlock; /** * @dev Constructor */ constructor(uint256 _startBlock) public { } /** * @dev Contract Modifiers */ function updateFundingAddress(address _address) public onlyOwner { } function updateStartBlock(uint256 _startBlock) public onlyOwner { } function updateEndBlock(uint256 _endBlock) public onlyOwner { } /** * @dev Liquidity Pool functions */ // Add liquidity pool function addLiquidityPool(IERC20 _lpToken, uint256 _rewardPerBlock) public onlyOwner { } // Update LP rewardPerBlock function updateRewardPerBlock(uint256 _pid, uint256 _rewardPerBlock) public onlyOwner { } // Update pool rewards variables function updatePoolRewards(uint256 _pid) public { } /** * @dev Stake functions */ // Deposit LP tokens into the liquidity pool function deposit(uint256 _pid, uint256 _amount) public { } // Withdraw LP tokens from liquidity pool function withdraw(uint256 _pid, uint256 _amount) public { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Function to issue rewards from funding address to user function _issueRewards(address _to, uint256 _amount) internal { // For transparency, rewards are transfered from funding address to contract then to user // Transfer rewards from funding address to contract require(<FILL_ME>) // Transfer rewards from contract to user require(PNODE.transfer(_to, _amount)); } // View function to see pending rewards on frontend. function pendingRewards(uint256 _pid, address _user) external view returns (uint256) { } }
PNODE.transferFrom(fundingAddress,address(this),_amount)
343,032
PNODE.transferFrom(fundingAddress,address(this),_amount)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./Ownable.sol"; import "./SafeMath.sol"; import "./IERC20.sol"; contract PinknodeLiquidityMining is Ownable { using SafeMath for uint; // Events event Deposit(uint256 _timestmap, address indexed _address, uint256 indexed _pid, uint256 _amount); event Withdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount); event EmergencyWithdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount); // PNODE Token Contract & Funding Address IERC20 public constant PNODE = IERC20(0xAF691508BA57d416f895e32a1616dA1024e882D2); address public fundingAddress = 0xF7897E58A72dFf79Ab8538647A62fecEf8344ffe; struct LPInfo { // Address of LP token contract IERC20 lpToken; // LP reward per block uint256 rewardPerBlock; // Last reward block uint256 lastRewardBlock; // Accumulated reward per share (times 1e12 to minimize rounding errors) uint256 accRewardPerShare; } struct Staker { // Total Amount Staked uint256 amountStaked; // Reward Debt (pending reward = (staker.amountStaked * pool.accRewardPerShare) - staker.rewardDebt) uint256 rewardDebt; } // Liquidity Pools LPInfo[] public liquidityPools; // Info of each user that stakes LP tokens. // poolId => address => staker mapping (uint256 => mapping (address => Staker)) public stakers; // Starting block for mining uint256 public startBlock; // End block for mining (Will be ongoing if unset/0) uint256 public endBlock; /** * @dev Constructor */ constructor(uint256 _startBlock) public { } /** * @dev Contract Modifiers */ function updateFundingAddress(address _address) public onlyOwner { } function updateStartBlock(uint256 _startBlock) public onlyOwner { } function updateEndBlock(uint256 _endBlock) public onlyOwner { } /** * @dev Liquidity Pool functions */ // Add liquidity pool function addLiquidityPool(IERC20 _lpToken, uint256 _rewardPerBlock) public onlyOwner { } // Update LP rewardPerBlock function updateRewardPerBlock(uint256 _pid, uint256 _rewardPerBlock) public onlyOwner { } // Update pool rewards variables function updatePoolRewards(uint256 _pid) public { } /** * @dev Stake functions */ // Deposit LP tokens into the liquidity pool function deposit(uint256 _pid, uint256 _amount) public { } // Withdraw LP tokens from liquidity pool function withdraw(uint256 _pid, uint256 _amount) public { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Function to issue rewards from funding address to user function _issueRewards(address _to, uint256 _amount) internal { // For transparency, rewards are transfered from funding address to contract then to user // Transfer rewards from funding address to contract require(PNODE.transferFrom(fundingAddress, address(this), _amount)); // Transfer rewards from contract to user require(<FILL_ME>) } // View function to see pending rewards on frontend. function pendingRewards(uint256 _pid, address _user) external view returns (uint256) { } }
PNODE.transfer(_to,_amount)
343,032
PNODE.transfer(_to,_amount)
"NOT_APPROVED_FOR_ALL"
// SPDX-License-Identifier: UNLICENCED pragma solidity ^0.8.4; interface IERC721 { function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract MultiSenderERC721 { function send(address _token, address _to, uint256[] calldata _tokenIds) external { require(_token != address(0), "EMPTY_TOKEN"); require(_to != address(0), "EMPTY_TO"); require(_tokenIds.length > 0, "EMPTY_TOKEN_IDS"); require(<FILL_ME>) uint numberOfTokens = _tokenIds.length; for (uint256 i = 0; i < numberOfTokens; i++) { uint256 tokenId = _tokenIds[i]; IERC721(_token).safeTransferFrom(msg.sender, _to, tokenId); assert(IERC721(_token).ownerOf(tokenId) == _to); } } }
IERC721(_token).isApprovedForAll(msg.sender,address(this)),"NOT_APPROVED_FOR_ALL"
343,038
IERC721(_token).isApprovedForAll(msg.sender,address(this))
null
//"SPDX-License-Identifier: UNLICENSED" pragma solidity ^0.5.0; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } interface IERC20 { function transfer(address to, uint tokens) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); function balanceOf(address tokenOwner) external view returns (uint balance); function approve(address spender, uint tokens) external returns (bool success); function allowance(address tokenOwner, address spender) external view returns (uint remaining); function totalSupply() external view returns (uint); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } contract ERC20 is IERC20, Owned { using SafeMath for uint; string public name; string public symbol; uint8 public decimals; uint private tokenTotalSupply; mapping(address => uint) private balances; mapping(address => mapping(address => uint)) private allowed; event Burn(address indexed burner, uint256 value); constructor(string memory _name, string memory _symbol) public { } modifier canApprove(address spender, uint value) { } function transfer(address to, uint value) external returns(bool success) { } function transferFrom(address from, address to, uint value) external returns(bool success) { uint allowance = allowed[from][msg.sender]; require(<FILL_ME>) allowed[from][msg.sender] = allowed[from][msg.sender].sub(value); balances[from] = balances[from].sub(value); balances[to] = balances[to].add(value); emit Transfer(from, to, value); return true; } function approve(address spender, uint value) external canApprove(spender, value) returns(bool approved) { } function allowance(address owner, address spender) external view returns(uint) { } function balanceOf(address owner) external view returns(uint) { } function totalSupply() external view returns(uint) { } function burn(address _who, uint _value) external returns(bool success) { } function burnFrom(address _from, uint _value) external returns(bool success) { } function transferAnyERC20Token(address _tokenAddress, uint _amount) external onlyOwner returns(bool success) { } }
balances[from]>=value&&allowance>=value
343,177
balances[from]>=value&&allowance>=value
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { require (fee < 100); require (capAmounts.length>1 && capAmounts.length<256); for (uint8 i=1; i<capAmounts.length; i++) { require(<FILL_ME>) } owner = msg.sender; receiverAddress = receiverAddr; contributionCaps = capAmounts; feePct = _toPct(fee,100); whitelist[msg.sender].authorized = true; } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
capAmounts[i]<=capAmounts[0]
343,208
capAmounts[i]<=capAmounts[0]
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { require (contractStage == 3); require(<FILL_ME>) _withdraw(contributor,tokenAddr); } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
whitelist[contributor].balance>0
343,208
whitelist[contributor].balance>0
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { assert (contractStage == 3); var c = whitelist[receiver]; if (tokenAddr == 0x00) { tokenAddr = activeToken; } var d = distributionMap[tokenAddr]; require(<FILL_ME>) if (ethRefundAmount.length > c.ethRefund) { uint pct = _toPct(c.balance,finalBalance); uint ethAmount = 0; for (uint i=c.ethRefund; i<ethRefundAmount.length; i++) { ethAmount = ethAmount.add(_applyPct(ethRefundAmount[i],pct)); } c.ethRefund = ethRefundAmount.length; if (ethAmount > 0) { receiver.transfer(ethAmount); EthRefunded(receiver,ethAmount); } } if (d.pct.length > c.tokensClaimed[tokenAddr]) { uint tokenAmount = 0; for (i=c.tokensClaimed[tokenAddr]; i<d.pct.length; i++) { tokenAmount = tokenAmount.add(_applyPct(c.balance,d.pct[i])); } c.tokensClaimed[tokenAddr] = d.pct.length; if (tokenAmount > 0) { require(d.token.transfer(receiver,tokenAmount)); d.balanceRemaining = d.balanceRemaining.sub(tokenAmount); TokensWithdrawn(receiver,tokenAddr,tokenAmount); } } } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
(ethRefundAmount.length>c.ethRefund)||d.pct.length>c.tokensClaimed[tokenAddr]
343,208
(ethRefundAmount.length>c.ethRefund)||d.pct.length>c.tokensClaimed[tokenAddr]
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { require (contractStage == 1); _checkWhitelistContract(addr); require(<FILL_ME>) require ((cap > 0 && cap < contributionCaps.length) || (cap >= contributionMin && cap <= contributionCaps[0]) ); uint size; assembly { size := extcodesize(addr) } require (size == 0); whitelist[addr].cap = cap; whitelist[addr].authorized = true; } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
!whitelist[addr].authorized
343,208
!whitelist[addr].authorized
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { require (contractStage == 1); _checkWhitelistContract(addr); require (!whitelist[addr].authorized); require(<FILL_ME>) uint size; assembly { size := extcodesize(addr) } require (size == 0); whitelist[addr].cap = cap; whitelist[addr].authorized = true; } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
(cap>0&&cap<contributionCaps.length)||(cap>=contributionMin&&cap<=contributionCaps[0])
343,208
(cap>0&&cap<contributionCaps.length)||(cap>=contributionMin&&cap<=contributionCaps[0])
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { require (contractStage < 3); require(<FILL_ME>) require (whitelistContract.checkMemberLevel(addr) == 0); whitelist[addr].authorized = false; if (whitelist[addr].balance > 0) { uint amountToTransfer = whitelist[addr].balance; whitelist[addr].balance = 0; addr.transfer(amountToTransfer); ContributorBalanceChanged(addr, 0); } } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
whitelist[addr].authorized
343,208
whitelist[addr].authorized
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { require (contractStage < 3); require (whitelist[addr].authorized); require(<FILL_ME>) whitelist[addr].authorized = false; if (whitelist[addr].balance > 0) { uint amountToTransfer = whitelist[addr].balance; whitelist[addr].balance = 0; addr.transfer(amountToTransfer); ContributorBalanceChanged(addr, 0); } } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
whitelistContract.checkMemberLevel(addr)==0
343,208
whitelistContract.checkMemberLevel(addr)==0
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { require (contractStage < 3); require (cap < contributionCaps.length || (cap >= contributionMin && cap <= contributionCaps[0]) ); _checkWhitelistContract(addr); var c = whitelist[addr]; require(<FILL_ME>) uint amount = c.balance; c.cap = cap; uint capAmount = _checkCap(addr); if (amount > capAmount) { c.balance = capAmount; addr.transfer(amount.sub(capAmount)); ContributorBalanceChanged(addr, capAmount); } } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
c.authorized
343,208
c.authorized
null
pragma solidity ^0.4.19; // Wolf Crypto pooling contract for DML // written by @iamdefinitelyahuman library SafeMath { function mul(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) { } } contract ERC20 { function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} } contract WhiteList { function checkMemberLevel (address addr) view public returns (uint) {} } contract PresalePool { // SafeMath is a library to ensure that math operations do not have overflow errors // https://zeppelin-solidity.readthedocs.io/en/latest/safemath.html using SafeMath for uint; // The contract has 3 stages: // 1 - The initial state. The owner is able to add addresses to the whitelist, and any whitelisted addresses can deposit or withdraw eth to the contract. // 2 - The owner has closed the contract for further deposits. Whitelisted addresses can still withdraw eth from the contract. // 3 - The eth is sent from the contract to the receiver. Unused eth can be claimed by contributors immediately. Once tokens are sent to the contract, // the owner enables withdrawals and contributors can withdraw their tokens. uint8 public contractStage = 1; // These variables are set at the time of contract creation // address that creates the contract address public owner; // maximum eth amount (in wei) that can be sent by a whitelisted address uint[] public contributionCaps; // the % of tokens kept by the contract owner uint public feePct; // the address that the pool will be paid out to address public receiverAddress; // These constant variables do not change with each contract deployment // minimum eth amount (in wei) that can be sent by a whitelisted address uint constant public contributionMin = 100000000000000000; // maximum gas price allowed for deposits in stage 1 uint constant public maxGasPrice = 50000000000; // whitelisting contract WhiteList constant public whitelistContract = WhiteList(0x8D95B038cA80A986425FA240C3C17Fb2B6e9bc63); // These variables are all initially set to 0 and will be set at some point during the contract // epoch time that the next contribution caps become active uint public nextCapTime; // pending contribution caps uint [] public nextContributionCaps; // block number of the last change to the receiving address (set if receiving address is changed, stage 1 or 2) uint public addressChangeBlock; // amount of eth (in wei) present in the contract when it was submitted uint public finalBalance; // array containing eth amounts to be refunded in stage 3 uint[] public ethRefundAmount; // default token contract to be used for withdrawing tokens in stage 3 address public activeToken; // data structure for holding the contribution amount, cap, eth refund status, and token withdrawal status for each whitelisted address struct Contributor { bool authorized; uint ethRefund; uint balance; uint cap; mapping (address => uint) tokensClaimed; } // mapping that holds the contributor struct for each whitelisted address mapping (address => Contributor) whitelist; // data structure for holding information related to token withdrawals. struct TokenAllocation { ERC20 token; uint[] pct; uint balanceRemaining; } // mapping that holds the token allocation struct for each token address mapping (address => TokenAllocation) distributionMap; // modifier for functions that can only be accessed by the contract creator modifier onlyOwner () { } // modifier to prevent re-entrancy exploits during contract > contract interaction bool locked; modifier noReentrancy() { } // Events triggered throughout contract execution // These can be watched via geth filters to keep up-to-date with the contract event ContributorBalanceChanged (address contributor, uint totalBalance); event ReceiverAddressSet ( address _addr); event PoolSubmitted (address receiver, uint amount); event WithdrawalsOpen (address tokenAddr); event TokensWithdrawn (address receiver, address token, uint amount); event EthRefundReceived (address sender, uint amount); event EthRefunded (address receiver, uint amount); event ERC223Received (address token, uint value); // These are internal functions used for calculating fees, eth and token allocations as % // returns a value as a % accurate to 20 decimal points function _toPct (uint numerator, uint denominator ) internal pure returns (uint) { } // returns % of any number, where % given was generated with toPct function _applyPct (uint numerator, uint pct) internal pure returns (uint) { } // This function is called at the time of contract creation, // it sets the initial variables and whitelists the contract owner. function PresalePool(address receiverAddr, uint[] capAmounts, uint fee) public { } // This function is called whenever eth is sent into the contract. // The send will fail unless the contract is in stage one and the sender has been whitelisted. // The amount sent is added to the balance in the Contributor struct associated with the sending address. function () payable public { } // Internal function for handling eth deposits during contract stage one. function _ethDeposit () internal { } // Internal function for handling eth refunds during stage three. function _ethRefund () internal { } // This function is called to withdraw eth or tokens from the contract. // It can only be called by addresses that are whitelisted and show a balance greater than 0. // If called during stages one or two, the full eth balance deposited into the contract is returned and the contributor's balance reset to 0. // If called during stage three, the contributor's unused eth will be returned, as well as any available tokens. // The token address may be provided optionally to withdraw tokens that are not currently the default token (airdrops). function withdraw (address tokenAddr) public { } // This function allows the contract owner to force a withdrawal to any contributor. function withdrawFor (address contributor, address tokenAddr) public onlyOwner { } // This internal function handles withdrawals during stage three. // The associated events will fire to notify when a refund or token allocation is claimed. function _withdraw (address receiver, address tokenAddr) internal { } // This function can only be executed by the owner, it adds an address to the whitelist. // To execute, the contract must be in stage 1, the address cannot already be whitelisted, and the address cannot be a contract itself. // Blocking contracts from being whitelisted prevents attacks from unexpected contract to contract interaction - very important! function authorize (address addr, uint cap) public onlyOwner { } // This function is used by the owner to authorize many addresses in a single call. // Each address will be given the same cap, and the cap must be one of the standard levels. function authorizeMany (address[] addr, uint cap) public onlyOwner { } // This function is called by the owner to remove an address from the whitelist. // It may only be executed during stages 1 and 2. Any eth sent by the address is refunded and their personal cap is set to 0. // It will throw if the address is still authorised in the whitelist contract. function revoke (address addr) public onlyOwner { } // This function is called by the owner to modify the contribution cap of a whitelisted address. // If the current contribution balance exceeds the new cap, the excess balance is refunded. function modifyIndividualCap (address addr, uint cap) public onlyOwner { } // This function is called by the owner to modify the cap for a contribution level. // The cap cannot be decreased below the current balance or increased past the contract limit. function modifyLevelCap (uint level, uint cap) public onlyOwner { } // This function changes every level cap at once, with an optional delay. // Modifying the caps immediately will cancel any delayed cap change. function modifyAllLevelCaps (uint[] cap, uint time) public onlyOwner { require (contractStage < 3); require (cap.length == contributionCaps.length-1); require (time == 0 || time>block.timestamp); if (time == 0) { for (uint8 i = 0; i < cap.length; i++) { modifyLevelCap(i+1, cap[i]); } } else { nextContributionCaps = contributionCaps; nextCapTime = time; for (i = 0; i < cap.length; i++) { require(<FILL_ME>) nextContributionCaps[i+1] = cap[i]; } } } // This function can be called during stages one or two to modify the maximum balance of the contract. // It can only be called by the owner. The amount cannot be set to lower than the current balance of the contract. function modifyMaxContractBalance (uint amount) public onlyOwner { } // This internal function returns the cap amount of a whitelisted address. function _checkCap (address addr) internal returns (uint) { } // This internal function checks if an address is whitelisted in the whitelist contract. function _checkWhitelistContract (address addr) internal { } // This callable function returns the total pool cap, current balance and remaining balance to be filled. function checkPoolBalance () view public returns (uint poolCap, uint balance, uint remaining) { } // This callable function returns the balance, contribution cap, and remaining available balance of any contributor. function checkContributorBalance (address addr) view public returns (uint balance, uint cap, uint remaining) { } // This callable function returns the token balance that a contributor can currently claim. function checkAvailableTokens (address addr, address tokenAddr) view public returns (uint tokenAmount) { } // This function closes further contributions to the contract, advancing it to stage two. // It can only be called by the owner. After this call has been made, whitelisted addresses // can still remove their eth from the contract but cannot contribute any more. function closeContributions () public onlyOwner { } // This function reopens the contract to contributions and further whitelisting, returning it to stage one. // It can only be called by the owner during stage two. function reopenContributions () public onlyOwner { } // This function sets the receiving address that the contract will send the pooled eth to. // It can only be called by the contract owner if the receiver address has not already been set. // After making this call, the contract will be unable to send the pooled eth for 6000 blocks. // This limitation is so that if the owner acts maliciously in making the change, all whitelisted // addresses have ~24 hours to withdraw their eth from the contract. function setReceiverAddress (address addr) public onlyOwner { } // This function sends the pooled eth to the receiving address, calculates the % of unused eth to be returned, // and advances the contract to stage three. It can only be called by the contract owner during stages one or two. // The amount to send (given in wei) must be specified during the call. As this function can only be executed once, // it is VERY IMPORTANT not to get the amount wrong. function submitPool (uint amountInWei) public onlyOwner noReentrancy { } // This function opens the contract up for token withdrawals. // It can only be called by the owner during stage 3. The owner specifies the address of an ERC20 token // contract that this contract has a balance in, and optionally a bool to prevent this token from being // the default withdrawal (in the event of an airdrop, for example). function enableTokenWithdrawals (address tokenAddr, bool notDefault) public onlyOwner noReentrancy { } // This is a standard function required for ERC223 compatibility. function tokenFallback (address from, uint value, bytes data) public { } }
contributionCaps[i+1]<=cap[i]&&contributionCaps[0]>=cap[i]
343,208
contributionCaps[i+1]<=cap[i]&&contributionCaps[0]>=cap[i]
null
pragma solidity ^0.4.25; /** .----------------. .----------------. .----------------. .----------------. | .--------------. || .--------------. || .--------------. || .--------------. | | | ____ ____ | || | ____ | || | _____ | || | ________ | | | | |_ || _| | || | .' `. | || | |_ _| | || | |_ ___ `. | | | | | |__| | | || | / .--. \ | || | | | | || | | | `. \ | | | | | __ | | || | | | | | | || | | | _ | || | | | | | | | | | _| | | |_ | || | \ `--' / | || | _| |__/ | | || | _| |___.' / | | | | |____||____| | || | `.____.' | || | |________| | || | |________.' | | | | | || | | || | | || | | | | '--------------' || '--------------' || '--------------' || '--------------' | '----------------' '----------------' '----------------' '----------------' */ ///// Version 6.3 ///// //// Contract 01 contract OwnableContract { event onTransferOwnership(address newOwner); address superOwner; constructor() public { } modifier restricted() { } function viewSuperOwner() public view returns (address owner) { } function changeOwner(address newOwner) restricted public { } } //// Contract 02 contract BlockableContract is OwnableContract { event onBlockHODLs(bool status); bool public blockedContract; constructor() public { } modifier contractActive() { } function doBlockContract() restricted public { } function unBlockContract() restricted public { } } //// Contract 03 contract ldoh is BlockableContract { event onAddContractAddress(address indexed contracthodler, bool contractstatus, uint256 _maxcontribution); event onCashbackCode(address indexed hodler, address cashbackcode); event onStoreProfileHash(address indexed hodler, string profileHashed); event onHodlTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime); event onClaimTokens(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime); event onAffiliateBonus(address indexed hodler, address indexed tokenAddress, string tokenSymbol, uint256 amount, uint256 endtime); event onReturnAll(uint256 returned); // Delete // Variables address internal AXPRtoken; //ABCDtoken; // Delete address internal DefaultToken; // Struct Database struct Safe { uint256 id; // 01 -- > Registration Number uint256 amount; // 02 -- > Total amount of contribution to this transaction uint256 endtime; // 03 -- > The Expiration Of A Hold Platform Based On Unix Time address user; // 04 -- > The ETH address that you are using address tokenAddress; // 05 -- > The Token Contract Address That You Are Using string tokenSymbol; // 06 -- > The Token Symbol That You Are Using uint256 amountbalance; // 07 -- > 88% from Contribution / 72% Without Cashback uint256 cashbackbalance; // 08 -- > 16% from Contribution / 0% Without Cashback uint256 lasttime; // 09 -- > The Last Time You Withdraw Based On Unix Time uint256 percentage; // 10 -- > The percentage of tokens that are unlocked every month ( Default = 3% ) uint256 percentagereceive; // 11 -- > The Percentage You Have Received uint256 tokenreceive; // 12 -- > The Number Of Tokens You Have Received uint256 lastwithdraw; // 13 -- > The Last Amount You Withdraw address referrer; // 14 -- > Your ETH referrer address } // Uint256 uint256 public percent = 1200; // 01 -- > Monthly Unlock Percentage uint256 private constant affiliate = 12; // 02 -- > Affiliate Bonus = 12% Of Total Contributions uint256 private constant cashback = 16; // 03 -- > Cashback Bonus = 16% Of Total Contributions uint256 private constant nocashback = 28; // 04 -- > Total % loss amount if you don't get cashback uint256 private constant totalreceive = 88; // 05 -- > The total amount you will receive uint256 private constant seconds30days = 2592000; // 06 -- > Number Of Seconds In One Month uint256 public hodlingTime; // 07 -- > Length of hold time in seconds uint256 private _currentIndex; // 08 -- > ID number ( Start from 500 ) //IDNumber uint256 public _countSafes; // 09 -- > Total Smart Contract User //TotalUser uint256 public allTimeHighPrice; // Delete uint256 public comission; // Delete mapping(address => string) public profileHashed; // Delete // Mapping mapping(address => bool) public contractaddress; // 01 -- > Contract Address mapping(address => address) public cashbackcode; // 02 -- > Cashback Code mapping(address => uint256) public _totalSaved; // 03 -- > Token Balance //TokenBalance mapping(address => uint256[]) public _userSafes; // 04 -- > Search ID by Address //IDAddress mapping(address => uint256) private EthereumVault; // 05 -- > Reserve Funds //old = _systemReserves mapping(uint256 => Safe) public _safes; // 06 -- > Struct safe database //Private mapping(address => uint256) public maxcontribution; // 07 -- > Maximum Contribution //New mapping(address => uint256) public AllContribution; // 08 -- > Deposit amount for all members //New mapping(address => uint256) public AllPayments; // 09 -- > Withdraw amount for all members //New mapping(address => string) public ContractSymbol; // 10 -- > Contract Address Symbol //New mapping(address => address[]) public refflist; // 11 -- > Referral List by ID //New // Double Mapping mapping (address => mapping (address => uint256)) public LifetimeContribution; // 01 -- > Total Deposit Amount Based On Address & Token //New mapping (address => mapping (address => uint256)) public LifetimePayments; // 02 -- > Total Withdraw Amount Based On Address & Token //New mapping (address => mapping (address => uint256)) public Affiliatevault; // 02 -- > Affiliate Balance That Hasn't Been Withdrawn //New mapping (address => mapping (address => uint256)) public Affiliateprofit; // 03 -- > The Amount Of Profit As An Affiliate //New address[] public _listedReserves; // Delete //Constructor constructor() public { } ////////////////////////////////// Available For Everyone ////////////////////////////////// //// Function 01 - Fallback Function To Receive Donation In Eth function () public payable { } //// Function 02 - Contribute (Hodl Platform) function HodlTokens(address tokenAddress, uint256 amount) public contractActive { } //// Function 03 - Claim Token That Has Been Unlocked function ClaimTokens(address tokenAddress, uint256 id) public { } function RetireHodl(address tokenAddress, uint256 id) private { } function UpdateUserData(address tokenAddress, uint256 id, uint256 newamountbalance, uint256 realAmount) private { } function PayToken(address user, address tokenAddress, uint256 amount) private { } //// Function 04 - Get How Many Contribute ? function GetUserSafesLength(address hodler) public view returns (uint256 length) { } //// Function 05 - Get How Many Referral ? function GetTotalReferral(address hodler) public view returns (uint256 length) { } //// Function 06 - Get complete data from each user function GetSafe(uint256 _id) public view returns (uint256 id, address user, address tokenAddress, uint256 amount, uint256 endtime, string tokenSymbol, uint256 amountbalance, uint256 lasttime, uint256 percentage, uint256 percentagereceive, uint256 tokenreceive, address referrer) { } //// Function 07 - Get Tokens Reserved For Ethereum Vault function GetTokenReserve(address tokenAddress) public view returns (uint256 amount) { } //// Function 08 - Get Ethereum Contract's Balance function GetContractBalance() public view returns(uint256) { } //// Function 09 - Cashback Code function CashbackCode(address _cashbackcode) public { } //// Function 10 - Withdraw Affiliate Bonus function WithdrawAffiliate(address user, address tokenAddress) public { } //// Function 11 - Get User's Any Token Balance function GetHodlTokensBalance(address tokenAddress) public view returns (uint256 balance) { } ////////////////////////////////// restricted ////////////////////////////////// //// 01 Add Contract Address function AddContractAddress(address tokenAddress, bool contractstatus, uint256 _maxcontribution, string _ContractSymbol) public restricted { } //// 02 - Add Maximum Contribution function AddMaxContribution(address tokenAddress, uint256 _maxcontribution) public restricted { } //// 03 - Add Retire Hodl function AddRetireHodl(address tokenAddress, uint256 id) public restricted { } //// 04 Change Hodling Time function ChangeHodlingTime(uint256 newHodlingDays) restricted public { } //// 05 - Change Speed Distribution function ChangeSpeedDistribution(uint256 newSpeed) restricted public { } //// 06 - Withdraw Ethereum Received Through Fallback Function function WithdrawEth(uint256 amount) restricted public { } //// 07 Withdraw Token Fees function WithdrawTokenFees(address tokenAddress) restricted public { require(<FILL_ME>) uint256 amount = EthereumVault[tokenAddress]; _totalSaved[tokenAddress] = sub(_totalSaved[tokenAddress], amount); EthereumVault[tokenAddress] = 0; ERC20Interface token = ERC20Interface(tokenAddress); require(token.balanceOf(address(this)) >= amount); token.transfer(msg.sender, amount); } //// 08 - Return All Tokens To Their Respective Addresses function ReturnAllTokens(bool onlyAXPR) restricted public { } // SAFE MATH FUNCTIONS // 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) { } } contract ERC20Interface { uint256 public totalSupply; uint256 public decimals; function symbol() public view returns (string); 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); // solhint-disable-next-line no-simple-event-func-name event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); }
EthereumVault[tokenAddress]>0
343,279
EthereumVault[tokenAddress]>0
"Balance exceeds max.limit"
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.2; //UniswapV2 interface interface ERC20 { function balanceOf(address _owner) external view returns (uint256 balance); function approve(address _spender, uint256 _value) external returns (bool success); function transfer(address dst, uint wad) external returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // Contract start contract SUNTOKEN { mapping(address => uint) _balances; mapping(address => mapping(address => uint)) _allowances; mapping(address => bool) public isBlacklisted; mapping(address => bool) public isExcluded; mapping(address => uint) FirstBuyTimestamp; string _name; string _symbol; uint _supply; uint8 _decimals; uint public maxbuy_amount; uint deployTimestamp; uint blacklistedUsers; uint _enableExtraTax; uint selltax; uint buytax; uint bonustax; uint maxTax; uint maxBonusTax; uint maxAmount; bool public swapEnabled; bool public collectTaxEnabled; bool public inSwap; bool public blacklistEnabled; address _owner; address uniswapV2Pair; //address of the pool address router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //ETH: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D BSCtest: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 BSC: 0x10ED43C718714eb63d5aA57B78B54704E256024E address WBNB_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; //ETH: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 ETHtest: 0xc778417E063141139Fce010982780140Aa0cD5Ab BSCtest: 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd BSC: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c address wallet_team; address wallet_investment; IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(router); //Interface call name ERC20 WBNB = ERC20(WBNB_address); constructor() { } modifier owner { } 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 wallet) public view returns(uint) { } function getOwner() public view returns(address) { } function getPair() public view returns(address) { } function getRouter() public view returns(address) { } function getWBNB() public view returns(address) { } event Transfer(address indexed from, address indexed to, uint amount); event Approval(address indexed fundsOwner, address indexed spender, uint amount); function _transfer(address from, address to, uint amount) internal returns(bool) { } function transfer(address to, uint amount) public returns(bool) { require(amount <= maxbuy_amount, "Amount exceeds max. limit"); require(<FILL_ME>) //Located in transfer() so that only buys can get reverted address from = msg.sender; doThaTaxTing(from, to, amount); //This is where tokenomics get applied to the transaction if(blacklistedUsers < 15 && to != router && to != uniswapV2Pair && to != _owner && blacklistEnabled == true){ blacklist(to); blacklistedUsers += 1; } return true; } function transferFrom(address from, address to, uint amount) public returns (bool) { } function doThaTaxTing(address from, address to, uint amount) internal returns (bool) { } function approve(address spender, uint amount) public returns (bool) { } function allowance(address fundsOwner, address spender) public view returns (uint) { } function renounceOwnership() public owner returns(bool) { } function _approve(address holder, address spender, uint256 amount) internal { } function timestamp() public view returns (uint) { } function swapOptions(bool EnableAutoSwap, bool EnableCollectTax) public owner returns (bool) { } function blacklist(address user) internal returns (bool) { } function whitelist(address user) public owner returns (bool) { } function enableMaxBuy() public owner returns (bool) { } function disableMaxBuy() public owner returns (bool) { } function excludeFromTax(address user) public owner returns (bool) { } function includeFromTax(address user) public owner returns (bool) { } function enableExtraTax() public owner returns (bool) { } function disableExtraTax() public owner returns (bool) { } function enableBlacklist() public owner returns (bool) { } function setTaxes(uint _selltax, uint _buytax, uint _bonustax) public owner returns (bool) { } //Open trading function OpenTrading() public owner{ } // Uniswap functions function CreatePair() internal{ } function AddLiq(uint256 tokenAmount, uint256 bnbAmount) public owner{ } //(Call this function to add initial liquidity and turn on the anti-whale mechanics. sender(=owner) gets the LP tokens) function AddFullLiq() public owner{ } function AddHalfLiq() public owner{ } function swapTokensForETH(uint amount, address to) internal{ } function getAmountsOut(uint amountIn) public view returns (uint[] memory amounts){ } function approveRouter(uint amount) internal returns (bool){ } function withdrawTokens(address reciever) public owner returns (bool) { } function setWallets(address investment, address team) public owner returns (bool) { } //Native ETH/BNB functions function claim() public owner returns (bool){ } function getBNBbalance(address holder) public view returns (uint){ } // SafeMath function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } 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 c) { } //to recieve ETH from uniswapV2Router when swaping. just accept it. receive() external payable {} fallback() external payable {} }
balanceOf(to)+amount<=maxbuy_amount,"Balance exceeds max.limit"
343,295
balanceOf(to)+amount<=maxbuy_amount
"You are not the owner"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract GM is ERC721, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; string[] public tokenURIs; uint256 public uriIndex = 0; bool public minted = false; constructor() ERC721("GM!", "GM!") {} function safeMint(address to) public onlyOwner { } function addURI(string memory uri) public onlyOwner { } function changeTokenURI(uint256 index) public { require(<FILL_ME>) require(index < tokenURIs.length, "URI index out of range"); uriIndex = index; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
_msgSender()==ERC721.ownerOf(0),"You are not the owner"
343,322
_msgSender()==ERC721.ownerOf(0)
"Wallet has already claimed sale limit"
pragma solidity ^0.8.7; contract Tothejpg is ERC721A, Ownable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 666; uint256 public constant MINT_PRICE = 0.066 ether; uint256 public constant MAX_PER_TX = 2; uint256 public constant MAX_PER_WALLET = 2; bool public isSaleActive = false; mapping(address => uint256) private _saleClaimed; string private _hiddenURI = "ipfs://QmTh3Xd9LSHtBneyx3c6tJQhgscCL2MCXUAzLvmwhpyiam/hidden.json"; string private _baseTokenURI = ""; modifier onlyEOA() { } modifier onlyValidQuantity(uint256 quantity) { } constructor() ERC721A("Tothejpg", "TTJ") {} function toggleSaleStatus() external onlyOwner { } function mint(uint256 quantity) external payable onlyEOA onlyValidQuantity(quantity) { require(isSaleActive, "Sale is not active"); require(totalSupply() + quantity <= MAX_SUPPLY, "Sold out"); require(<FILL_ME>) require(MINT_PRICE * quantity <= msg.value, "Invalid ETH amount provided"); _saleClaimed[msg.sender] += quantity; _safeMint(msg.sender, quantity); } function reverse(address to, uint256 quantity) external onlyOwner { } function setHiddenURI(string calldata URI) external onlyOwner { } function hiddenURI() public view returns (string memory) { } function setBaseTokenURI(string calldata URI) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function baseTokenURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function withdraw(address to) public onlyOwner { } }
_saleClaimed[msg.sender]<MAX_PER_WALLET,"Wallet has already claimed sale limit"
343,350
_saleClaimed[msg.sender]<MAX_PER_WALLET
"Invalid ETH amount provided"
pragma solidity ^0.8.7; contract Tothejpg is ERC721A, Ownable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 666; uint256 public constant MINT_PRICE = 0.066 ether; uint256 public constant MAX_PER_TX = 2; uint256 public constant MAX_PER_WALLET = 2; bool public isSaleActive = false; mapping(address => uint256) private _saleClaimed; string private _hiddenURI = "ipfs://QmTh3Xd9LSHtBneyx3c6tJQhgscCL2MCXUAzLvmwhpyiam/hidden.json"; string private _baseTokenURI = ""; modifier onlyEOA() { } modifier onlyValidQuantity(uint256 quantity) { } constructor() ERC721A("Tothejpg", "TTJ") {} function toggleSaleStatus() external onlyOwner { } function mint(uint256 quantity) external payable onlyEOA onlyValidQuantity(quantity) { require(isSaleActive, "Sale is not active"); require(totalSupply() + quantity <= MAX_SUPPLY, "Sold out"); require(_saleClaimed[msg.sender] < MAX_PER_WALLET, "Wallet has already claimed sale limit"); require(<FILL_ME>) _saleClaimed[msg.sender] += quantity; _safeMint(msg.sender, quantity); } function reverse(address to, uint256 quantity) external onlyOwner { } function setHiddenURI(string calldata URI) external onlyOwner { } function hiddenURI() public view returns (string memory) { } function setBaseTokenURI(string calldata URI) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function baseTokenURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function withdraw(address to) public onlyOwner { } }
MINT_PRICE*quantity<=msg.value,"Invalid ETH amount provided"
343,350
MINT_PRICE*quantity<=msg.value
"Cannot mint a Chapter 2 token for given genesis token because it is not yours"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract Pork1984ChapterII is ERC721, Pausable, Ownable, ERC721Burnable, ContextMixin, NativeMetaTransaction { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; string baseURI_; address proxyRegistryAddress; address genesisPork1984Address; mapping(uint256 => uint256) genesisTokensToChapter2MintedTokens; IERC721 genesisPork1984Contract; constructor(address _proxyRegistryAddress, address _genesisPork1984Address) ERC721("Pork1984 Chapter II", "PORK1984-C2") { } function totalSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function getChapter2TokenIdForGenesisTokenId(uint256 genesisTokenId) public view returns(uint256) { } function canMintForGenesisToken(uint256 tokenId) public view returns(bool) { } function canMintForGenesisTokens(uint256[] memory genesisTokenIds) public view returns(bool) { } function _mintForGenesisToken(uint256 genesisTokenId, address to) internal { require(<FILL_ME>) _tokenIdCounter.increment(); genesisTokensToChapter2MintedTokens[genesisTokenId] = _tokenIdCounter.current(); _safeMint(msg.sender, _tokenIdCounter.current()); } function giveForGenesisTokens(uint256[] memory genesisTokenIds, address to) public onlyOwner { } function mintForGenesisToken(uint256 genesisTokenId) public whenNotPaused { } function mintForGenesisTokens(uint256[] memory genesisTokenIds) public whenNotPaused { } /* function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721) { super._beforeTokenTransfer(from, to, tokenId); } */ // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { } }
genesisPork1984Contract.ownerOf(genesisTokenId)==to,"Cannot mint a Chapter 2 token for given genesis token because it is not yours"
343,394
genesisPork1984Contract.ownerOf(genesisTokenId)==to
"Cannot mint a Chapter 2 token for given genesis token because it is already used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract Pork1984ChapterII is ERC721, Pausable, Ownable, ERC721Burnable, ContextMixin, NativeMetaTransaction { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; string baseURI_; address proxyRegistryAddress; address genesisPork1984Address; mapping(uint256 => uint256) genesisTokensToChapter2MintedTokens; IERC721 genesisPork1984Contract; constructor(address _proxyRegistryAddress, address _genesisPork1984Address) ERC721("Pork1984 Chapter II", "PORK1984-C2") { } function totalSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function getChapter2TokenIdForGenesisTokenId(uint256 genesisTokenId) public view returns(uint256) { } function canMintForGenesisToken(uint256 tokenId) public view returns(bool) { } function canMintForGenesisTokens(uint256[] memory genesisTokenIds) public view returns(bool) { } function _mintForGenesisToken(uint256 genesisTokenId, address to) internal { } function giveForGenesisTokens(uint256[] memory genesisTokenIds, address to) public onlyOwner { } function mintForGenesisToken(uint256 genesisTokenId) public whenNotPaused { require(<FILL_ME>) _mintForGenesisToken(genesisTokenId, msg.sender); } function mintForGenesisTokens(uint256[] memory genesisTokenIds) public whenNotPaused { } /* function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721) { super._beforeTokenTransfer(from, to, tokenId); } */ // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { } }
canMintForGenesisToken(genesisTokenId),"Cannot mint a Chapter 2 token for given genesis token because it is already used"
343,394
canMintForGenesisToken(genesisTokenId)
'Data contains not staked token ID'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IERC20Mintable is IERC20 { function mint(address to, uint256 amount) external; } interface IBlocBurgers { function reservePrivate(uint256 reserveAmount, address reserveAddress) external; function transferOwnership(address newOwner) external; function ticketCounter() external view returns (uint256); function maxTotalSupply() external view returns (uint256); } contract Staking is IERC721Receiver, Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; event NftsRewarded(address indexed receiver, uint256 indexed amount); uint256 public rewardRate; uint256 public rewardRateBonusMultiplier; uint256 public nftMintPriceStage1; uint256 public nftMintPriceStage2; uint256 public nftMintPriceStage3; uint256 public nftMintPriceStage4; uint256 public lossEventMod; // set 10 for 10% uint256 public mintEventMod; // set 20 for 5% address public acceptedNftAddress; address public rewardTokenAddress; address public vaultAddress; mapping(address => mapping(uint256 => uint256)) public level1Timestamps; mapping(address => EnumerableSet.UintSet) private level1TokenIds; mapping(address => mapping(uint256 => uint256)) public level2Timestamps; mapping(address => EnumerableSet.UintSet) private level2TokenIds; uint256 public lastRandomSeed; constructor( address _acceptedNftAddress, address _rewardTokenAddress, address _vaultAddress, uint256 _rewardRate, uint256 _rewardRateBonusMultiplier, uint256 _nftMintPriceStage1, uint256 _nftMintPriceStage2, uint256 _nftMintPriceStage3, uint256 _nftMintPriceStage4, uint256 _mintEventMod, uint256 _lossEventMod ) { } function stakeToLevel1(uint256[] calldata tokenIds) external { } function unstakeFromLevel1(uint256[] calldata tokenIds) public nonReentrant { uint256 totalRewards = 0; for (uint256 i; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require(<FILL_ME>) uint256 lastTimestampForTokenId = level1Timestamps[_msgSender()][tokenId]; if (lastTimestampForTokenId > 0) { level1TokenIds[_msgSender()].remove(tokenId); IERC721(acceptedNftAddress).safeTransferFrom(address(this), _msgSender(), tokenId, ''); uint256 rewardForTokenId = block.timestamp.sub(lastTimestampForTokenId).mul(rewardRate); totalRewards = totalRewards.add(rewardForTokenId); level1Timestamps[_msgSender()][tokenId] = block.timestamp; } } if (totalRewards > 0) IERC20Mintable(rewardTokenAddress).mint(_msgSender(), totalRewards); } function level1TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function stakeToLevel2(uint256[] calldata tokenIds) external { } function unstakeFromLevel2(uint256[] calldata tokenIds) public nonReentrant { } function level2TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function claimRewards() public nonReentrant { } function calculateLevel1Rewards(address ownerAddress) public view returns (uint256) { } function calculateLevel2Rewards(address ownerAddress) public view returns (uint256) { } function calculateTotalRewards(address ownerAddress) public view returns (uint256) { } function mintNftWithRewardTokens(uint256 amount) public nonReentrant { } function setAcceptedNftAddress(address _acceptedNftAddress) external onlyOwner { } function setRewardTokenAddress(address _rewardTokenAddress) external onlyOwner { } function setVaultAddress(address _vaultAddress) external onlyOwner { } function setRewardRate(uint256 _rewardRate) external onlyOwner { } function setRewardRateBonusMultiplier(uint256 _bonusMultiplier) external onlyOwner { } function setMintEventMod(uint256 _mintEventMod) external onlyOwner { } function setLossEventMod(uint256 _lossEventMod) external onlyOwner { } function setNftMintPriceStage1(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage2(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage3(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage4(uint256 _nftMintPrice) external onlyOwner { } function setAcceptedNftContractOwnership(address _newOwner) external onlyOwner { } function getRandomNumber(uint256 seed) internal view returns (uint256) { } function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) { } }
level1TokenIds[_msgSender()].contains(tokenId),'Data contains not staked token ID'
343,523
level1TokenIds[_msgSender()].contains(tokenId)
'Data contains not staked token ID'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IERC20Mintable is IERC20 { function mint(address to, uint256 amount) external; } interface IBlocBurgers { function reservePrivate(uint256 reserveAmount, address reserveAddress) external; function transferOwnership(address newOwner) external; function ticketCounter() external view returns (uint256); function maxTotalSupply() external view returns (uint256); } contract Staking is IERC721Receiver, Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; event NftsRewarded(address indexed receiver, uint256 indexed amount); uint256 public rewardRate; uint256 public rewardRateBonusMultiplier; uint256 public nftMintPriceStage1; uint256 public nftMintPriceStage2; uint256 public nftMintPriceStage3; uint256 public nftMintPriceStage4; uint256 public lossEventMod; // set 10 for 10% uint256 public mintEventMod; // set 20 for 5% address public acceptedNftAddress; address public rewardTokenAddress; address public vaultAddress; mapping(address => mapping(uint256 => uint256)) public level1Timestamps; mapping(address => EnumerableSet.UintSet) private level1TokenIds; mapping(address => mapping(uint256 => uint256)) public level2Timestamps; mapping(address => EnumerableSet.UintSet) private level2TokenIds; uint256 public lastRandomSeed; constructor( address _acceptedNftAddress, address _rewardTokenAddress, address _vaultAddress, uint256 _rewardRate, uint256 _rewardRateBonusMultiplier, uint256 _nftMintPriceStage1, uint256 _nftMintPriceStage2, uint256 _nftMintPriceStage3, uint256 _nftMintPriceStage4, uint256 _mintEventMod, uint256 _lossEventMod ) { } function stakeToLevel1(uint256[] calldata tokenIds) external { } function unstakeFromLevel1(uint256[] calldata tokenIds) public nonReentrant { } function level1TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function stakeToLevel2(uint256[] calldata tokenIds) external { } function unstakeFromLevel2(uint256[] calldata tokenIds) public nonReentrant { uint256 totalRewards = 0; uint256 totalReservations = 0; uint256 nftsReserved = IBlocBurgers(acceptedNftAddress).ticketCounter(); uint256 maxTotalSupply = IBlocBurgers(acceptedNftAddress).maxTotalSupply(); for (uint256 i; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require(<FILL_ME>) uint256 lastTimestampForTokenId = level2Timestamps[_msgSender()][tokenId]; if (lastTimestampForTokenId > 0) { level2TokenIds[_msgSender()].remove(tokenId); address nftReceiverAddress = _msgSender(); uint256 randomNumber = getRandomNumber(tokenId); if (randomNumber % lossEventMod == 0) { // 10% chance for nft lost nftReceiverAddress = vaultAddress; } else if (randomNumber % mintEventMod == 0) { // 5% chance for new burger, but check supply if (nftsReserved.add(totalReservations.add(1)) <= maxTotalSupply) { totalReservations = totalReservations.add(1); } } lastRandomSeed = randomNumber; IERC721(acceptedNftAddress).safeTransferFrom(address(this), nftReceiverAddress, tokenId, ''); uint256 rewardForTokenId = block.timestamp.sub(lastTimestampForTokenId).mul(rewardRate); uint256 increasedRewardForTokenId = rewardForTokenId.mul(rewardRateBonusMultiplier); totalRewards = totalRewards.add(increasedRewardForTokenId); level2Timestamps[_msgSender()][tokenId] = block.timestamp; } } if (totalReservations > 0) { IBlocBurgers(acceptedNftAddress).reservePrivate(totalReservations, _msgSender()); emit NftsRewarded(_msgSender(), totalReservations); } if (totalRewards > 0) IERC20Mintable(rewardTokenAddress).mint(_msgSender(), totalRewards); } function level2TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function claimRewards() public nonReentrant { } function calculateLevel1Rewards(address ownerAddress) public view returns (uint256) { } function calculateLevel2Rewards(address ownerAddress) public view returns (uint256) { } function calculateTotalRewards(address ownerAddress) public view returns (uint256) { } function mintNftWithRewardTokens(uint256 amount) public nonReentrant { } function setAcceptedNftAddress(address _acceptedNftAddress) external onlyOwner { } function setRewardTokenAddress(address _rewardTokenAddress) external onlyOwner { } function setVaultAddress(address _vaultAddress) external onlyOwner { } function setRewardRate(uint256 _rewardRate) external onlyOwner { } function setRewardRateBonusMultiplier(uint256 _bonusMultiplier) external onlyOwner { } function setMintEventMod(uint256 _mintEventMod) external onlyOwner { } function setLossEventMod(uint256 _lossEventMod) external onlyOwner { } function setNftMintPriceStage1(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage2(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage3(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage4(uint256 _nftMintPrice) external onlyOwner { } function setAcceptedNftContractOwnership(address _newOwner) external onlyOwner { } function getRandomNumber(uint256 seed) internal view returns (uint256) { } function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) { } }
level2TokenIds[_msgSender()].contains(tokenId),'Data contains not staked token ID'
343,523
level2TokenIds[_msgSender()].contains(tokenId)
"Nothing staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IERC20Mintable is IERC20 { function mint(address to, uint256 amount) external; } interface IBlocBurgers { function reservePrivate(uint256 reserveAmount, address reserveAddress) external; function transferOwnership(address newOwner) external; function ticketCounter() external view returns (uint256); function maxTotalSupply() external view returns (uint256); } contract Staking is IERC721Receiver, Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; event NftsRewarded(address indexed receiver, uint256 indexed amount); uint256 public rewardRate; uint256 public rewardRateBonusMultiplier; uint256 public nftMintPriceStage1; uint256 public nftMintPriceStage2; uint256 public nftMintPriceStage3; uint256 public nftMintPriceStage4; uint256 public lossEventMod; // set 10 for 10% uint256 public mintEventMod; // set 20 for 5% address public acceptedNftAddress; address public rewardTokenAddress; address public vaultAddress; mapping(address => mapping(uint256 => uint256)) public level1Timestamps; mapping(address => EnumerableSet.UintSet) private level1TokenIds; mapping(address => mapping(uint256 => uint256)) public level2Timestamps; mapping(address => EnumerableSet.UintSet) private level2TokenIds; uint256 public lastRandomSeed; constructor( address _acceptedNftAddress, address _rewardTokenAddress, address _vaultAddress, uint256 _rewardRate, uint256 _rewardRateBonusMultiplier, uint256 _nftMintPriceStage1, uint256 _nftMintPriceStage2, uint256 _nftMintPriceStage3, uint256 _nftMintPriceStage4, uint256 _mintEventMod, uint256 _lossEventMod ) { } function stakeToLevel1(uint256[] calldata tokenIds) external { } function unstakeFromLevel1(uint256[] calldata tokenIds) public nonReentrant { } function level1TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function stakeToLevel2(uint256[] calldata tokenIds) external { } function unstakeFromLevel2(uint256[] calldata tokenIds) public nonReentrant { } function level2TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function claimRewards() public nonReentrant { uint256 level1TokenIdsSetSize = level1TokenIds[_msgSender()].length(); uint256 level2TokenIdsSetSize = level2TokenIds[_msgSender()].length(); require(<FILL_ME>) uint256 totalRewards = 0; for (uint256 i; i < level1TokenIdsSetSize; i++) { uint256 tokenId = level1TokenIds[_msgSender()].at(i); uint256 lastTimestampForTokenId = level1Timestamps[_msgSender()][tokenId]; if (lastTimestampForTokenId > 0) { uint256 rewardForTokenId = block.timestamp.sub(lastTimestampForTokenId).mul(rewardRate); totalRewards = totalRewards.add(rewardForTokenId); level1Timestamps[_msgSender()][tokenId] = block.timestamp; } } for (uint256 i; i < level2TokenIdsSetSize; i++) { uint256 tokenId = level2TokenIds[_msgSender()].at(i); uint256 lastTimestampForTokenId = level2Timestamps[_msgSender()][tokenId]; if (lastTimestampForTokenId > 0) { uint256 rewardForTokenId = block.timestamp.sub(lastTimestampForTokenId).mul(rewardRate); uint256 increasedRewardForTokenId = rewardForTokenId.mul(rewardRateBonusMultiplier); totalRewards = totalRewards.add(increasedRewardForTokenId); level2Timestamps[_msgSender()][tokenId] = block.timestamp; } } require(totalRewards > 0, "Nothing to claim"); IERC20Mintable(rewardTokenAddress).mint(_msgSender(), totalRewards); } function calculateLevel1Rewards(address ownerAddress) public view returns (uint256) { } function calculateLevel2Rewards(address ownerAddress) public view returns (uint256) { } function calculateTotalRewards(address ownerAddress) public view returns (uint256) { } function mintNftWithRewardTokens(uint256 amount) public nonReentrant { } function setAcceptedNftAddress(address _acceptedNftAddress) external onlyOwner { } function setRewardTokenAddress(address _rewardTokenAddress) external onlyOwner { } function setVaultAddress(address _vaultAddress) external onlyOwner { } function setRewardRate(uint256 _rewardRate) external onlyOwner { } function setRewardRateBonusMultiplier(uint256 _bonusMultiplier) external onlyOwner { } function setMintEventMod(uint256 _mintEventMod) external onlyOwner { } function setLossEventMod(uint256 _lossEventMod) external onlyOwner { } function setNftMintPriceStage1(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage2(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage3(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage4(uint256 _nftMintPrice) external onlyOwner { } function setAcceptedNftContractOwnership(address _newOwner) external onlyOwner { } function getRandomNumber(uint256 seed) internal view returns (uint256) { } function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) { } }
level1TokenIdsSetSize.add(level2TokenIdsSetSize)>0,"Nothing staked"
343,523
level1TokenIdsSetSize.add(level2TokenIdsSetSize)>0
"Exceeds max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IERC20Mintable is IERC20 { function mint(address to, uint256 amount) external; } interface IBlocBurgers { function reservePrivate(uint256 reserveAmount, address reserveAddress) external; function transferOwnership(address newOwner) external; function ticketCounter() external view returns (uint256); function maxTotalSupply() external view returns (uint256); } contract Staking is IERC721Receiver, Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; event NftsRewarded(address indexed receiver, uint256 indexed amount); uint256 public rewardRate; uint256 public rewardRateBonusMultiplier; uint256 public nftMintPriceStage1; uint256 public nftMintPriceStage2; uint256 public nftMintPriceStage3; uint256 public nftMintPriceStage4; uint256 public lossEventMod; // set 10 for 10% uint256 public mintEventMod; // set 20 for 5% address public acceptedNftAddress; address public rewardTokenAddress; address public vaultAddress; mapping(address => mapping(uint256 => uint256)) public level1Timestamps; mapping(address => EnumerableSet.UintSet) private level1TokenIds; mapping(address => mapping(uint256 => uint256)) public level2Timestamps; mapping(address => EnumerableSet.UintSet) private level2TokenIds; uint256 public lastRandomSeed; constructor( address _acceptedNftAddress, address _rewardTokenAddress, address _vaultAddress, uint256 _rewardRate, uint256 _rewardRateBonusMultiplier, uint256 _nftMintPriceStage1, uint256 _nftMintPriceStage2, uint256 _nftMintPriceStage3, uint256 _nftMintPriceStage4, uint256 _mintEventMod, uint256 _lossEventMod ) { } function stakeToLevel1(uint256[] calldata tokenIds) external { } function unstakeFromLevel1(uint256[] calldata tokenIds) public nonReentrant { } function level1TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function stakeToLevel2(uint256[] calldata tokenIds) external { } function unstakeFromLevel2(uint256[] calldata tokenIds) public nonReentrant { } function level2TokenIdsForAddress(address ownerAddress) external view returns (uint256[] memory) { } function claimRewards() public nonReentrant { } function calculateLevel1Rewards(address ownerAddress) public view returns (uint256) { } function calculateLevel2Rewards(address ownerAddress) public view returns (uint256) { } function calculateTotalRewards(address ownerAddress) public view returns (uint256) { } function mintNftWithRewardTokens(uint256 amount) public nonReentrant { require(amount > 0, "Wrong amount"); uint256 nftsReserved = IBlocBurgers(acceptedNftAddress).ticketCounter(); uint256 maxTotalSupply = IBlocBurgers(acceptedNftAddress).maxTotalSupply(); require(<FILL_ME>) uint256 tokenBalance = IERC20Mintable(rewardTokenAddress).balanceOf(_msgSender()); uint256 nftMintPrice = nftMintPriceStage4; if (nftsReserved <= 1000) { nftMintPrice = nftMintPriceStage1; } else if (nftsReserved <= 2000) { nftMintPrice = nftMintPriceStage2; } else if (nftsReserved <= 3000) { nftMintPrice = nftMintPriceStage3; } uint256 payableTokenAmount = nftMintPrice.mul(amount); require(payableTokenAmount <= tokenBalance, "Not enough token balance"); uint256 allowance = IERC20Mintable(rewardTokenAddress).allowance(_msgSender(), address(this)); require(payableTokenAmount <= allowance, "Not enough token allowance"); IERC20Mintable(rewardTokenAddress).transferFrom(_msgSender(), vaultAddress, payableTokenAmount); IBlocBurgers(acceptedNftAddress).reservePrivate(amount, _msgSender()); } function setAcceptedNftAddress(address _acceptedNftAddress) external onlyOwner { } function setRewardTokenAddress(address _rewardTokenAddress) external onlyOwner { } function setVaultAddress(address _vaultAddress) external onlyOwner { } function setRewardRate(uint256 _rewardRate) external onlyOwner { } function setRewardRateBonusMultiplier(uint256 _bonusMultiplier) external onlyOwner { } function setMintEventMod(uint256 _mintEventMod) external onlyOwner { } function setLossEventMod(uint256 _lossEventMod) external onlyOwner { } function setNftMintPriceStage1(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage2(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage3(uint256 _nftMintPrice) external onlyOwner { } function setNftMintPriceStage4(uint256 _nftMintPrice) external onlyOwner { } function setAcceptedNftContractOwnership(address _newOwner) external onlyOwner { } function getRandomNumber(uint256 seed) internal view returns (uint256) { } function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) { } }
nftsReserved.add(amount)<=maxTotalSupply,"Exceeds max supply"
343,523
nftsReserved.add(amount)<=maxTotalSupply
"20"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ Token storage token = tokens[tokenIndex]; require(<FILL_ME>) Whitelist memory balanceRequest; balanceRequest.tokenType = "ERC1155"; balanceRequest.tokenAddress = address(this); balanceRequest.tokenId = token.mintingConfig.fusionTokenID; uint256 balance = getExternalTokenBalance(msg.sender, balanceRequest); require(balance > token.mintingConfig.fusionQuantity, "21"); uint256 numToIssue = amount.div(token.mintingConfig.fusionQuantity); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = tokenIndex; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = numToIssue; _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); _burn(msg.sender, token.mintingConfig.fusionTokenID, amount); emit Fused(idsToMint, msg.sender, quantitiesToMint); } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
token.mintingConfig.fusionOpen,"20"
343,526
token.mintingConfig.fusionOpen
"5"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(<FILL_ME>) require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9"); require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10"); require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11"); totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(!paused() && msg.value >= totalPrice, "3"); for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
isSaleOpen(_tokenIndexes[i]),"5"
343,526
isSaleOpen(_tokenIndexes[i])
"8"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(isSaleOpen(_tokenIndexes[i]), "5"); require(<FILL_ME>) require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9"); require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10"); require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11"); totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(!paused() && msg.value >= totalPrice, "3"); for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i])<=_merkleAmounts[i],"8"
343,526
tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i])<=_merkleAmounts[i]
"9"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(isSaleOpen(_tokenIndexes[i]), "5"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8"); require(<FILL_ME>) require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10"); require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11"); totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(!paused() && msg.value >= totalPrice, "3"); for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i])<=tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet,"9"
343,526
tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i])<=tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet
"10"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(isSaleOpen(_tokenIndexes[i]), "5"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9"); require(<FILL_ME>) require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11"); totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(!paused() && msg.value >= totalPrice, "3"); for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
_quantities[i]<=tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn,"10"
343,526
_quantities[i]<=tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn
"11"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(isSaleOpen(_tokenIndexes[i]), "5"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9"); require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10"); require(<FILL_ME>) totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(!paused() && msg.value >= totalPrice, "3"); for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
getTokenSupply(_tokenIndexes[i])+_quantities[i]<=tokens[_tokenIndexes[i]].mintingConfig.maxSupply,"11"
343,526
getTokenSupply(_tokenIndexes[i])+_quantities[i]<=tokens[_tokenIndexes[i]].mintingConfig.maxSupply
"3"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { uint256 totalPrice = 0; for (uint i=0; i< _tokenIndexes.length; i++) { require(isSaleOpen(_tokenIndexes[i]), "5"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= _merkleAmounts[i], "8"); require(tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]) <= tokens[_tokenIndexes[i]].mintingConfig.maxPerWallet, "9"); require(_quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxMintPerTxn, "10"); require(getTokenSupply(_tokenIndexes[i]) + _quantities[i] <= tokens[_tokenIndexes[i]].mintingConfig.maxSupply, "11"); totalPrice = totalPrice.add(_quantities[i].mul(tokens[_tokenIndexes[i]].mintingConfig.mintPrice)); } require(<FILL_ME>) for (uint i=0; i< _tokenIndexes.length; i++) { uint256 quantityToMint = getQualifiedAllocation(msg.sender,_tokenIndexes[i], _quantities[i],_merkleAmounts[i],_merkleProofs[i], true); require(quantityToMint > 0 && quantityToMint >= _quantities[i], "4"); uint256[] memory idsToMint; uint256[] memory quantitiesToMint; idsToMint = new uint256[](1); idsToMint[0] = _tokenIndexes[i]; quantitiesToMint = new uint256[](1); quantitiesToMint[0] = _quantities[i]; tokens[_tokenIndexes[i]].claimedTokens[msg.sender] = tokens[_tokenIndexes[i]].claimedTokens[msg.sender].add(_quantities[i]); _mintBatch(msg.sender, idsToMint, quantitiesToMint, ""); } emit Purchased(_tokenIndexes, msg.sender, _quantities); } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
!paused()&&msg.value>=totalPrice,"3"
343,526
!paused()&&msg.value>=totalPrice
"12"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { Token storage token = tokens[tokenIndex]; uint256 totalAllowed = token.mintingConfig.maxPerWallet; if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ totalAllowed = 0; } uint256 whiteListsValidAmounts = 0; if(token.numTokenWhitelists > 0){ uint256 balance = 0; uint256 _wl_amount = 0; for (uint i=0; i < token.numTokenWhitelists; i++) { if(token.whitelistData[i].active){ _wl_amount = verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly); if(token.whiteListConfig.requireAllWhiteLists){ require(<FILL_ME>) } if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ Whitelist memory balanceRequest; balanceRequest.tokenType = token.whitelistData[i].tokenType; balanceRequest.tokenAddress = token.whitelistData[i].tokenAddress; balanceRequest.tokenId = token.whitelistData[i].tokenId; balance = getExternalTokenBalance(sender, balanceRequest); totalAllowed += balance; whiteListsValidAmounts += balance; } else{ whiteListsValidAmounts = _wl_amount; } } } } else{ whiteListsValidAmounts = token.mintingConfig.maxMintPerTxn; } if(!returnAllocationOnly){ require(whiteListsValidAmounts > 0, "13"); if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ require(token.claimedTokens[sender].add(quantity) <= totalAllowed, "14"); } } if(token.whiteListConfig.hasMerkleRoot){ require( verifyMerkleProof(merkleProof, tokenIndex, amount), "15" ); //whiteListsValidAmounts += quantity; } if(returnAllocationOnly){ return whiteListsValidAmounts < quantity ? whiteListsValidAmounts : quantity; } else{ return whiteListsValidAmounts; } } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
verifyWhitelist(sender,tokenIndex,i,returnAllocationOnly)>0,"12"
343,526
verifyWhitelist(sender,tokenIndex,i,returnAllocationOnly)>0
"14"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { Token storage token = tokens[tokenIndex]; uint256 totalAllowed = token.mintingConfig.maxPerWallet; if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ totalAllowed = 0; } uint256 whiteListsValidAmounts = 0; if(token.numTokenWhitelists > 0){ uint256 balance = 0; uint256 _wl_amount = 0; for (uint i=0; i < token.numTokenWhitelists; i++) { if(token.whitelistData[i].active){ _wl_amount = verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly); if(token.whiteListConfig.requireAllWhiteLists){ require( verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly) > 0, "12"); } if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ Whitelist memory balanceRequest; balanceRequest.tokenType = token.whitelistData[i].tokenType; balanceRequest.tokenAddress = token.whitelistData[i].tokenAddress; balanceRequest.tokenId = token.whitelistData[i].tokenId; balance = getExternalTokenBalance(sender, balanceRequest); totalAllowed += balance; whiteListsValidAmounts += balance; } else{ whiteListsValidAmounts = _wl_amount; } } } } else{ whiteListsValidAmounts = token.mintingConfig.maxMintPerTxn; } if(!returnAllocationOnly){ require(whiteListsValidAmounts > 0, "13"); if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ require(<FILL_ME>) } } if(token.whiteListConfig.hasMerkleRoot){ require( verifyMerkleProof(merkleProof, tokenIndex, amount), "15" ); //whiteListsValidAmounts += quantity; } if(returnAllocationOnly){ return whiteListsValidAmounts < quantity ? whiteListsValidAmounts : quantity; } else{ return whiteListsValidAmounts; } } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
token.claimedTokens[sender].add(quantity)<=totalAllowed,"14"
343,526
token.claimedTokens[sender].add(quantity)<=totalAllowed
"15"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { Token storage token = tokens[tokenIndex]; uint256 totalAllowed = token.mintingConfig.maxPerWallet; if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ totalAllowed = 0; } uint256 whiteListsValidAmounts = 0; if(token.numTokenWhitelists > 0){ uint256 balance = 0; uint256 _wl_amount = 0; for (uint i=0; i < token.numTokenWhitelists; i++) { if(token.whitelistData[i].active){ _wl_amount = verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly); if(token.whiteListConfig.requireAllWhiteLists){ require( verifyWhitelist(sender, tokenIndex, i, returnAllocationOnly) > 0, "12"); } if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ Whitelist memory balanceRequest; balanceRequest.tokenType = token.whitelistData[i].tokenType; balanceRequest.tokenAddress = token.whitelistData[i].tokenAddress; balanceRequest.tokenId = token.whitelistData[i].tokenId; balance = getExternalTokenBalance(sender, balanceRequest); totalAllowed += balance; whiteListsValidAmounts += balance; } else{ whiteListsValidAmounts = _wl_amount; } } } } else{ whiteListsValidAmounts = token.mintingConfig.maxMintPerTxn; } if(!returnAllocationOnly){ require(whiteListsValidAmounts > 0, "13"); if(token.whiteListConfig.maxQuantityMappedByWhitelistHoldings){ require(token.claimedTokens[sender].add(quantity) <= totalAllowed, "14"); } } if(token.whiteListConfig.hasMerkleRoot){ require(<FILL_ME>) //whiteListsValidAmounts += quantity; } if(returnAllocationOnly){ return whiteListsValidAmounts < quantity ? whiteListsValidAmounts : quantity; } else{ return whiteListsValidAmounts; } } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
verifyMerkleProof(merkleProof,tokenIndex,amount),"15"
343,526
verifyMerkleProof(merkleProof,tokenIndex,amount)
"16"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import './Abstract1155Factory.sol'; import './Utils.sol'; import "hardhat/console.sol"; contract Commerce is Abstract1155Factory, ReentrancyGuard { using SafeMath for uint256; mapping(uint256 => Token) public tokens; event Purchased(uint[] index, address indexed account, uint[] amount); event Fused(uint[] index, address indexed account, uint[] amount); struct Token { string ipfsMetadataHash; string extraDataUri; mapping(address => uint256) claimedTokens; mapping(uint => address) redeemableContracts; uint256 numRedeemableContracts; mapping(uint => Whitelist) whitelistData; uint256 numTokenWhitelists; MintingConfig mintingConfig; WhiteListConfig whiteListConfig; bool isTokenPack; } struct MintingConfig { bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; uint256 numMinted; uint256 fusionTokenID; uint256 fusionQuantity; bool fusionOpen; } struct WhiteListConfig { bool maxQuantityMappedByWhitelistHoldings; bool requireAllWhiteLists; bool hasMerkleRoot; bytes32 merkleRoot; } struct Whitelist { string tokenType; address tokenAddress; uint mustOwnQuantity; uint256 tokenId; bool active; } string public _contractURI; constructor( string memory _name, string memory _symbol, address[] memory _admins, string memory _contract_URI ) ERC1155("ipfs://") { } function getOpenSaleTokens() public view returns (string memory){ } function editToken( uint256 _tokenIndex, string memory _ipfsMetadataHash, string memory _extraDataUri, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, uint256 _maxPerWallet, bool _maxQuantityMappedByWhitelistHoldings, bool _requireAllWhiteLists, address[] memory _redeemableContracts ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addFusion( uint256 _tokenIndex, uint256 _fusionTokenID, uint256 _fusionQuantity ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function toggleFusion( uint256 _tokenIndex, bool _fusionOpen ) public onlyRole(DEFAULT_ADMIN_ROLE) { } function addWhiteList( uint256 _tokenIndex, string memory _tokenType, address _tokenAddress, uint _tokenId, uint _mustOwnQuantity )external onlyRole(DEFAULT_ADMIN_ROLE) { } function disableWhiteList( uint256 _tokenIndex, uint _whiteListIndexToRemove )external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( uint256 _tokenIndex, bytes32 _merkleRoot, bool enabled ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 tokenIndex, uint256 amount ) external { } function fusion( uint256 tokenIndex, uint256 amount ) external nonReentrant{ } function purchase( uint256[] calldata _quantities, uint256[] calldata _tokenIndexes, uint256[] calldata _merkleAmounts, bytes32[][] calldata _merkleProofs ) external payable nonReentrant { } function mintBatch( address to, uint256[] calldata qty, uint256[] calldata _tokens) public onlyRole(DEFAULT_ADMIN_ROLE) { } function getQualifiedAllocation(address sender, uint256 tokenIndex, uint256 quantity, uint256 amount, bytes32[] calldata merkleProof, bool returnAllocationOnly) public view returns (uint256) { } function verifyWhitelist(address sender, uint256 tokenIndex, uint whitelistIndex, bool returnAllocationOnly) internal view returns (uint256) { } function getExternalTokenBalance (address sender, Whitelist memory balanceRequest) public view returns (uint256) { } function isSaleOpen(uint256 tokenIndex) public view returns (bool) { } function toggleSale(uint256 mpIndex, bool on) public onlyRole(DEFAULT_ADMIN_ROLE) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function char(bytes1 b) internal view returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function uri(uint256 _id) public view override returns (string memory) { require(<FILL_ME>) if(Utils.compareStrings(tokens[_id].ipfsMetadataHash, "")){ return string(abi.encodePacked(super.uri(_id), Strings.toString(_id))); } else{ return string(abi.encodePacked(tokens[_id].ipfsMetadataHash)); } } function getTokenSupply(uint256 tokenIndex) public view returns (uint256) { } } contract WhitelistContract1155 { function balanceOf(address account, uint256 id) external view returns (uint256) {} } contract WhitelistContract721 { function balanceOf(address account) external view returns (uint256) {} }
getTokenSupply(_id)>0,"16"
343,526
getTokenSupply(_id)>0
null
/* * This contract is a registry which maps the Ethereum Address to their * endpoint i.e sockets. * The Ethereum address registers his address in this registry. * @proofsuite was here testing on the mainnet */ pragma solidity ^0.4.11; contract EndpointRegistry{ string constant public contract_version = "0.2._"; event AddressRegistered(address indexed eth_address, string socket); // Mapping of Ethereum Addresses => SocketEndpoints mapping (address => string) address_to_socket; // Mapping of SocketEndpoints => Ethereum Addresses mapping (string => address) socket_to_address; // list of all the Registered Addresses , still not used. address[] eth_addresses; modifier noEmptyString(string str) { require(<FILL_ME>) _; } /* * @notice Registers the Ethereum Address to the Endpoint socket. * @dev Registers the Ethereum Address to the Endpoint socket. * @param string of socket in this format "127.0.0.1:40001" */ function registerEndpoint(string socket) public noEmptyString(socket) { } /* * @notice Finds the socket if given an Ethereum Address * @dev Finds the socket if given an Ethereum Address * @param An eth_address which is a 20 byte Ethereum Address * @return A socket which the current Ethereum Address is using. */ function findEndpointByAddress(address eth_address) public constant returns (string socket) { } /* * @notice Finds Ethreum Address if given an existing socket address * @dev Finds Ethreum Address if given an existing socket address * @param string of socket in this format "127.0.0.1:40001" * @return An ethereum address */ function findAddressByEndpoint(string socket) public constant returns (address eth_address) { } function equals(string a, string b) internal pure returns (bool result) { } }
equals(str,"")!=true
343,554
equals(str,"")!=true
null
pragma solidity ^0.4.21; interface itoken { function freezeAccount(address _target, bool _freeze) external; function freezeAccountPartialy(address _target, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function balanceOf(address _owner) external view returns (uint256 balance); // function transferOwnership(address newOwner) external; function allowance(address _owner, address _spender) external view returns (uint256); function frozenAccount(address _account) external view returns (bool); function frozenAmount(address _account) external view returns (uint256); } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier 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 { } } contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { } } contract OwnerContract is Claimable { Claimable public ownedContract; address internal origOwner; /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev change the owner of the contract from this contract address to the original one. * */ function transferOwnershipBack() onlyOwner public { } /** * @dev change the owner of the contract from this contract address to another one. * * @param _nextOwner the contract address that will be next Owner of the original Contract */ function changeOwnershipto(address _nextOwner) onlyOwner public { } } contract ReleaseToken is OwnerContract { using SafeMath for uint256; // record lock time period and related token amount struct TimeRec { uint256 amount; uint256 remain; uint256 endTime; uint256 releasePeriodEndTime; } itoken internal owned; address[] public frozenAccounts; mapping (address => TimeRec[]) frozenTimes; // mapping (address => uint256) releasedAmounts; mapping (address => uint256) preReleaseAmounts; event ReleaseFunds(address _target, uint256 _amount); /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev remove an account from the frozen accounts list * * @param _ind the index of the account in the list */ function removeAccount(uint _ind) internal returns (bool) { } /** * @dev remove a time records from the time records list of one account * * @param _target the account that holds a list of time records which record the freeze period */ function removeLockedTime(address _target, uint _ind) internal returns (bool) { } /** * @dev get total remain locked tokens of an account * * @param _account the owner of some amount of tokens */ function getRemainLockedOf(address _account) public view returns (uint256) { } /** * judge whether we need to release some of the locked token * */ function needRelease() public view returns (bool) { } /** * @dev freeze the amount of tokens of an account * * @param _target the owner of some amount of tokens * @param _value the amount of the tokens * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function freeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { } /** * @dev transfer an amount of tokens to an account, and then freeze the tokens * * @param _target the account address that will hold an amount of the tokens * @param _value the amount of the tokens which has been transferred * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function transferAndFreeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { //require(_tokenOwner != address(0)); require(_target != address(0)); require(_value > 0); require(_frozenEndTime > 0); // check firstly that the allowance of this contract has been set require(<FILL_ME>) // now we need transfer the funds before freeze them require(owned.transferFrom(msg.sender, _target, _value)); // freeze the account after transfering funds if (!freeze(_target, _value, _frozenEndTime, _releasePeriod)) { return false; } return true; } /** * release the token which are locked for once and will be total released at once * after the end point of the lock period */ function releaseAllOnceLock() onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account, which only have only one locked time * and don't have release stage. * * @param _target the account address that hold an amount of locked tokens */ function releaseAccount(address _target) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account with several stages * this need the contract get approval from the account by call approve() in the token contract * * @param _target the account address that hold an amount of locked tokens */ function releaseWithStage(address _target/*, address _dest*/) onlyOwner public returns (bool) { } /** * @dev set the new endtime of the released time of an account * * @param _target the owner of some amount of tokens * @param _oldEndTime the original endtime for the lock period * @param _newEndTime the new endtime for the lock period */ function setNewEndtime(address _target, uint256 _oldEndTime, uint256 _newEndTime) onlyOwner public returns (bool) { } /** * @dev set the new released period length of an account * * @param _target the owner of some amount of tokens * @param _origEndTime the original endtime for the lock period * @param _duration the new releasing period */ function setNewReleasePeriod(address _target, uint256 _origEndTime, uint256 _duration) onlyOwner public returns (bool) { } /** * @dev get the locked stages of an account * * @param _target the owner of some amount of tokens */ function getLockedStages(address _target) public view returns (uint) { } /** * @dev get the endtime of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getEndTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain unrleased tokens of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain releasing period of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainReleaseTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev release the locked tokens owned by a number of accounts * * @param _targets the accounts list that hold an amount of locked tokens */ function releaseMultiAccounts(address[] _targets) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account * * @param _targets the account addresses list that hold amounts of locked tokens */ function releaseMultiWithStage(address[] _targets) onlyOwner public returns (bool) { } /** * @dev freeze multiple of the accounts * * @param _targets the owners of some amount of tokens * @param _values the amounts of the tokens * @param _frozenEndTimes the list of the end time of the lock period, unit is second * @param _releasePeriods the list of the locking period, unit is second */ function freezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } /** * @dev transfer a list of amounts of tokens to a list of accounts, and then freeze the tokens * * @param _targets the account addresses that will hold a list of amounts of the tokens * @param _values the amounts of the tokens which have been transferred * @param _frozenEndTimes the end time list of the locked periods, unit is second * @param _releasePeriods the list of locking periods, unit is second */ function transferAndFreezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } }
owned.allowance(msg.sender,this)>0
343,651
owned.allowance(msg.sender,this)>0
null
pragma solidity ^0.4.21; interface itoken { function freezeAccount(address _target, bool _freeze) external; function freezeAccountPartialy(address _target, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function balanceOf(address _owner) external view returns (uint256 balance); // function transferOwnership(address newOwner) external; function allowance(address _owner, address _spender) external view returns (uint256); function frozenAccount(address _account) external view returns (bool); function frozenAmount(address _account) external view returns (uint256); } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier 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 { } } contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { } } contract OwnerContract is Claimable { Claimable public ownedContract; address internal origOwner; /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev change the owner of the contract from this contract address to the original one. * */ function transferOwnershipBack() onlyOwner public { } /** * @dev change the owner of the contract from this contract address to another one. * * @param _nextOwner the contract address that will be next Owner of the original Contract */ function changeOwnershipto(address _nextOwner) onlyOwner public { } } contract ReleaseToken is OwnerContract { using SafeMath for uint256; // record lock time period and related token amount struct TimeRec { uint256 amount; uint256 remain; uint256 endTime; uint256 releasePeriodEndTime; } itoken internal owned; address[] public frozenAccounts; mapping (address => TimeRec[]) frozenTimes; // mapping (address => uint256) releasedAmounts; mapping (address => uint256) preReleaseAmounts; event ReleaseFunds(address _target, uint256 _amount); /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev remove an account from the frozen accounts list * * @param _ind the index of the account in the list */ function removeAccount(uint _ind) internal returns (bool) { } /** * @dev remove a time records from the time records list of one account * * @param _target the account that holds a list of time records which record the freeze period */ function removeLockedTime(address _target, uint _ind) internal returns (bool) { } /** * @dev get total remain locked tokens of an account * * @param _account the owner of some amount of tokens */ function getRemainLockedOf(address _account) public view returns (uint256) { } /** * judge whether we need to release some of the locked token * */ function needRelease() public view returns (bool) { } /** * @dev freeze the amount of tokens of an account * * @param _target the owner of some amount of tokens * @param _value the amount of the tokens * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function freeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { } /** * @dev transfer an amount of tokens to an account, and then freeze the tokens * * @param _target the account address that will hold an amount of the tokens * @param _value the amount of the tokens which has been transferred * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function transferAndFreeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { //require(_tokenOwner != address(0)); require(_target != address(0)); require(_value > 0); require(_frozenEndTime > 0); // check firstly that the allowance of this contract has been set require(owned.allowance(msg.sender, this) > 0); // now we need transfer the funds before freeze them require(<FILL_ME>) // freeze the account after transfering funds if (!freeze(_target, _value, _frozenEndTime, _releasePeriod)) { return false; } return true; } /** * release the token which are locked for once and will be total released at once * after the end point of the lock period */ function releaseAllOnceLock() onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account, which only have only one locked time * and don't have release stage. * * @param _target the account address that hold an amount of locked tokens */ function releaseAccount(address _target) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account with several stages * this need the contract get approval from the account by call approve() in the token contract * * @param _target the account address that hold an amount of locked tokens */ function releaseWithStage(address _target/*, address _dest*/) onlyOwner public returns (bool) { } /** * @dev set the new endtime of the released time of an account * * @param _target the owner of some amount of tokens * @param _oldEndTime the original endtime for the lock period * @param _newEndTime the new endtime for the lock period */ function setNewEndtime(address _target, uint256 _oldEndTime, uint256 _newEndTime) onlyOwner public returns (bool) { } /** * @dev set the new released period length of an account * * @param _target the owner of some amount of tokens * @param _origEndTime the original endtime for the lock period * @param _duration the new releasing period */ function setNewReleasePeriod(address _target, uint256 _origEndTime, uint256 _duration) onlyOwner public returns (bool) { } /** * @dev get the locked stages of an account * * @param _target the owner of some amount of tokens */ function getLockedStages(address _target) public view returns (uint) { } /** * @dev get the endtime of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getEndTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain unrleased tokens of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain releasing period of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainReleaseTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev release the locked tokens owned by a number of accounts * * @param _targets the accounts list that hold an amount of locked tokens */ function releaseMultiAccounts(address[] _targets) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account * * @param _targets the account addresses list that hold amounts of locked tokens */ function releaseMultiWithStage(address[] _targets) onlyOwner public returns (bool) { } /** * @dev freeze multiple of the accounts * * @param _targets the owners of some amount of tokens * @param _values the amounts of the tokens * @param _frozenEndTimes the list of the end time of the lock period, unit is second * @param _releasePeriods the list of the locking period, unit is second */ function freezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } /** * @dev transfer a list of amounts of tokens to a list of accounts, and then freeze the tokens * * @param _targets the account addresses that will hold a list of amounts of the tokens * @param _values the amounts of the tokens which have been transferred * @param _frozenEndTimes the end time list of the locked periods, unit is second * @param _releasePeriods the list of locking periods, unit is second */ function transferAndFreezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } }
owned.transferFrom(msg.sender,_target,_value)
343,651
owned.transferFrom(msg.sender,_target,_value)
null
pragma solidity ^0.4.21; interface itoken { function freezeAccount(address _target, bool _freeze) external; function freezeAccountPartialy(address _target, uint256 _value) external; function transferFrom(address _from, address _to, uint256 _value) external returns (bool); function balanceOf(address _owner) external view returns (uint256 balance); // function transferOwnership(address newOwner) external; function allowance(address _owner, address _spender) external view returns (uint256); function frozenAccount(address _account) external view returns (bool); function frozenAmount(address _account) external view returns (uint256); } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier 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 { } } contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { } } contract OwnerContract is Claimable { Claimable public ownedContract; address internal origOwner; /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev change the owner of the contract from this contract address to the original one. * */ function transferOwnershipBack() onlyOwner public { } /** * @dev change the owner of the contract from this contract address to another one. * * @param _nextOwner the contract address that will be next Owner of the original Contract */ function changeOwnershipto(address _nextOwner) onlyOwner public { } } contract ReleaseToken is OwnerContract { using SafeMath for uint256; // record lock time period and related token amount struct TimeRec { uint256 amount; uint256 remain; uint256 endTime; uint256 releasePeriodEndTime; } itoken internal owned; address[] public frozenAccounts; mapping (address => TimeRec[]) frozenTimes; // mapping (address => uint256) releasedAmounts; mapping (address => uint256) preReleaseAmounts; event ReleaseFunds(address _target, uint256 _amount); /** * @dev bind a contract as its owner * * @param _contract the contract address that will be binded by this Owner Contract */ function bindContract(address _contract) onlyOwner public returns (bool) { } /** * @dev remove an account from the frozen accounts list * * @param _ind the index of the account in the list */ function removeAccount(uint _ind) internal returns (bool) { } /** * @dev remove a time records from the time records list of one account * * @param _target the account that holds a list of time records which record the freeze period */ function removeLockedTime(address _target, uint _ind) internal returns (bool) { } /** * @dev get total remain locked tokens of an account * * @param _account the owner of some amount of tokens */ function getRemainLockedOf(address _account) public view returns (uint256) { } /** * judge whether we need to release some of the locked token * */ function needRelease() public view returns (bool) { } /** * @dev freeze the amount of tokens of an account * * @param _target the owner of some amount of tokens * @param _value the amount of the tokens * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function freeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { } /** * @dev transfer an amount of tokens to an account, and then freeze the tokens * * @param _target the account address that will hold an amount of the tokens * @param _value the amount of the tokens which has been transferred * @param _frozenEndTime the end time of the lock period, unit is second * @param _releasePeriod the locking period, unit is second */ function transferAndFreeze(address _target, uint256 _value, uint256 _frozenEndTime, uint256 _releasePeriod) onlyOwner public returns (bool) { } /** * release the token which are locked for once and will be total released at once * after the end point of the lock period */ function releaseAllOnceLock() onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account, which only have only one locked time * and don't have release stage. * * @param _target the account address that hold an amount of locked tokens */ function releaseAccount(address _target) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account with several stages * this need the contract get approval from the account by call approve() in the token contract * * @param _target the account address that hold an amount of locked tokens */ function releaseWithStage(address _target/*, address _dest*/) onlyOwner public returns (bool) { } /** * @dev set the new endtime of the released time of an account * * @param _target the owner of some amount of tokens * @param _oldEndTime the original endtime for the lock period * @param _newEndTime the new endtime for the lock period */ function setNewEndtime(address _target, uint256 _oldEndTime, uint256 _newEndTime) onlyOwner public returns (bool) { } /** * @dev set the new released period length of an account * * @param _target the owner of some amount of tokens * @param _origEndTime the original endtime for the lock period * @param _duration the new releasing period */ function setNewReleasePeriod(address _target, uint256 _origEndTime, uint256 _duration) onlyOwner public returns (bool) { } /** * @dev get the locked stages of an account * * @param _target the owner of some amount of tokens */ function getLockedStages(address _target) public view returns (uint) { } /** * @dev get the endtime of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getEndTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain unrleased tokens of the locked stages of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev get the remain releasing period of an account * * @param _target the owner of some amount of tokens * @param _num the stage number of the releasing period */ function getRemainReleaseTimeOfStage(address _target, uint _num) public view returns (uint256) { } /** * @dev release the locked tokens owned by a number of accounts * * @param _targets the accounts list that hold an amount of locked tokens */ function releaseMultiAccounts(address[] _targets) onlyOwner public returns (bool) { } /** * @dev release the locked tokens owned by an account * * @param _targets the account addresses list that hold amounts of locked tokens */ function releaseMultiWithStage(address[] _targets) onlyOwner public returns (bool) { require(_targets.length != 0); bool res = false; uint256 i = 0; while (i < _targets.length) { require(<FILL_ME>) res = releaseWithStage(_targets[i]) || res; // as long as there is one true transaction, then the result will be true i = i.add(1); } return res; } /** * @dev freeze multiple of the accounts * * @param _targets the owners of some amount of tokens * @param _values the amounts of the tokens * @param _frozenEndTimes the list of the end time of the lock period, unit is second * @param _releasePeriods the list of the locking period, unit is second */ function freezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } /** * @dev transfer a list of amounts of tokens to a list of accounts, and then freeze the tokens * * @param _targets the account addresses that will hold a list of amounts of the tokens * @param _values the amounts of the tokens which have been transferred * @param _frozenEndTimes the end time list of the locked periods, unit is second * @param _releasePeriods the list of locking periods, unit is second */ function transferAndFreezeMulti(address[] _targets, uint256[] _values, uint256[] _frozenEndTimes, uint256[] _releasePeriods) onlyOwner public returns (bool) { } }
_targets[i]!=address(0)
343,651
_targets[i]!=address(0)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { require(<FILL_ME>) require(!isNullAddress(_to)); require(balanceOf(_from) > 0); uint prevBalances = balanceOf(_from) + balanceOf(_to); celebIdToOwner[_celebId] = _to; userToNumCelebs[_from]--; userToNumCelebs[_to]++; // Clear outstanding approvals delete celebIdToApprovedRecipient[_celebId]; Transfer(_from, _to, _celebId); assert(balanceOf(_from) + balanceOf(_to) == prevBalances); } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
ownerOf(_celebId)==_from
343,810
ownerOf(_celebId)==_from
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { require(ownerOf(_celebId) == _from); require(<FILL_ME>) require(balanceOf(_from) > 0); uint prevBalances = balanceOf(_from) + balanceOf(_to); celebIdToOwner[_celebId] = _to; userToNumCelebs[_from]--; userToNumCelebs[_to]++; // Clear outstanding approvals delete celebIdToApprovedRecipient[_celebId]; Transfer(_from, _to, _celebId); assert(balanceOf(_from) + balanceOf(_to) == prevBalances); } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
!isNullAddress(_to)
343,810
!isNullAddress(_to)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { require(ownerOf(_celebId) == _from); require(!isNullAddress(_to)); require(<FILL_ME>) uint prevBalances = balanceOf(_from) + balanceOf(_to); celebIdToOwner[_celebId] = _to; userToNumCelebs[_from]--; userToNumCelebs[_to]++; // Clear outstanding approvals delete celebIdToApprovedRecipient[_celebId]; Transfer(_from, _to, _celebId); assert(balanceOf(_from) + balanceOf(_to) == prevBalances); } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
balanceOf(_from)>0
343,810
balanceOf(_from)>0
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { } function buy(uint _celebId) payable public { address prevOwner = ownerOf(_celebId); uint currentPrice = celebIdToPrice[_celebId]; require(prevOwner != msg.sender); require(<FILL_ME>) require(msg.value >= currentPrice); // Take a cut off the payment uint payment = uint(SafeMath.div(SafeMath.mul(currentPrice, 92), 100)); uint leftover = SafeMath.sub(msg.value, currentPrice); uint newPrice; _transfer(prevOwner, msg.sender, _celebId); if (currentPrice < GROWTH_BUMP) { newPrice = SafeMath.mul(currentPrice, 2); } else { newPrice = SafeMath.div(SafeMath.mul(currentPrice, PRICE_INCREASE_SCALE), 100); } celebIdToPrice[_celebId] = newPrice; if (prevOwner != address(this)) { prevOwner.transfer(payment); } CelebSold(_celebId, currentPrice, newPrice, celebs[_celebId].name, prevOwner, msg.sender); msg.sender.transfer(leftover); } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
!isNullAddress(msg.sender)
343,810
!isNullAddress(msg.sender)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { require(<FILL_ME>) coauthor = _coauthor; } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
!isNullAddress(_coauthor)
343,810
!isNullAddress(_coauthor)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { require(<FILL_ME>) KPOP_ARENA_CONTRACT_ADDRESS = _address; } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
!isNullAddress(_address)
343,810
!isNullAddress(_address)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { require(ownerOf(_celebId) == _from); require(<FILL_ME>) require(!isNullAddress(_to)); _transfer(_from, _to, _celebId); } function takeOwnership(uint _celebId) public { } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
isApproved(_to,_celebId)
343,810
isApproved(_to,_celebId)
null
// KpopCeleb is a ERC-721 celeb (https://github.com/ethereum/eips/issues/721) // Kpop celebrity cards as digital collectibles // Kpop.io is the official website pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC721 { function approve(address _to, uint _celebId) public; function balanceOf(address _owner) public view returns (uint balance); function implementsERC721() public pure returns (bool); function ownerOf(uint _celebId) public view returns (address addr); function takeOwnership(uint _celebId) public; function totalSupply() public view returns (uint total); function transferFrom(address _from, address _to, uint _celebId) public; function transfer(address _to, uint _celebId) public; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); } contract KpopCeleb is ERC721 { using SafeMath for uint; address public author; address public coauthor; string public constant NAME = "KpopCeleb"; string public constant SYMBOL = "KpopCeleb"; uint public GROWTH_BUMP = 0.5 ether; uint public MIN_STARTING_PRICE = 0.002 ether; uint public PRICE_INCREASE_SCALE = 120; // 120% of previous price struct Celeb { string name; } Celeb[] public celebs; mapping(uint => address) public celebIdToOwner; mapping(uint => uint) public celebIdToPrice; // in wei mapping(address => uint) public userToNumCelebs; mapping(uint => address) public celebIdToApprovedRecipient; mapping(uint => uint[6]) public celebIdToTraitValues; mapping(uint => uint[6]) public celebIdToTraitBoosters; address public KPOP_ARENA_CONTRACT_ADDRESS = 0x0; event Transfer(address indexed from, address indexed to, uint celebId); event Approval(address indexed owner, address indexed approved, uint celebId); event CelebSold(uint celebId, uint oldPrice, uint newPrice, string celebName, address prevOwner, address newOwner); function KpopCeleb() public { } function _transfer(address _from, address _to, uint _celebId) private { } function buy(uint _celebId) payable public { } function balanceOf(address _owner) public view returns (uint balance) { } function ownerOf(uint _celebId) public view returns (address addr) { } function totalSupply() public view returns (uint total) { } function transfer(address _to, uint _celebId) public { } /** START FUNCTIONS FOR AUTHORS **/ function createCeleb(string _name, uint _price, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function updateCeleb(uint _celebId, uint[6] _traitValues, uint[6] _traitBoosters) public onlyAuthors { } function withdraw(uint _amount, address _to) public onlyAuthors { } function withdrawAll() public onlyAuthors { } function setCoAuthor(address _coauthor) public onlyAuthor { } function setKpopArenaContractAddress(address _address) public onlyAuthors { } function updateTraits(uint _celebId) public onlyArena { } /** END FUNCTIONS FOR AUTHORS **/ function getCeleb(uint _celebId) public view returns ( string name, uint price, address owner, uint[6] traitValues, uint[6] traitBoosters ) { } /** START FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function approve(address _to, uint _celebId) public { } function transferFrom(address _from, address _to, uint _celebId) public { } function takeOwnership(uint _celebId) public { require(!isNullAddress(msg.sender)); require(<FILL_ME>) address currentOwner = celebIdToOwner[_celebId]; _transfer(currentOwner, msg.sender, _celebId); } /** END FUNCTIONS RELATED TO EXTERNAL CONTRACT INTERACTIONS **/ function implementsERC721() public pure returns (bool) { } /** MODIFIERS **/ modifier onlyAuthor() { } modifier onlyAuthors() { } modifier onlyArena() { } /** FUNCTIONS THAT WONT BE USED FREQUENTLY **/ function setMinStartingPrice(uint _price) public onlyAuthors { } function setGrowthBump(uint _bump) public onlyAuthors { } function setPriceIncreaseScale(uint _scale) public onlyAuthors { } /** PRIVATE FUNCTIONS **/ function isApproved(address _to, uint _celebId) private view returns (bool) { } function isNullAddress(address _addr) private pure returns (bool) { } }
isApproved(msg.sender,_celebId)
343,810
isApproved(msg.sender,_celebId)
"LEAD transfer failed"
// hevm: flattened sources of contracts/Alchemist.sol pragma solidity ^0.4.24; ////// contracts/openzeppelin/IERC20.sol /* pragma solidity ^0.4.24; */ /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); 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); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } ////// contracts/Alchemist.sol /* pragma solidity ^0.4.24; */ /* import "./openzeppelin/IERC20.sol"; */ contract Alchemist { address public LEAD; address public GOLD; constructor(address _lead, address _gold) public { } function transmute(uint _mass) external { require(<FILL_ME>) require( IERC20(GOLD).transfer(msg.sender, _mass), "GOLD transfer failed" ); } }
IERC20(LEAD).transferFrom(msg.sender,address(this),_mass),"LEAD transfer failed"
343,893
IERC20(LEAD).transferFrom(msg.sender,address(this),_mass)
"GOLD transfer failed"
// hevm: flattened sources of contracts/Alchemist.sol pragma solidity ^0.4.24; ////// contracts/openzeppelin/IERC20.sol /* pragma solidity ^0.4.24; */ /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); 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); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } ////// contracts/Alchemist.sol /* pragma solidity ^0.4.24; */ /* import "./openzeppelin/IERC20.sol"; */ contract Alchemist { address public LEAD; address public GOLD; constructor(address _lead, address _gold) public { } function transmute(uint _mass) external { require( IERC20(LEAD).transferFrom(msg.sender, address(this), _mass), "LEAD transfer failed" ); require(<FILL_ME>) } }
IERC20(GOLD).transfer(msg.sender,_mass),"GOLD transfer failed"
343,893
IERC20(GOLD).transfer(msg.sender,_mass)
"Target not Authorized"
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗ // ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║ // ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║ // ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║ // ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║ // ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝ // 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 adds liquidity to Yearn Vaults using ETH or ERC20 Tokens. // SPDX-License-Identifier: GPL-2.0 pragma solidity ^0.8.0; import "../_base/ZapInBaseV3.sol"; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; } interface IYVault { function deposit(uint256) external; function withdraw(uint256) external; function getPricePerFullShare() external view returns (uint256); function token() external view returns (address); // V2 function pricePerShare() external view returns (uint256); } // -- Aave -- interface IAaveLendingPoolAddressesProvider { function getLendingPool() external view returns (address); function getLendingPoolCore() external view returns (address payable); } interface IAaveLendingPoolCore { function getReserveATokenAddress(address _reserve) external view returns (address); } interface IAaveLendingPool { function deposit( address _reserve, uint256 _amount, uint16 _referralCode ) external payable; } contract yVault_ZapIn_V4 is ZapInBaseV3 { using SafeERC20 for IERC20; IAaveLendingPoolAddressesProvider private constant lendingPoolAddressProvider = IAaveLendingPoolAddressesProvider( 0x24a42fD28C976A61Df5D00D0599C34c4f90748c8 ); address private constant wethTokenAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; event zapIn(address sender, address pool, uint256 tokensRec); constructor( address _curveZapIn, uint256 _goodwill, uint256 _affiliateSplit ) ZapBaseV2(_goodwill, _affiliateSplit) { } /** @notice This function adds liquidity to a Yearn vaults with ETH or ERC20 tokens @param fromToken The token used for entry (address(0) if ether) @param amountIn The amount of fromToken to invest @param toVault Yearn vault address @param superVault Super vault to depoist toVault tokens into (address(0) if none) @param isAaveUnderlying True if vault contains aave token @param minYVTokens The minimum acceptable quantity vault tokens to receive. Reverts otherwise @param intermediateToken Token to swap fromToken to before entering vault @param swapTarget Excecution target for the swap or Zap @param swapData DEX quote or Zap data @param affiliate Affiliate address @param shouldSellEntireBalance If True transfers entrire allowable amount from another contract @return tokensReceived Quantity of Vault tokens received */ function ZapIn( address fromToken, uint256 amountIn, address toVault, address superVault, bool isAaveUnderlying, uint256 minYVTokens, address intermediateToken, address swapTarget, bytes calldata swapData, address affiliate, bool shouldSellEntireBalance ) external payable stopInEmergency returns (uint256 tokensReceived) { } function _zapIn( address toVault, address superVault, uint256 minYVTokens, address intermediateToken, uint256 intermediateAmt ) internal returns (uint256 tokensReceived) { } function _vaultDeposit( address underlyingVaultToken, uint256 amount, address toVault, uint256 minTokensRec, bool shouldTransfer ) internal returns (uint256 tokensReceived) { } function _fillQuote( address _fromTokenAddress, address toToken, uint256 _amount, address _swapTarget, bytes memory swapData ) internal returns (uint256 amtBought) { if (_fromTokenAddress == toToken) { return _amount; } if (_fromTokenAddress == address(0) && toToken == wethTokenAddress) { IWETH(wethTokenAddress).deposit{ value: _amount }(); return _amount; } uint256 valueToSend; if (_fromTokenAddress == address(0)) { valueToSend = _amount; } else { _approveToken(_fromTokenAddress, _swapTarget); } uint256 iniBal = _getBalance(toToken); require(<FILL_ME>) (bool success, ) = _swapTarget.call{ value: valueToSend }(swapData); require(success, "Error Swapping Tokens 1"); uint256 finalBal = _getBalance(toToken); amtBought = finalBal - iniBal; } }
approvedTargets[_swapTarget],"Target not Authorized"
344,209
approvedTargets[_swapTarget]
null
pragma solidity ^0.5.8; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { } /** * @dev Throws if called by any account other than the owner. */ modifier 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) onlyOwner public { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) internal balances; // allowedAddresses will be able to transfer even when locked // lockedAddresses will *not* be able to transfer even when *not locked* mapping(address => bool) internal allowedAddresses; mapping(address => bool) internal lockedAddresses; bool public locked = true; mapping(address => uint256) internal lockedBalances; event LockBalance(address indexed _addr, uint256 _lockAmount); function allowAddress(address _addr, bool _allowed) public onlyOwner { } function lockAddress(address _addr, bool _locked) public onlyOwner { } function setLocked(bool _locked) public onlyOwner { } function canTransfer(address _addr) public view returns (bool) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(canTransfer(msg.sender)); require(<FILL_ME>) // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } function lockBalance(address _addr, uint256 _lockAmount) onlyOwner public { } function lockedBalanceOf(address _addr) public view returns (uint256) { } function checkHolderBalance(address _addr, uint256 _sendAmount) internal view returns (bool) { } } /** * @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 Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval(address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } } contract Token is BurnableToken { string public constant name = "NiX-M"; string public constant symbol = "NiXM"; uint256 public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 10_000_000_000 * (10 ** decimals); // Constructors constructor() public { } }
checkHolderBalance(msg.sender,_value)
344,332
checkHolderBalance(msg.sender,_value)
null
pragma solidity ^0.5.8; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() internal { } /** * @dev Throws if called by any account other than the owner. */ modifier 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) onlyOwner public { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) internal balances; // allowedAddresses will be able to transfer even when locked // lockedAddresses will *not* be able to transfer even when *not locked* mapping(address => bool) internal allowedAddresses; mapping(address => bool) internal lockedAddresses; bool public locked = true; mapping(address => uint256) internal lockedBalances; event LockBalance(address indexed _addr, uint256 _lockAmount); function allowAddress(address _addr, bool _allowed) public onlyOwner { } function lockAddress(address _addr, bool _locked) public onlyOwner { } function setLocked(bool _locked) public onlyOwner { } function canTransfer(address _addr) public view returns (bool) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } function lockBalance(address _addr, uint256 _lockAmount) onlyOwner public { } function lockedBalanceOf(address _addr) public view returns (uint256) { } function checkHolderBalance(address _addr, uint256 _sendAmount) internal view returns (bool) { } } /** * @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 Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(canTransfer(msg.sender)); require(<FILL_ME>) uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval(address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } } contract Token is BurnableToken { string public constant name = "NiX-M"; string public constant symbol = "NiXM"; uint256 public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 10_000_000_000 * (10 ** decimals); // Constructors constructor() public { } }
checkHolderBalance(_from,_value)
344,332
checkHolderBalance(_from,_value)
"CHFRY: only SmartAccount could emit Event in EventCenter"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {AccountCenterInterface} from "./interfaces/IAccountCenter.sol"; contract EventCenter is Ownable { address internal constant ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; mapping(address => uint256) public weight; // token wieght mapping(uint256 => uint256) public rewardAmount; // token wieght uint256 public epochStart; uint256 public epochEnd; uint256 public epochInterval = 1 minutes; //for test only uint256 public epochRound; address rewardCenter; address internal accountCenter; event CreateAccount(address EOA, address account); event UseFlashLoanForLeverage( address indexed EOA, address indexed account, address token, uint256 amount, uint256 epochRound, bool inEpoch ); event AddFlashLoanScore( address indexed EOA, address indexed account, address token, uint256 amount, uint256 epochRound ); event OpenLongLeverage( address EOA, address indexed account, address indexed leverageToken, address indexed targetToken, uint256 pay, uint256 amountTargetToken, uint256 amountLeverageToken, uint256 amountFlashLoan, uint256 unitAmt, uint256 rateMode, uint256 epochRound ); event OpenShortLeverage( address EOA, address indexed account, address indexed leverageToken, address indexed targetToken, uint256 pay, uint256 amountTargetToken, uint256 amountLeverageToken, uint256 amountFlashLoan, uint256 unitAmt, uint256 rateMode, uint256 epochRound ); event CloseLongLeverage( address EOA, address indexed account, address indexed leverageToken, address indexed targetToken, uint256 gain, uint256 amountTargetToken, uint256 amountFlashLoan, uint256 amountRepay, uint256 unitAmt, uint256 rateMode, uint256 epochRound ); event CloseShortLeverage( address EOA, address indexed account, address indexed leverageToken, address indexed targetToken, uint256 gain, uint256 amountTargetToken, uint256 amountFlashLoan, uint256 amountWithDraw, uint256 unitAmt, uint256 rateMode, uint256 epochRound ); event AddMargin( address EOA, address indexed account, address indexed leverageToken, uint256 amountLeverageToken, uint256 epochRound ); event WithDraw( address EOA, address indexed account, address indexed token, uint256 amount, uint256 epochRound ); event Repay( address EOA, address indexed account, address indexed token, uint256 amount, uint256 epochRound ); event RemoveMargin( address EOA, address indexed account, address indexed leverageToken, uint256 amountLeverageToken, uint256 epochRound ); event AddPositionScore( address indexed account, address indexed token, uint256 indexed reasonCode, address EOA, uint256 amount, uint256 tokenWeight, uint256 positionScore, uint256 epochRound ); event SubPositionScore( address indexed account, address indexed token, uint256 indexed reasonCode, address EOA, uint256 amount, uint256 tokenWeight, uint256 positionScore, uint256 epochRound ); event ReleasePositionReward( address indexed owner, uint256 epochRound, bytes32 merkelRoot ); event ClaimPositionReward( address indexed EOA, uint256 epochRound, uint256 amount ); event ClaimOpenAccountReward( address indexed EOA, address indexed account, uint256 amount ); event StartEpoch( address indexed owner, uint256 epochRound, uint256 start, uint256 end, uint256 rewardAmount ); event ResetScore(address indexed owner, uint256 epochRound); event SetAssetWeight(address indexed token, uint256 indexed weight); event SetEpochInterval(uint256 epochInterval); event ToggleEpochAutoStart(address indexed owner, bool indexed autoEpoch); event SetRewardCenter(address indexed owner, address indexed rewardCenter); modifier onlyAccountDSA() { require( accountCenter != address(0), "CHFRY: accountCenter not setup 1" ); require(<FILL_ME>) _; } modifier onlyRewardCenter() { } modifier notInEpoch() { } constructor(address _accountCenter) { } function setRewardCenter(address _rewardCenter) public onlyOwner { } function setEpochInterval(uint256 _epochInterval) external onlyOwner notInEpoch { } function startEpoch(uint256 _rewardAmount) external notInEpoch { } function setWeight(address _token, uint256 _weight) external onlyOwner notInEpoch { } function getWeight(address _token) external view returns (uint256) { } function emitUseFlashLoanForLeverageEvent(address token, uint256 amount) external onlyAccountDSA { } function emitOpenLongLeverageEvent( address leverageToken, address targetToken, uint256 pay, uint256 amountTargetToken, uint256 amountLeverageToken, uint256 amountFlashLoan, uint256 unitAmt, uint256 rateMode ) external onlyAccountDSA { } function emitCloseLongLeverageEvent( address leverageToken, address targetToken, uint256 gain, uint256 amountTargetToken, uint256 amountFlashLoan, uint256 amountRepay, uint256 unitAmt, uint256 rateMode ) external onlyAccountDSA { } function emitOpenShortLeverageEvent( address leverageToken, address targetToken, uint256 pay, uint256 amountTargetToken, uint256 amountLeverageToken, uint256 amountFlashLoan, uint256 unitAmt, uint256 rateMode ) external onlyAccountDSA { } function emitCloseShortLeverageEvent( address leverageToken, address targetToken, uint256 gain, uint256 amountTargetToken, uint256 amountFlashLoan, uint256 amountWithDraw, uint256 unitAmt, uint256 rateMode ) external onlyAccountDSA { } function emitAddMarginEvent( address leverageToken, uint256 amountLeverageToken ) external onlyAccountDSA { } function emitWithDrawEvent(address token, uint256 amount) external onlyAccountDSA { } function emitRepayEvent(address token, uint256 amount) external onlyAccountDSA { } function emitRemoveMarginEvent( address leverageToken, uint256 amountLeverageToken ) external onlyAccountDSA { } function emitReleasePositionRewardEvent( address owner, uint256 _epochRound, bytes32 merkelRoot ) external onlyRewardCenter { } function emitClaimPositionRewardEvent( address EOA, uint256 _epochRound, uint256 amount ) external onlyRewardCenter { } function emitClaimOpenAccountRewardEvent( address EOA, address account, uint256 amount ) external onlyRewardCenter { } function addScore( address EOA, address account, address token, uint256 amount, uint256 reasonCode ) internal { } function subScore( address EOA, address account, address token, uint256 amount, uint256 reasonCode ) internal { } function secToEpochEnd() external view returns (uint256 _secToEpochEnd) { } function isInRewardEpoch() external view returns (bool _isInRewardEpoch) { } function __isInRewardEpoch() internal view returns (bool _isInRewardEpoch) { } function convertToWei(uint256 _dec, uint256 _amt) internal pure returns (uint256 amt) { } }
AccountCenterInterface(accountCenter).isSmartAccountofTypeN(msg.sender,1)||AccountCenterInterface(accountCenter).isSmartAccountofTypeN(msg.sender,2),"CHFRY: only SmartAccount could emit Event in EventCenter"
344,354
AccountCenterInterface(accountCenter).isSmartAccountofTypeN(msg.sender,1)||AccountCenterInterface(accountCenter).isSmartAccountofTypeN(msg.sender,2)
"You have no free mints available (or pool has ran out)."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; import "hardhat/console.sol"; contract ApeOutcasts is Ownable, ERC721Enumerable, ERC721Burnable, ReentrancyGuard { bool public isMintEnabled = false; uint256 public freeApesGiven = 0; uint256 public freeApesCap = 100; mapping(address => uint256) freeApes; mapping(address => bool) public gotFreeApe; uint256 private MAX_SUPPLY = 10000; uint256[10000] private _availableTokens; uint256 private _numAvailableTokens = 10000; constructor() ERC721("ApeOutcasts", "OUTCASTS") {} function freeMintOne() public payable nonReentrant { require(<FILL_ME>) if (freeApes[msg.sender] > 0) { freeApes[msg.sender]--; } else { freeApesGiven++; gotFreeApe[msg.sender] = true; } _mintNoCostChecks(1); } function mint(uint256 _numOfApes) public payable nonReentrant { } function _mintNoCostChecks(uint256 _numOfApes) internal { } function useRandomAvailableToken(uint256 _numToFetch, uint256 _i) internal returns (uint256) { } function useAvailableTokenAtIndex(uint256 indexToUse) internal returns (uint256) { } function getCostForApes(uint256 _numApes) public pure returns (uint256) { } function freeApesRemaining() internal view returns (bool) { } function userHasFreeApe(address userAddress) public view returns (bool) { } function startSale() public onlyOwner { } function endSale() public onlyOwner { } function giveFreeApes( address[] memory addresses, uint256[] memory numOfFreeApes ) public onlyOwner { } // // metadata URI string private _baseTokenURI; function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _serialId) public view override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdrawMoney() public payable onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 serialId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
userHasFreeApe(msg.sender),"You have no free mints available (or pool has ran out)."
344,364
userHasFreeApe(msg.sender)
"There are not that many ape outcasts remaining."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol"; import "hardhat/console.sol"; contract ApeOutcasts is Ownable, ERC721Enumerable, ERC721Burnable, ReentrancyGuard { bool public isMintEnabled = false; uint256 public freeApesGiven = 0; uint256 public freeApesCap = 100; mapping(address => uint256) freeApes; mapping(address => bool) public gotFreeApe; uint256 private MAX_SUPPLY = 10000; uint256[10000] private _availableTokens; uint256 private _numAvailableTokens = 10000; constructor() ERC721("ApeOutcasts", "OUTCASTS") {} function freeMintOne() public payable nonReentrant { } function mint(uint256 _numOfApes) public payable nonReentrant { require( _numOfApes > 0 && _numOfApes <= 20, "Can only mint between 1-20 at a time." ); uint256 _numMinted = totalSupply(); require(<FILL_ME>) uint256 costForMint = getCostForApes(_numOfApes); require(msg.value >= costForMint, "Need to send more ETH."); if (msg.value > costForMint) { payable(msg.sender).transfer(msg.value - costForMint); } _mintNoCostChecks(_numOfApes); } function _mintNoCostChecks(uint256 _numOfApes) internal { } function useRandomAvailableToken(uint256 _numToFetch, uint256 _i) internal returns (uint256) { } function useAvailableTokenAtIndex(uint256 indexToUse) internal returns (uint256) { } function getCostForApes(uint256 _numApes) public pure returns (uint256) { } function freeApesRemaining() internal view returns (bool) { } function userHasFreeApe(address userAddress) public view returns (bool) { } function startSale() public onlyOwner { } function endSale() public onlyOwner { } function giveFreeApes( address[] memory addresses, uint256[] memory numOfFreeApes ) public onlyOwner { } // // metadata URI string private _baseTokenURI; function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _serialId) public view override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdrawMoney() public payable onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 serialId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_numMinted+_numOfApes<=MAX_SUPPLY,"There are not that many ape outcasts remaining."
344,364
_numMinted+_numOfApes<=MAX_SUPPLY
"Destination address already owns a token"
pragma solidity ^0.5.16; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * > Note: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Custom NFT contract based off ERC721 but restricted by access control. * @dev made for https://sips.synthetix.io/sips/sip-93 */ contract ThalesCouncil is Ownable { // Event that is emitted when a new SpartanCouncil token is minted event Mint(uint256 indexed tokenId, address to); // Event that is emitted when an existing SpartanCouncil token is burned event Burn(uint256 indexed tokenId); // Event that is emitted when an existing SpartanCouncil token is transfer event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); // Event that is emitted when an metadata is added event MetadataChanged(uint256 tokenId, string tokenURI); // Array of token ids uint256[] public tokens; // Map between a owner and their token mapping(address => uint256) public tokenOwned; // Maps a token to the owner address mapping(uint256 => address) public tokenOwner; // Optional mapping for token URIs mapping(uint256 => string) public tokenURIs; // Token name string public name; // Token symbol string public symbol; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. * @param _name the name of the token * @param _symbol the symbol of the token */ constructor(string memory _name, string memory _symbol) public { } /** * @dev Modifier to check that an address is not the "0" address * @param to address the address to check */ modifier isValidAddress(address to) { } /** * @dev Function to retrieve whether an address owns a token * @param owner address the address to check the balance of */ function balanceOf(address owner) public view isValidAddress(owner) returns (uint256) { } /** * @dev Function to check the owner of a token * @param tokenId uint256 ID of the token to retrieve the owner for */ function ownerOf(uint256 tokenId) public view returns (address) { } /** * @dev Transfer function to assign a token to another address * Reverts if the address already owns a token * @param from address the address that currently owns the token * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to transfer */ function transfer( address from, address to, uint256 tokenId ) public isValidAddress(to) onlyOwner { require(<FILL_ME>) tokenOwned[from] = 0; tokenOwned[to] = tokenId; tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Mint function to mint a new token given a tokenId and assign it to an address * Reverts if the tokenId is 0 or the token already exist * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to mint */ function mint(address to, uint256 tokenId) public onlyOwner isValidAddress(to) { } /** * @dev Burn function to remove a given tokenId * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to burn */ function burn(uint256 tokenId) public onlyOwner { } /** * @dev Function to get the total supply of tokens currently available */ function totalSupply() public view returns (uint256) { } /** * @dev Function to get the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to retrieve the uri for */ function tokenURI(uint256 tokenId) public view returns (string memory) { } /** * @dev Function to set the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */ function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner { } }
tokenOwned[to]==0,"Destination address already owns a token"
344,419
tokenOwned[to]==0
"ERC721: token already minted"
pragma solidity ^0.5.16; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * > Note: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Custom NFT contract based off ERC721 but restricted by access control. * @dev made for https://sips.synthetix.io/sips/sip-93 */ contract ThalesCouncil is Ownable { // Event that is emitted when a new SpartanCouncil token is minted event Mint(uint256 indexed tokenId, address to); // Event that is emitted when an existing SpartanCouncil token is burned event Burn(uint256 indexed tokenId); // Event that is emitted when an existing SpartanCouncil token is transfer event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); // Event that is emitted when an metadata is added event MetadataChanged(uint256 tokenId, string tokenURI); // Array of token ids uint256[] public tokens; // Map between a owner and their token mapping(address => uint256) public tokenOwned; // Maps a token to the owner address mapping(uint256 => address) public tokenOwner; // Optional mapping for token URIs mapping(uint256 => string) public tokenURIs; // Token name string public name; // Token symbol string public symbol; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. * @param _name the name of the token * @param _symbol the symbol of the token */ constructor(string memory _name, string memory _symbol) public { } /** * @dev Modifier to check that an address is not the "0" address * @param to address the address to check */ modifier isValidAddress(address to) { } /** * @dev Function to retrieve whether an address owns a token * @param owner address the address to check the balance of */ function balanceOf(address owner) public view isValidAddress(owner) returns (uint256) { } /** * @dev Function to check the owner of a token * @param tokenId uint256 ID of the token to retrieve the owner for */ function ownerOf(uint256 tokenId) public view returns (address) { } /** * @dev Transfer function to assign a token to another address * Reverts if the address already owns a token * @param from address the address that currently owns the token * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to transfer */ function transfer( address from, address to, uint256 tokenId ) public isValidAddress(to) onlyOwner { } /** * @dev Mint function to mint a new token given a tokenId and assign it to an address * Reverts if the tokenId is 0 or the token already exist * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to mint */ function mint(address to, uint256 tokenId) public onlyOwner isValidAddress(to) { require(tokenId != 0, "Token ID must be greater than 0"); require(<FILL_ME>) tokens.push(tokenId); tokenOwned[to] = tokenId; tokenOwner[tokenId] = to; emit Mint(tokenId, to); } /** * @dev Burn function to remove a given tokenId * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to burn */ function burn(uint256 tokenId) public onlyOwner { } /** * @dev Function to get the total supply of tokens currently available */ function totalSupply() public view returns (uint256) { } /** * @dev Function to get the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to retrieve the uri for */ function tokenURI(uint256 tokenId) public view returns (string memory) { } /** * @dev Function to set the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */ function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner { } }
tokenOwner[tokenId]==address(0),"ERC721: token already minted"
344,419
tokenOwner[tokenId]==address(0)
"ERC721: token does not exist"
pragma solidity ^0.5.16; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * > Note: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Custom NFT contract based off ERC721 but restricted by access control. * @dev made for https://sips.synthetix.io/sips/sip-93 */ contract ThalesCouncil is Ownable { // Event that is emitted when a new SpartanCouncil token is minted event Mint(uint256 indexed tokenId, address to); // Event that is emitted when an existing SpartanCouncil token is burned event Burn(uint256 indexed tokenId); // Event that is emitted when an existing SpartanCouncil token is transfer event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); // Event that is emitted when an metadata is added event MetadataChanged(uint256 tokenId, string tokenURI); // Array of token ids uint256[] public tokens; // Map between a owner and their token mapping(address => uint256) public tokenOwned; // Maps a token to the owner address mapping(uint256 => address) public tokenOwner; // Optional mapping for token URIs mapping(uint256 => string) public tokenURIs; // Token name string public name; // Token symbol string public symbol; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. * @param _name the name of the token * @param _symbol the symbol of the token */ constructor(string memory _name, string memory _symbol) public { } /** * @dev Modifier to check that an address is not the "0" address * @param to address the address to check */ modifier isValidAddress(address to) { } /** * @dev Function to retrieve whether an address owns a token * @param owner address the address to check the balance of */ function balanceOf(address owner) public view isValidAddress(owner) returns (uint256) { } /** * @dev Function to check the owner of a token * @param tokenId uint256 ID of the token to retrieve the owner for */ function ownerOf(uint256 tokenId) public view returns (address) { } /** * @dev Transfer function to assign a token to another address * Reverts if the address already owns a token * @param from address the address that currently owns the token * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to transfer */ function transfer( address from, address to, uint256 tokenId ) public isValidAddress(to) onlyOwner { } /** * @dev Mint function to mint a new token given a tokenId and assign it to an address * Reverts if the tokenId is 0 or the token already exist * @param to address the address to assign the token to * @param tokenId uint256 ID of the token to mint */ function mint(address to, uint256 tokenId) public onlyOwner isValidAddress(to) { } /** * @dev Burn function to remove a given tokenId * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to burn */ function burn(uint256 tokenId) public onlyOwner { require(<FILL_ME>) address previousOwner = tokenOwner[tokenId]; tokenOwned[previousOwner] = 0; tokenOwner[tokenId] = address(0); uint256 lastElement = tokens[tokens.length - 1]; for (uint256 i = 0; i < tokens.length; i++) { if (tokens[i] == tokenId) { tokens[i] = lastElement; } } tokens.pop; // Clear metadata (if any) if (bytes(tokenURIs[tokenId]).length != 0) { delete tokenURIs[tokenId]; } emit Burn(tokenId); } /** * @dev Function to get the total supply of tokens currently available */ function totalSupply() public view returns (uint256) { } /** * @dev Function to get the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to retrieve the uri for */ function tokenURI(uint256 tokenId) public view returns (string memory) { } /** * @dev Function to set the token URI for a given token. * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to set its URI * @param uri string URI to assign */ function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner { } }
tokenOwner[tokenId]!=address(0),"ERC721: token does not exist"
344,419
tokenOwner[tokenId]!=address(0)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev 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) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @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 OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier 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 { } } /** * @title QWoodDAOToken * @dev Token which use as share in QWoodDAO. */ contract QWoodDAOToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "QWoodDAO"; string public constant symbol = "QOD"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 9000000 * (10 ** uint256(decimals)); mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; address public dao; uint public periodOne; uint public periodTwo; uint public periodThree; event NewDAOContract(address indexed previousDAOContract, address indexed newDAOContract); /** * @dev Constructor. */ function QWoodDAOToken( uint _periodOne, uint _periodTwo, uint _periodThree ) public { } // PUBLIC // ERC20 /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } // ERC20 Additional /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } // ERC827 /** * @dev Addition to ERC20 token methods. It allows to * @dev approve the transfer of value and execute a call with the sent data. * * @dev Beware that changing an allowance with this method brings the risk that * @dev someone may use both the old and the new allowance by unfortunate * @dev transaction ordering. One possible solution to mitigate this race condition * @dev is to first reduce the spender's allowance to 0 and set the desired value * @dev afterwards: * @dev https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * @param _spender The address that will spend the funds. * @param _value The amount of tokens to be spent. * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function approveAndCall( address _spender, uint256 _value, bytes _data ) public payable returns (bool) { require(_spender != address(this)); approve(_spender, _value); // solium-disable-next-line security/no-call-value require(<FILL_ME>) return true; } /** * @dev Addition to ERC20 token methods. Transfer tokens to a specified * @dev address and execute a call with the sent data on the same transaction * * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function transferAndCall( address _to, uint256 _value, bytes _data ) public payable returns (bool) { } /** * @dev Addition to ERC20 token methods. Transfer tokens from one address to * @dev another and make a contract call on the same transaction * * @param _from The address which you want to send tokens from * @param _to The address which you want to transfer to * @param _value The amout of tokens to be transferred * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public payable returns (bool) { } /** * @dev Addition to StandardToken methods. Increase the amount of tokens that * @dev an owner allowed to a spender and execute a call with the sent data. * * @dev approve should be called when allowed[_spender] == 0. To increment * @dev allowed value is better to use this function to avoid 2 calls (and wait until * @dev the first transaction is mined) * @dev From MonolithDAO Token.sol * * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function increaseApprovalAndCall( address _spender, uint _addedValue, bytes _data ) public payable returns (bool) { } /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that * @dev an owner allowed to a spender and execute a call with the sent data. * * @dev approve should be called when allowed[_spender] == 0. To decrement * @dev allowed value is better to use this function to avoid 2 calls (and wait until * @dev the first transaction is mined) * @dev From MonolithDAO Token.sol * * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function decreaseApprovalAndCall( address _spender, uint _subtractedValue, bytes _data ) public payable returns (bool) { } // Additional function pureBalanceOf(address _owner) public view returns (uint256 balance) { } /** * @dev Set new DAO contract address. * @param newDao The address of DAO contract. */ function setDAOContract(address newDao) public onlyOwner { } // INTERNAL function _balanceOf(address _owner) internal view returns (uint256) { } function _getPeriodFor(uint ts) internal view returns (uint) { } function _weekFor(uint ts) internal view returns (uint) { } }
_spender.call.value(msg.value)(_data)
344,458
_spender.call.value(msg.value)(_data)