comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"MARKET_NOT_LISTED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { require(<FILL_ME>) (Error err, , uint shortfall) = getAccountLiquidityInternal(borrower); require(err == Error.NO_ERROR, "GET_ACCOUNT_LIQUDITY_FAIL"); require(shortfall != 0, "INSUFFICIENT_SHORTFALL"); uint borrowBalance = CToken(cTokenBorrowed).borrowBalanceStored(borrower); uint maxClose = mul_ScalarTruncate(Exp({mantissa: closeFactorMantissa}), borrowBalance); require(repayAmount <= maxClose, "TOO_MUCH_REPAY"); return uint(Error.NO_ERROR); } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
markets[cTokenBorrowed].isListed&&markets[cTokenCollateral].isListed,"MARKET_NOT_LISTED"
305,374
markets[cTokenBorrowed].isListed&&markets[cTokenCollateral].isListed
"SEIZE_IS_PAUSED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { require(!borrowSeizeGuardianPaused, "ALL_SEIZE_IS_PAUSED"); require(<FILL_ME>) seizeTokens; require(markets[cTokenCollateral].isListed && markets[cTokenBorrowed].isListed, "MARKET_NOT_LISTED"); require(CToken(cTokenCollateral).comptroller() == CToken(cTokenBorrowed).comptroller(), "COMPTROLLER_MISMATCH"); return uint(Error.NO_ERROR); } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
!seizeGuardianPaused,"SEIZE_IS_PAUSED"
305,374
!seizeGuardianPaused
"MARKET_NOT_LISTED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { require(!borrowSeizeGuardianPaused, "ALL_SEIZE_IS_PAUSED"); require(!seizeGuardianPaused, "SEIZE_IS_PAUSED"); seizeTokens; require(<FILL_ME>) require(CToken(cTokenCollateral).comptroller() == CToken(cTokenBorrowed).comptroller(), "COMPTROLLER_MISMATCH"); return uint(Error.NO_ERROR); } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
markets[cTokenCollateral].isListed&&markets[cTokenBorrowed].isListed,"MARKET_NOT_LISTED"
305,374
markets[cTokenCollateral].isListed&&markets[cTokenBorrowed].isListed
"COMPTROLLER_MISMATCH"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { require(!borrowSeizeGuardianPaused, "ALL_SEIZE_IS_PAUSED"); require(!seizeGuardianPaused, "SEIZE_IS_PAUSED"); seizeTokens; require(markets[cTokenCollateral].isListed && markets[cTokenBorrowed].isListed, "MARKET_NOT_LISTED"); require(<FILL_ME>) return uint(Error.NO_ERROR); } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
CToken(cTokenCollateral).comptroller()==CToken(cTokenBorrowed).comptroller(),"COMPTROLLER_MISMATCH"
305,374
CToken(cTokenCollateral).comptroller()==CToken(cTokenBorrowed).comptroller()
"TRANSFER_IS_PAUSED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { require(<FILL_ME>) uint allowed = redeemAllowedInternal(cToken, src, transferTokens); require(allowed == uint(Error.NO_ERROR), "REDEEM_ALLOWED_FAIL"); return uint(Error.NO_ERROR); } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
!transferGuardianPaused,"TRANSFER_IS_PAUSED"
305,374
!transferGuardianPaused
"MARKET_NOT_LISTED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { require(msg.sender == admin, "ONLY_ADMIN"); Market storage market = markets[address(cToken)]; require(<FILL_ME>) Exp memory newCollateralFactorExp = Exp({mantissa: newCollateralFactorMantissa}); Exp memory highLimit = Exp({mantissa: collateralFactorMaxMantissa}); require(!lessThanExp(highLimit, newCollateralFactorExp), "INVALID_COLLATERAL_FACTOR"); require(newCollateralFactorMantissa == 0 || oracle.getUnderlyingPrice(cToken) != 0, "PRICE_ERROR"); uint oldCollateralFactorMantissa = market.collateralFactorMantissa; market.collateralFactorMantissa = newCollateralFactorMantissa; emit NewCollateralFactor(cToken, oldCollateralFactorMantissa, newCollateralFactorMantissa); return uint(Error.NO_ERROR); } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
market.isListed,"MARKET_NOT_LISTED"
305,374
market.isListed
"INVALID_COLLATERAL_FACTOR"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { require(msg.sender == admin, "ONLY_ADMIN"); Market storage market = markets[address(cToken)]; require(market.isListed, "MARKET_NOT_LISTED"); Exp memory newCollateralFactorExp = Exp({mantissa: newCollateralFactorMantissa}); Exp memory highLimit = Exp({mantissa: collateralFactorMaxMantissa}); require(<FILL_ME>) require(newCollateralFactorMantissa == 0 || oracle.getUnderlyingPrice(cToken) != 0, "PRICE_ERROR"); uint oldCollateralFactorMantissa = market.collateralFactorMantissa; market.collateralFactorMantissa = newCollateralFactorMantissa; emit NewCollateralFactor(cToken, oldCollateralFactorMantissa, newCollateralFactorMantissa); return uint(Error.NO_ERROR); } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
!lessThanExp(highLimit,newCollateralFactorExp),"INVALID_COLLATERAL_FACTOR"
305,374
!lessThanExp(highLimit,newCollateralFactorExp)
"MARKET_ALREADY_LISTED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { require(msg.sender == admin, "ONLY_ADMIN"); require(<FILL_ME>) cToken.isCToken(); markets[address(cToken)] = Market({isListed: true, collateralFactorMantissa: 0}); _addMarketInternal(address(cToken)); emit MarketListed(cToken); return uint(Error.NO_ERROR); } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
!markets[address(cToken)].isListed,"MARKET_ALREADY_LISTED"
305,374
!markets[address(cToken)].isListed
"MARKET_ALREADY_ADDED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { for (uint i = 0; i < allMarkets.length; i ++) { require(<FILL_ME>) } allMarkets.push(CToken(cToken)); } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
allMarkets[i]!=CToken(cToken),"MARKET_ALREADY_ADDED"
305,374
allMarkets[i]!=CToken(cToken)
"MARKET_ISNOT_LISTED"
pragma solidity ^0.5.16; import "./CToken.sol"; import "./ErrorReporter.sol"; import "./PriceOracle.sol"; import "./ComptrollerInterface.sol"; import "./ComptrollerStorage.sol"; contract Comptroller is ComptrollerStorage, ComptrollerInterface, ComptrollerErrorReporter, ExponentialNoError { event MarketListed(CToken cToken); event MarketEntered(CToken cToken, address account); event MarketExited(CToken cToken, address account); event NewCloseFactor(uint oldCloseFactorMantissa, uint newCloseFactorMantissa); event NewCollateralFactor(CToken cToken, uint oldCollateralFactorMantissa, uint newCollateralFactorMantissa); event NewLiquidationIncentive(uint oldLiquidationIncentiveMantissa, uint newLiquidationIncentiveMantissa); event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle); event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian); event ActionPaused(string action, bool pauseState); event ActionPaused(CToken cToken, string action, bool pauseState); event NewBorrowCap(CToken indexed cToken, uint newBorrowCap); event NewBorrowCapGuardian(address oldBorrowCapGuardian, address newBorrowCapGuardian); uint internal constant closeFactorMinMantissa = 0.05e18; uint internal constant closeFactorMaxMantissa = 0.9e18; uint internal constant collateralFactorMaxMantissa = 0.9e18; constructor() public { } function getAssetsIn(address account) external view returns (CToken[] memory) { } function checkMembership(address account, CToken cToken) external view returns (bool) { } function enterMarkets(address[] memory cTokens) public returns (uint[] memory) { } function addToMarketInternal(CToken cToken, address borrower) internal returns (Error) { } function exitMarket(address cTokenAddress) external returns (uint) { } function mintAllowed(address cToken, address minter, uint mintAmount) external returns (uint) { } function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint) { } function redeemAllowedInternal(address cToken, address redeemer, uint redeemTokens) internal returns (uint) { } function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external { } function borrowAllowed(address cToken, address borrower, uint borrowAmount) external returns (uint) { } function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint) { } function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint) { } function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint) { } function transferAllowed(address cToken, address src, address dst, uint transferTokens) external returns (uint) { } struct AccountLiquidityLocalVars { uint sumCollateral; uint sumBorrowPlusEffects; uint cTokenBalance; uint borrowBalance; uint exchangeRateMantissa; uint oraclePriceMantissa; Exp collateralFactor; Exp exchangeRate; Exp oraclePrice; Exp tokensToDenom; } function getAccountLiquidity(address account) public view returns (uint, uint, uint) { } function getAccountLiquidityInternal(address account) internal view returns (Error, uint, uint) { } function getHypotheticalAccountLiquidity( address account, address cTokenModify, uint redeemTokens, uint borrowAmount) public view returns (uint, uint, uint) { } function getHypotheticalAccountLiquidityInternal( address account, CToken cTokenModify, uint redeemTokens, uint borrowAmount) internal view returns (Error, uint, uint) { } function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint actualRepayAmount) external view returns (uint, uint) { } function _setPriceOracle(PriceOracle newOracle) public returns (uint) { } function _setCloseFactor(uint newCloseFactorMantissa) external returns (uint) { } function _setCollateralFactor(CToken cToken, uint newCollateralFactorMantissa) external returns (uint) { } function _setLiquidationIncentive(uint newLiquidationIncentiveMantissa) external returns (uint) { } function _supportMarket(CToken cToken) external returns (uint) { } function _addMarketInternal(address cToken) internal { } function _setMarketBorrowCaps(CToken[] calldata cTokens, uint[] calldata newBorrowCaps) external { } function _setBorrowCapGuardian(address newBorrowCapGuardian) external { } function _setPauseGuardian(address newPauseGuardian) public returns (uint) { } function _setMintPaused(CToken cToken, bool state) public returns (bool) { require(<FILL_ME>) require(msg.sender == pauseGuardian || msg.sender == admin, "ONLY_ADMIN_OR_PAUSE_GUARDIAN"); require(msg.sender == admin || state == true, "ONLY_ADMIN_AND_STATE_TRUE"); mintGuardianPaused[address(cToken)] = state; emit ActionPaused(cToken, "Mint", state); return state; } function _setBorrowPaused(CToken cToken, bool state) public returns (bool) { } function _setTransferPaused(bool state) public returns (bool) { } function _setSeizePaused(bool state) public returns (bool) { } function _setBorrowSeizePaused(bool state) public returns (bool) { } function adminOrInitializing() internal view returns (bool) { } function getAllMarkets() public view returns (CToken[] memory) { } function getBlockNumber() public view returns (uint) { } }
markets[address(cToken)].isListed,"MARKET_ISNOT_LISTED"
305,374
markets[address(cToken)].isListed
": Contract paused."
pragma solidity ^0.8.6; contract Azukimfer is ERC721A, Ownable,ReentrancyGuard { using Strings for uint256; //Basic Configs uint256 public maxSupply = 2000; uint256 public _price = 0.02 ether; uint256 public regularMintMax = 20; //Reveal/NonReveal string public _baseTokenURI; string public _baseTokenEXT; string public notRevealedUri; bool public revealed = true; bool public _paused = false; //PRESALE MODES uint256 public whitelistMaxMint = 3; bytes32 public merkleRoot = 0x9d997719c0a5b5f6db9b8ac69a988be57cf324cb9fffd51dc2c37544bb520d65; bool public whitelistSale = false; uint256 public whitelistPrice = 0.01 ether; struct MintTracker{ uint256 _regular; uint256 _whitelist; } mapping(address => MintTracker) public _totalMinted; constructor(string memory _initBaseURI,string memory _initBaseExt) ERC721A("Azukimfer", "AMF") { } function mint(uint256 _mintAmount) public payable { require(!_paused, ": Contract Execution paused."); require(<FILL_ME>) require(_mintAmount > 0, ": Amount should be greater than 0."); require(msg.value >= _price * _mintAmount,"Insufficient FUnd"); require(_mintAmount+_totalMinted[msg.sender]._regular <= regularMintMax ,"You cant mint more,Decrease MintAmount or Wait For Public Mint" ); uint256 supply = totalSupply(); require(supply + _mintAmount <= maxSupply , ": No more NFTs to mint, decrease the quantity or check out OpenSea."); _safeMint(msg.sender, _mintAmount); _totalMinted[msg.sender]._regular+=_mintAmount; } function WhiteListMint( uint256 _mintAmount,bytes32[] calldata _merkleProof) public payable { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool val) public onlyOwner() { } function toogleWhiteList() public onlyOwner{ } function toogleReveal() public onlyOwner{ } function changeURLParams(string memory _nURL, string memory _nBaseExt) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner() { } function setMerkleRoot(bytes32 merkleHash) public onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } }
!whitelistSale,": Contract paused."
305,396
!whitelistSale
"You cant mint more,Decrease MintAmount or Wait For Public Mint"
pragma solidity ^0.8.6; contract Azukimfer is ERC721A, Ownable,ReentrancyGuard { using Strings for uint256; //Basic Configs uint256 public maxSupply = 2000; uint256 public _price = 0.02 ether; uint256 public regularMintMax = 20; //Reveal/NonReveal string public _baseTokenURI; string public _baseTokenEXT; string public notRevealedUri; bool public revealed = true; bool public _paused = false; //PRESALE MODES uint256 public whitelistMaxMint = 3; bytes32 public merkleRoot = 0x9d997719c0a5b5f6db9b8ac69a988be57cf324cb9fffd51dc2c37544bb520d65; bool public whitelistSale = false; uint256 public whitelistPrice = 0.01 ether; struct MintTracker{ uint256 _regular; uint256 _whitelist; } mapping(address => MintTracker) public _totalMinted; constructor(string memory _initBaseURI,string memory _initBaseExt) ERC721A("Azukimfer", "AMF") { } function mint(uint256 _mintAmount) public payable { require(!_paused, ": Contract Execution paused."); require(!whitelistSale, ": Contract paused."); require(_mintAmount > 0, ": Amount should be greater than 0."); require(msg.value >= _price * _mintAmount,"Insufficient FUnd"); require(<FILL_ME>) uint256 supply = totalSupply(); require(supply + _mintAmount <= maxSupply , ": No more NFTs to mint, decrease the quantity or check out OpenSea."); _safeMint(msg.sender, _mintAmount); _totalMinted[msg.sender]._regular+=_mintAmount; } function WhiteListMint( uint256 _mintAmount,bytes32[] calldata _merkleProof) public payable { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool val) public onlyOwner() { } function toogleWhiteList() public onlyOwner{ } function toogleReveal() public onlyOwner{ } function changeURLParams(string memory _nURL, string memory _nBaseExt) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner() { } function setMerkleRoot(bytes32 merkleHash) public onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } }
_mintAmount+_totalMinted[msg.sender]._regular<=regularMintMax,"You cant mint more,Decrease MintAmount or Wait For Public Mint"
305,396
_mintAmount+_totalMinted[msg.sender]._regular<=regularMintMax
"You cant mint more,Decrease MintAmount or Wait For Public Mint"
pragma solidity ^0.8.6; contract Azukimfer is ERC721A, Ownable,ReentrancyGuard { using Strings for uint256; //Basic Configs uint256 public maxSupply = 2000; uint256 public _price = 0.02 ether; uint256 public regularMintMax = 20; //Reveal/NonReveal string public _baseTokenURI; string public _baseTokenEXT; string public notRevealedUri; bool public revealed = true; bool public _paused = false; //PRESALE MODES uint256 public whitelistMaxMint = 3; bytes32 public merkleRoot = 0x9d997719c0a5b5f6db9b8ac69a988be57cf324cb9fffd51dc2c37544bb520d65; bool public whitelistSale = false; uint256 public whitelistPrice = 0.01 ether; struct MintTracker{ uint256 _regular; uint256 _whitelist; } mapping(address => MintTracker) public _totalMinted; constructor(string memory _initBaseURI,string memory _initBaseExt) ERC721A("Azukimfer", "AMF") { } function mint(uint256 _mintAmount) public payable { } function WhiteListMint( uint256 _mintAmount,bytes32[] calldata _merkleProof) public payable { require(!_paused, ": Contract Execution paused."); require(whitelistSale, ": Whitelist is paused."); require(_mintAmount > 0, ": Amount should be greater than 0."); require(<FILL_ME>) require(msg.value >= whitelistPrice * _mintAmount,"Insufficient FUnd"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "You are Not whitelisted"); uint256 supply = totalSupply(); require(supply + _mintAmount <= maxSupply , ": No more NFTs to mint, decrease the quantity or check out OpenSea."); _safeMint(msg.sender, _mintAmount); _totalMinted[msg.sender]._whitelist+=_mintAmount; } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool val) public onlyOwner() { } function toogleWhiteList() public onlyOwner{ } function toogleReveal() public onlyOwner{ } function changeURLParams(string memory _nURL, string memory _nBaseExt) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner() { } function setMerkleRoot(bytes32 merkleHash) public onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } }
_mintAmount+_totalMinted[msg.sender]._whitelist<=whitelistMaxMint,"You cant mint more,Decrease MintAmount or Wait For Public Mint"
305,396
_mintAmount+_totalMinted[msg.sender]._whitelist<=whitelistMaxMint
"ETH amount is incorrect"
pragma solidity ^0.8.0; /** * @title PokerNFT contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract PokerNFT is ERC721Enumerable, Ownable { uint256 public MAX_NFT_SUPPLY = 9282; uint256 public VIP_PRESALE_PRICE = 0.65 ether; uint256 public WL_PRESALE_PRICE = 0.2 ether; uint256 public PUBLICSALE_PRICE = 0.4 ether; uint256 public MAX_MINT = 100; uint256 public MAX_NFT_WALLET = 100; uint256 public vipPresaleStartTimestamp; uint256 public vipPresaleEndTimestamp; uint256 public wlPresaleStartTimestamp; uint256 public wlPresaleEndTimestamp; uint256 public publicSaleStartTimestamp; string public baseTokenURI; bool public isSaleActive = true; mapping(address => bool) private whitelisted; mapping(address => bool) private vipList; event BaseURIChanged(string baseURI); event ReserveSaleMint(address minter, uint256 amountOfNFTs); event FinalSaleMint(address minter, uint256 amountOfNFTs); constructor(uint256 _vipPresaleStartTimestamp, uint256 _vipPresaleEndTimestamp, uint256 _wlPresaleStartTimestamp, uint256 _wlPresaleEndTimestamp, uint256 _publicSaleStartTimestamp) ERC721("Crypto Holdem NFT", "CHNFT") { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function checkIfWhitelisted(address addr) external view returns (bool) { } function addToVIPList(address[] calldata addresses) external onlyOwner { } function removeFromVIPList(address[] calldata addresses) external onlyOwner { } function checkIfVIP(address addr) external view returns (bool) { } function flipSaleState() public onlyOwner { } function reserveNFT(uint256 numberOfNfts, address[] memory _senderAddress) public onlyOwner { } function mintNFT(uint256 amountOfNFTs) external payable { require(isSaleActive, "Sale must be active to mint NFT"); require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply"); require(amountOfNFTs <= MAX_MINT, "Cannot purchase this many tokens in a transaction"); require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet"); if(block.timestamp >= publicSaleStartTimestamp) { require(<FILL_ME>) } else if(block.timestamp >= wlPresaleStartTimestamp && block.timestamp < wlPresaleEndTimestamp) { require(WL_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(whitelisted[msg.sender], "You are not whitelisted"); } else if(block.timestamp >= vipPresaleStartTimestamp && block.timestamp < vipPresaleEndTimestamp) { require(VIP_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(vipList[msg.sender], "You are not in VIP List"); } else { require(false, "No Sale is Active"); } for (uint256 i = 0; i < amountOfNFTs; i++) { uint256 tokenId = totalSupply(); _safeMint(msg.sender, tokenId); } emit FinalSaleMint(msg.sender, amountOfNFTs); } function saleActive() public view returns(string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setVIP_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setWL_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setPUBLICSALE_PRICE(uint256 _amount) external onlyOwner { } function updateVIPPresaleStartTimestamp(uint256 _vipPresaleStartTimestamp) external onlyOwner { } function updateVIPPresaleEndTimestamp(uint256 _vipPresaleEndTimestamp) external onlyOwner { } function updateWLPresaleStartTimestamp(uint256 _wlPresaleStartTimestamp) external onlyOwner { } function updateWLPresaleEndTimestamp(uint256 _wlPresaleEndTimestamp) external onlyOwner { } function updatePublicSaleStartTimestamp(uint256 _publicSaleStartTimestamp) external onlyOwner { } function setMAX_MINT(uint256 _amount) external onlyOwner { } function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawAll() public onlyOwner { } }
PUBLICSALE_PRICE*amountOfNFTs==msg.value,"ETH amount is incorrect"
305,505
PUBLICSALE_PRICE*amountOfNFTs==msg.value
"ETH amount is incorrect"
pragma solidity ^0.8.0; /** * @title PokerNFT contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract PokerNFT is ERC721Enumerable, Ownable { uint256 public MAX_NFT_SUPPLY = 9282; uint256 public VIP_PRESALE_PRICE = 0.65 ether; uint256 public WL_PRESALE_PRICE = 0.2 ether; uint256 public PUBLICSALE_PRICE = 0.4 ether; uint256 public MAX_MINT = 100; uint256 public MAX_NFT_WALLET = 100; uint256 public vipPresaleStartTimestamp; uint256 public vipPresaleEndTimestamp; uint256 public wlPresaleStartTimestamp; uint256 public wlPresaleEndTimestamp; uint256 public publicSaleStartTimestamp; string public baseTokenURI; bool public isSaleActive = true; mapping(address => bool) private whitelisted; mapping(address => bool) private vipList; event BaseURIChanged(string baseURI); event ReserveSaleMint(address minter, uint256 amountOfNFTs); event FinalSaleMint(address minter, uint256 amountOfNFTs); constructor(uint256 _vipPresaleStartTimestamp, uint256 _vipPresaleEndTimestamp, uint256 _wlPresaleStartTimestamp, uint256 _wlPresaleEndTimestamp, uint256 _publicSaleStartTimestamp) ERC721("Crypto Holdem NFT", "CHNFT") { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function checkIfWhitelisted(address addr) external view returns (bool) { } function addToVIPList(address[] calldata addresses) external onlyOwner { } function removeFromVIPList(address[] calldata addresses) external onlyOwner { } function checkIfVIP(address addr) external view returns (bool) { } function flipSaleState() public onlyOwner { } function reserveNFT(uint256 numberOfNfts, address[] memory _senderAddress) public onlyOwner { } function mintNFT(uint256 amountOfNFTs) external payable { require(isSaleActive, "Sale must be active to mint NFT"); require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply"); require(amountOfNFTs <= MAX_MINT, "Cannot purchase this many tokens in a transaction"); require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet"); if(block.timestamp >= publicSaleStartTimestamp) { require(PUBLICSALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); } else if(block.timestamp >= wlPresaleStartTimestamp && block.timestamp < wlPresaleEndTimestamp) { require(<FILL_ME>) require(whitelisted[msg.sender], "You are not whitelisted"); } else if(block.timestamp >= vipPresaleStartTimestamp && block.timestamp < vipPresaleEndTimestamp) { require(VIP_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(vipList[msg.sender], "You are not in VIP List"); } else { require(false, "No Sale is Active"); } for (uint256 i = 0; i < amountOfNFTs; i++) { uint256 tokenId = totalSupply(); _safeMint(msg.sender, tokenId); } emit FinalSaleMint(msg.sender, amountOfNFTs); } function saleActive() public view returns(string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setVIP_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setWL_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setPUBLICSALE_PRICE(uint256 _amount) external onlyOwner { } function updateVIPPresaleStartTimestamp(uint256 _vipPresaleStartTimestamp) external onlyOwner { } function updateVIPPresaleEndTimestamp(uint256 _vipPresaleEndTimestamp) external onlyOwner { } function updateWLPresaleStartTimestamp(uint256 _wlPresaleStartTimestamp) external onlyOwner { } function updateWLPresaleEndTimestamp(uint256 _wlPresaleEndTimestamp) external onlyOwner { } function updatePublicSaleStartTimestamp(uint256 _publicSaleStartTimestamp) external onlyOwner { } function setMAX_MINT(uint256 _amount) external onlyOwner { } function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawAll() public onlyOwner { } }
WL_PRESALE_PRICE*amountOfNFTs==msg.value,"ETH amount is incorrect"
305,505
WL_PRESALE_PRICE*amountOfNFTs==msg.value
"ETH amount is incorrect"
pragma solidity ^0.8.0; /** * @title PokerNFT contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract PokerNFT is ERC721Enumerable, Ownable { uint256 public MAX_NFT_SUPPLY = 9282; uint256 public VIP_PRESALE_PRICE = 0.65 ether; uint256 public WL_PRESALE_PRICE = 0.2 ether; uint256 public PUBLICSALE_PRICE = 0.4 ether; uint256 public MAX_MINT = 100; uint256 public MAX_NFT_WALLET = 100; uint256 public vipPresaleStartTimestamp; uint256 public vipPresaleEndTimestamp; uint256 public wlPresaleStartTimestamp; uint256 public wlPresaleEndTimestamp; uint256 public publicSaleStartTimestamp; string public baseTokenURI; bool public isSaleActive = true; mapping(address => bool) private whitelisted; mapping(address => bool) private vipList; event BaseURIChanged(string baseURI); event ReserveSaleMint(address minter, uint256 amountOfNFTs); event FinalSaleMint(address minter, uint256 amountOfNFTs); constructor(uint256 _vipPresaleStartTimestamp, uint256 _vipPresaleEndTimestamp, uint256 _wlPresaleStartTimestamp, uint256 _wlPresaleEndTimestamp, uint256 _publicSaleStartTimestamp) ERC721("Crypto Holdem NFT", "CHNFT") { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function checkIfWhitelisted(address addr) external view returns (bool) { } function addToVIPList(address[] calldata addresses) external onlyOwner { } function removeFromVIPList(address[] calldata addresses) external onlyOwner { } function checkIfVIP(address addr) external view returns (bool) { } function flipSaleState() public onlyOwner { } function reserveNFT(uint256 numberOfNfts, address[] memory _senderAddress) public onlyOwner { } function mintNFT(uint256 amountOfNFTs) external payable { require(isSaleActive, "Sale must be active to mint NFT"); require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply"); require(amountOfNFTs <= MAX_MINT, "Cannot purchase this many tokens in a transaction"); require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet"); if(block.timestamp >= publicSaleStartTimestamp) { require(PUBLICSALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); } else if(block.timestamp >= wlPresaleStartTimestamp && block.timestamp < wlPresaleEndTimestamp) { require(WL_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(whitelisted[msg.sender], "You are not whitelisted"); } else if(block.timestamp >= vipPresaleStartTimestamp && block.timestamp < vipPresaleEndTimestamp) { require(<FILL_ME>) require(vipList[msg.sender], "You are not in VIP List"); } else { require(false, "No Sale is Active"); } for (uint256 i = 0; i < amountOfNFTs; i++) { uint256 tokenId = totalSupply(); _safeMint(msg.sender, tokenId); } emit FinalSaleMint(msg.sender, amountOfNFTs); } function saleActive() public view returns(string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setVIP_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setWL_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setPUBLICSALE_PRICE(uint256 _amount) external onlyOwner { } function updateVIPPresaleStartTimestamp(uint256 _vipPresaleStartTimestamp) external onlyOwner { } function updateVIPPresaleEndTimestamp(uint256 _vipPresaleEndTimestamp) external onlyOwner { } function updateWLPresaleStartTimestamp(uint256 _wlPresaleStartTimestamp) external onlyOwner { } function updateWLPresaleEndTimestamp(uint256 _wlPresaleEndTimestamp) external onlyOwner { } function updatePublicSaleStartTimestamp(uint256 _publicSaleStartTimestamp) external onlyOwner { } function setMAX_MINT(uint256 _amount) external onlyOwner { } function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawAll() public onlyOwner { } }
VIP_PRESALE_PRICE*amountOfNFTs==msg.value,"ETH amount is incorrect"
305,505
VIP_PRESALE_PRICE*amountOfNFTs==msg.value
"You are not in VIP List"
pragma solidity ^0.8.0; /** * @title PokerNFT contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract PokerNFT is ERC721Enumerable, Ownable { uint256 public MAX_NFT_SUPPLY = 9282; uint256 public VIP_PRESALE_PRICE = 0.65 ether; uint256 public WL_PRESALE_PRICE = 0.2 ether; uint256 public PUBLICSALE_PRICE = 0.4 ether; uint256 public MAX_MINT = 100; uint256 public MAX_NFT_WALLET = 100; uint256 public vipPresaleStartTimestamp; uint256 public vipPresaleEndTimestamp; uint256 public wlPresaleStartTimestamp; uint256 public wlPresaleEndTimestamp; uint256 public publicSaleStartTimestamp; string public baseTokenURI; bool public isSaleActive = true; mapping(address => bool) private whitelisted; mapping(address => bool) private vipList; event BaseURIChanged(string baseURI); event ReserveSaleMint(address minter, uint256 amountOfNFTs); event FinalSaleMint(address minter, uint256 amountOfNFTs); constructor(uint256 _vipPresaleStartTimestamp, uint256 _vipPresaleEndTimestamp, uint256 _wlPresaleStartTimestamp, uint256 _wlPresaleEndTimestamp, uint256 _publicSaleStartTimestamp) ERC721("Crypto Holdem NFT", "CHNFT") { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function checkIfWhitelisted(address addr) external view returns (bool) { } function addToVIPList(address[] calldata addresses) external onlyOwner { } function removeFromVIPList(address[] calldata addresses) external onlyOwner { } function checkIfVIP(address addr) external view returns (bool) { } function flipSaleState() public onlyOwner { } function reserveNFT(uint256 numberOfNfts, address[] memory _senderAddress) public onlyOwner { } function mintNFT(uint256 amountOfNFTs) external payable { require(isSaleActive, "Sale must be active to mint NFT"); require(totalSupply() + amountOfNFTs <= MAX_NFT_SUPPLY, "Minting would exceed max supply"); require(amountOfNFTs <= MAX_MINT, "Cannot purchase this many tokens in a transaction"); require(balanceOf(msg.sender) + amountOfNFTs <= MAX_NFT_WALLET, "Purchase exceeds max allowed per wallet"); if(block.timestamp >= publicSaleStartTimestamp) { require(PUBLICSALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); } else if(block.timestamp >= wlPresaleStartTimestamp && block.timestamp < wlPresaleEndTimestamp) { require(WL_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(whitelisted[msg.sender], "You are not whitelisted"); } else if(block.timestamp >= vipPresaleStartTimestamp && block.timestamp < vipPresaleEndTimestamp) { require(VIP_PRESALE_PRICE * amountOfNFTs == msg.value, "ETH amount is incorrect"); require(<FILL_ME>) } else { require(false, "No Sale is Active"); } for (uint256 i = 0; i < amountOfNFTs; i++) { uint256 tokenId = totalSupply(); _safeMint(msg.sender, tokenId); } emit FinalSaleMint(msg.sender, amountOfNFTs); } function saleActive() public view returns(string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setVIP_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setWL_PRESALE_PRICE(uint256 _amount) external onlyOwner { } function setPUBLICSALE_PRICE(uint256 _amount) external onlyOwner { } function updateVIPPresaleStartTimestamp(uint256 _vipPresaleStartTimestamp) external onlyOwner { } function updateVIPPresaleEndTimestamp(uint256 _vipPresaleEndTimestamp) external onlyOwner { } function updateWLPresaleStartTimestamp(uint256 _wlPresaleStartTimestamp) external onlyOwner { } function updateWLPresaleEndTimestamp(uint256 _wlPresaleEndTimestamp) external onlyOwner { } function updatePublicSaleStartTimestamp(uint256 _publicSaleStartTimestamp) external onlyOwner { } function setMAX_MINT(uint256 _amount) external onlyOwner { } function setMAX_NFTS_WALLET(uint256 _amount) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawAll() public onlyOwner { } }
vipList[msg.sender],"You are not in VIP List"
305,505
vipList[msg.sender]
"CO01"
pragma solidity ^0.6.0; /** * @title Core * @dev Solidity version 0.5.x prevents to mark as view * @dev functions using delegate call. * * @author Cyril Lapinte - <[email protected]> * * Error messages * CO01: Only Proxy may access the function * CO02: Address 0 is an invalid delegate address * CO03: Delegatecall should be successful * CO04: DelegateId must be greater than 0 * CO05: Proxy must exist * CO06: Proxy must be already defined * CO07: Proxy update must be successful **/ contract Core is Storage { using DelegateCall for address; modifier onlyProxy { require(<FILL_ME>) _; } function validProxyDelegate(address _proxy) internal view returns (address delegate) { } function delegateCall(address _proxy) internal returns (bool status) { } function delegateCallBool(address _proxy) internal returns (bool) { } function delegateCallUint256(address _proxy) internal returns (uint256) { } function delegateCallBytes(address _proxy) internal returns (bytes memory result) { } function defineDelegateInternal(uint256 _delegateId, address _delegate) internal returns (bool) { } function defineProxyInternal(address _proxy, uint256 _delegateId) virtual internal returns (bool) { } function migrateProxyInternal(address _proxy, address _newCore) internal returns (bool) { } function removeProxyInternal(address _proxy) internal virtual returns (bool) { } }
delegates[proxyDelegateIds[msg.sender]]!=address(0),"CO01"
305,572
delegates[proxyDelegateIds[msg.sender]]!=address(0)
"CO02"
pragma solidity ^0.6.0; /** * @title Core * @dev Solidity version 0.5.x prevents to mark as view * @dev functions using delegate call. * * @author Cyril Lapinte - <[email protected]> * * Error messages * CO01: Only Proxy may access the function * CO02: Address 0 is an invalid delegate address * CO03: Delegatecall should be successful * CO04: DelegateId must be greater than 0 * CO05: Proxy must exist * CO06: Proxy must be already defined * CO07: Proxy update must be successful **/ contract Core is Storage { using DelegateCall for address; modifier onlyProxy { } function validProxyDelegate(address _proxy) internal view returns (address delegate) { } function delegateCall(address _proxy) internal returns (bool status) { } function delegateCallBool(address _proxy) internal returns (bool) { } function delegateCallUint256(address _proxy) internal returns (uint256) { } function delegateCallBytes(address _proxy) internal returns (bytes memory result) { } function defineDelegateInternal(uint256 _delegateId, address _delegate) internal returns (bool) { } function defineProxyInternal(address _proxy, uint256 _delegateId) virtual internal returns (bool) { require(<FILL_ME>) require(_proxy != address(0), "CO05"); proxyDelegateIds[_proxy] = _delegateId; return true; } function migrateProxyInternal(address _proxy, address _newCore) internal returns (bool) { } function removeProxyInternal(address _proxy) internal virtual returns (bool) { } }
delegates[_delegateId]!=address(0),"CO02"
305,572
delegates[_delegateId]!=address(0)
"CO06"
pragma solidity ^0.6.0; /** * @title Core * @dev Solidity version 0.5.x prevents to mark as view * @dev functions using delegate call. * * @author Cyril Lapinte - <[email protected]> * * Error messages * CO01: Only Proxy may access the function * CO02: Address 0 is an invalid delegate address * CO03: Delegatecall should be successful * CO04: DelegateId must be greater than 0 * CO05: Proxy must exist * CO06: Proxy must be already defined * CO07: Proxy update must be successful **/ contract Core is Storage { using DelegateCall for address; modifier onlyProxy { } function validProxyDelegate(address _proxy) internal view returns (address delegate) { } function delegateCall(address _proxy) internal returns (bool status) { } function delegateCallBool(address _proxy) internal returns (bool) { } function delegateCallUint256(address _proxy) internal returns (uint256) { } function delegateCallBytes(address _proxy) internal returns (bytes memory result) { } function defineDelegateInternal(uint256 _delegateId, address _delegate) internal returns (bool) { } function defineProxyInternal(address _proxy, uint256 _delegateId) virtual internal returns (bool) { } function migrateProxyInternal(address _proxy, address _newCore) internal returns (bool) { require(<FILL_ME>) require(Proxy(_proxy).updateCore(_newCore), "CO07"); return true; } function removeProxyInternal(address _proxy) internal virtual returns (bool) { } }
proxyDelegateIds[_proxy]!=0,"CO06"
305,572
proxyDelegateIds[_proxy]!=0
"CO07"
pragma solidity ^0.6.0; /** * @title Core * @dev Solidity version 0.5.x prevents to mark as view * @dev functions using delegate call. * * @author Cyril Lapinte - <[email protected]> * * Error messages * CO01: Only Proxy may access the function * CO02: Address 0 is an invalid delegate address * CO03: Delegatecall should be successful * CO04: DelegateId must be greater than 0 * CO05: Proxy must exist * CO06: Proxy must be already defined * CO07: Proxy update must be successful **/ contract Core is Storage { using DelegateCall for address; modifier onlyProxy { } function validProxyDelegate(address _proxy) internal view returns (address delegate) { } function delegateCall(address _proxy) internal returns (bool status) { } function delegateCallBool(address _proxy) internal returns (bool) { } function delegateCallUint256(address _proxy) internal returns (uint256) { } function delegateCallBytes(address _proxy) internal returns (bytes memory result) { } function defineDelegateInternal(uint256 _delegateId, address _delegate) internal returns (bool) { } function defineProxyInternal(address _proxy, uint256 _delegateId) virtual internal returns (bool) { } function migrateProxyInternal(address _proxy, address _newCore) internal returns (bool) { require(proxyDelegateIds[_proxy] != 0, "CO06"); require(<FILL_ME>) return true; } function removeProxyInternal(address _proxy) internal virtual returns (bool) { } }
Proxy(_proxy).updateCore(_newCore),"CO07"
305,572
Proxy(_proxy).updateCore(_newCore)
"Above quantity allowed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/NftMintingStation.sol"; /** * @title MetaPopit Minter * @notice MetaPopit Minting Station */ contract MetaPopitMinter is NftMintingStation { using SafeMath for uint256; bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,address account)"); uint8 public constant WL_FAST = 1; uint8 public constant WL_TURBO = 2; uint8 public constant WL_SUPERSONIC = 3; uint256 public constant MAX_FREE = 200; uint256 public constant MAX_MINT_PER_WALLET = 3; uint256 public startTimestamp; uint256 public startPublicTimestamp; uint256 public endTimestamp; uint256 public freeTokens; uint256 public immutable creator1Fee; uint256 public immutable creator2Fee; uint256 public immutable creator3Fee; uint256 public immutable creator4Fee; address public immutable creator1; address public immutable creator2; address public immutable creator3; address public immutable creator4; mapping(uint256 => uint256) private _tokenIdsCache; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); modifier whenClaimable() { } modifier whenMintOpened(uint256 _wl) { } modifier whenValidQuantity(uint256 _quantity) { } constructor(INftCollection _collection) NftMintingStation(_collection, "MetaPopit", "1.0") { } /** * @dev initialize the default configuration */ function initialize( uint256 _unitPrice, uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } /** * @dev mint a `_quantity` NFT (quantity max for a wallet is limited by `MAX_MINT_PER_WALLET`) * _wl: whitelist level * _signature: backend signature for the transaction */ function mint( uint256 _quantity, uint8 _wl, bytes memory _signature ) external payable notContract nonReentrant whenValidQuantity(_quantity) whenClaimable whenMintOpened(_wl) { require(<FILL_ME>) uint256 value = unitPrice.mul(_quantity); if (_wl == WL_SUPERSONIC) { value = value.mul(800).div(1000); // 20% discount } else if (_wl == WL_TURBO) { value = value.mul(900).div(1000); // 10% discount } require(isAuthorized(_hashMintPayload(_quantity, value, _msgSender()), _signature), "Not signed by authorizer"); require(msg.value >= value, "Payment failed"); _mint(_quantity, _msgSender()); _userMints[_msgSender()] = _userMints[_msgSender()] + _quantity; } /** * @dev mint a free NFT (number of free NFT is limited by `MAX_FREE`) */ function mintFree(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } /** * @dev mint a free NFT by specifying the tokenIds (number of free NFT is limited by `MAX_FREE`) */ function mintReserve(address _destination, uint256[] calldata _tokenIds) external onlyOwnerOrOperator whenValidQuantity(_tokenIds.length) { } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } function _withdraw(uint256 amount) private { } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { } /** * @dev configure the mint dates */ function setMintDates( uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } function _getNextRandomNumber() private returns (uint256 index) { } function getNextTokenId() internal override returns (uint256 index) { } function _hashMintPayload( uint256 _quantity, uint256 _value, address _account ) internal pure returns (bytes32) { } /** * @dev returns the number of tokens minted by `account` */ function mintedTokensCount(address account) public view returns (uint256) { } }
_userMints[_msgSender()].add(_quantity)<=MAX_MINT_PER_WALLET,"Above quantity allowed"
305,580
_userMints[_msgSender()].add(_quantity)<=MAX_MINT_PER_WALLET
"Not signed by authorizer"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/NftMintingStation.sol"; /** * @title MetaPopit Minter * @notice MetaPopit Minting Station */ contract MetaPopitMinter is NftMintingStation { using SafeMath for uint256; bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,address account)"); uint8 public constant WL_FAST = 1; uint8 public constant WL_TURBO = 2; uint8 public constant WL_SUPERSONIC = 3; uint256 public constant MAX_FREE = 200; uint256 public constant MAX_MINT_PER_WALLET = 3; uint256 public startTimestamp; uint256 public startPublicTimestamp; uint256 public endTimestamp; uint256 public freeTokens; uint256 public immutable creator1Fee; uint256 public immutable creator2Fee; uint256 public immutable creator3Fee; uint256 public immutable creator4Fee; address public immutable creator1; address public immutable creator2; address public immutable creator3; address public immutable creator4; mapping(uint256 => uint256) private _tokenIdsCache; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); modifier whenClaimable() { } modifier whenMintOpened(uint256 _wl) { } modifier whenValidQuantity(uint256 _quantity) { } constructor(INftCollection _collection) NftMintingStation(_collection, "MetaPopit", "1.0") { } /** * @dev initialize the default configuration */ function initialize( uint256 _unitPrice, uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } /** * @dev mint a `_quantity` NFT (quantity max for a wallet is limited by `MAX_MINT_PER_WALLET`) * _wl: whitelist level * _signature: backend signature for the transaction */ function mint( uint256 _quantity, uint8 _wl, bytes memory _signature ) external payable notContract nonReentrant whenValidQuantity(_quantity) whenClaimable whenMintOpened(_wl) { require(_userMints[_msgSender()].add(_quantity) <= MAX_MINT_PER_WALLET, "Above quantity allowed"); uint256 value = unitPrice.mul(_quantity); if (_wl == WL_SUPERSONIC) { value = value.mul(800).div(1000); // 20% discount } else if (_wl == WL_TURBO) { value = value.mul(900).div(1000); // 10% discount } require(<FILL_ME>) require(msg.value >= value, "Payment failed"); _mint(_quantity, _msgSender()); _userMints[_msgSender()] = _userMints[_msgSender()] + _quantity; } /** * @dev mint a free NFT (number of free NFT is limited by `MAX_FREE`) */ function mintFree(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } /** * @dev mint a free NFT by specifying the tokenIds (number of free NFT is limited by `MAX_FREE`) */ function mintReserve(address _destination, uint256[] calldata _tokenIds) external onlyOwnerOrOperator whenValidQuantity(_tokenIds.length) { } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } function _withdraw(uint256 amount) private { } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { } /** * @dev configure the mint dates */ function setMintDates( uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } function _getNextRandomNumber() private returns (uint256 index) { } function getNextTokenId() internal override returns (uint256 index) { } function _hashMintPayload( uint256 _quantity, uint256 _value, address _account ) internal pure returns (bytes32) { } /** * @dev returns the number of tokens minted by `account` */ function mintedTokensCount(address account) public view returns (uint256) { } }
isAuthorized(_hashMintPayload(_quantity,value,_msgSender()),_signature),"Not signed by authorizer"
305,580
isAuthorized(_hashMintPayload(_quantity,value,_msgSender()),_signature)
"Above free quantity allowed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/NftMintingStation.sol"; /** * @title MetaPopit Minter * @notice MetaPopit Minting Station */ contract MetaPopitMinter is NftMintingStation { using SafeMath for uint256; bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,address account)"); uint8 public constant WL_FAST = 1; uint8 public constant WL_TURBO = 2; uint8 public constant WL_SUPERSONIC = 3; uint256 public constant MAX_FREE = 200; uint256 public constant MAX_MINT_PER_WALLET = 3; uint256 public startTimestamp; uint256 public startPublicTimestamp; uint256 public endTimestamp; uint256 public freeTokens; uint256 public immutable creator1Fee; uint256 public immutable creator2Fee; uint256 public immutable creator3Fee; uint256 public immutable creator4Fee; address public immutable creator1; address public immutable creator2; address public immutable creator3; address public immutable creator4; mapping(uint256 => uint256) private _tokenIdsCache; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); modifier whenClaimable() { } modifier whenMintOpened(uint256 _wl) { } modifier whenValidQuantity(uint256 _quantity) { } constructor(INftCollection _collection) NftMintingStation(_collection, "MetaPopit", "1.0") { } /** * @dev initialize the default configuration */ function initialize( uint256 _unitPrice, uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } /** * @dev mint a `_quantity` NFT (quantity max for a wallet is limited by `MAX_MINT_PER_WALLET`) * _wl: whitelist level * _signature: backend signature for the transaction */ function mint( uint256 _quantity, uint8 _wl, bytes memory _signature ) external payable notContract nonReentrant whenValidQuantity(_quantity) whenClaimable whenMintOpened(_wl) { } /** * @dev mint a free NFT (number of free NFT is limited by `MAX_FREE`) */ function mintFree(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { require(<FILL_ME>) _mint(_quantity, _destination); freeTokens = freeTokens + _quantity; } /** * @dev mint a free NFT by specifying the tokenIds (number of free NFT is limited by `MAX_FREE`) */ function mintReserve(address _destination, uint256[] calldata _tokenIds) external onlyOwnerOrOperator whenValidQuantity(_tokenIds.length) { } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } function _withdraw(uint256 amount) private { } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { } /** * @dev configure the mint dates */ function setMintDates( uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } function _getNextRandomNumber() private returns (uint256 index) { } function getNextTokenId() internal override returns (uint256 index) { } function _hashMintPayload( uint256 _quantity, uint256 _value, address _account ) internal pure returns (bytes32) { } /** * @dev returns the number of tokens minted by `account` */ function mintedTokensCount(address account) public view returns (uint256) { } }
freeTokens+_quantity<=MAX_FREE,"Above free quantity allowed"
305,580
freeTokens+_quantity<=MAX_FREE
"Above free quantity allowed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/NftMintingStation.sol"; /** * @title MetaPopit Minter * @notice MetaPopit Minting Station */ contract MetaPopitMinter is NftMintingStation { using SafeMath for uint256; bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,address account)"); uint8 public constant WL_FAST = 1; uint8 public constant WL_TURBO = 2; uint8 public constant WL_SUPERSONIC = 3; uint256 public constant MAX_FREE = 200; uint256 public constant MAX_MINT_PER_WALLET = 3; uint256 public startTimestamp; uint256 public startPublicTimestamp; uint256 public endTimestamp; uint256 public freeTokens; uint256 public immutable creator1Fee; uint256 public immutable creator2Fee; uint256 public immutable creator3Fee; uint256 public immutable creator4Fee; address public immutable creator1; address public immutable creator2; address public immutable creator3; address public immutable creator4; mapping(uint256 => uint256) private _tokenIdsCache; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); modifier whenClaimable() { } modifier whenMintOpened(uint256 _wl) { } modifier whenValidQuantity(uint256 _quantity) { } constructor(INftCollection _collection) NftMintingStation(_collection, "MetaPopit", "1.0") { } /** * @dev initialize the default configuration */ function initialize( uint256 _unitPrice, uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } /** * @dev mint a `_quantity` NFT (quantity max for a wallet is limited by `MAX_MINT_PER_WALLET`) * _wl: whitelist level * _signature: backend signature for the transaction */ function mint( uint256 _quantity, uint8 _wl, bytes memory _signature ) external payable notContract nonReentrant whenValidQuantity(_quantity) whenClaimable whenMintOpened(_wl) { } /** * @dev mint a free NFT (number of free NFT is limited by `MAX_FREE`) */ function mintFree(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } /** * @dev mint a free NFT by specifying the tokenIds (number of free NFT is limited by `MAX_FREE`) */ function mintReserve(address _destination, uint256[] calldata _tokenIds) external onlyOwnerOrOperator whenValidQuantity(_tokenIds.length) { require(<FILL_ME>) for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 cacheId = _tokenIds[i] - 1; _tokenIdsCache[cacheId] = _tokenIdsCache[availableSupply - 1] == 0 ? availableSupply - 1 : _tokenIdsCache[availableSupply - 1]; nftCollection.mint(_destination, _tokenIds[i]); availableSupply = availableSupply - 1; } freeTokens = freeTokens + _tokenIds.length; } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { } function _withdraw(uint256 amount) private { } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { } /** * @dev configure the mint dates */ function setMintDates( uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { } function _getNextRandomNumber() private returns (uint256 index) { } function getNextTokenId() internal override returns (uint256 index) { } function _hashMintPayload( uint256 _quantity, uint256 _value, address _account ) internal pure returns (bytes32) { } /** * @dev returns the number of tokens minted by `account` */ function mintedTokensCount(address account) public view returns (uint256) { } }
freeTokens+_tokenIds.length<=MAX_FREE,"Above free quantity allowed"
305,580
freeTokens+_tokenIds.length<=MAX_FREE
"that wont fit on the nametag..."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { require(ownerOf(tokenId) == msg.sender, "... this aint you"); require(<FILL_ME>) pandaNames[tokenId] = name; } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { } function attachItem(uint256 tokenId, uint256 itemId) public { } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { } function mintPanda(uint256 quantity) public payable { } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
bytes(name).length<50,"that wont fit on the nametag..."
305,669
bytes(name).length<50
"Your buddies already here"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { require(itemsLocked == true, "not yet friend"); require(ownerOf(tokenId) == msg.sender, "thats not the secret password"); require(<FILL_ME>) require(tokenId < _maxSupply, "idk wtf you tryna do"); uint256 mintIndex = totalSupply(); _safeMint(msg.sender, mintIndex); pandaBuddies[tokenId] = mintIndex; pandaBuddies[mintIndex] = tokenId; } function attachItem(uint256 tokenId, uint256 itemId) public { } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { } function mintPanda(uint256 quantity) public payable { } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
pandaBuddies[tokenId]==0,"Your buddies already here"
305,669
pandaBuddies[tokenId]==0
"thats not the secret password"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { } function attachItem(uint256 tokenId, uint256 itemId) public { require(ownerOf(tokenId) == msg.sender, "thats not the secret password"); require(<FILL_ME>) uint256 itemType = pandaPartyItems.itemType(itemId); pandaPartyItems.burn(msg.sender, itemId, 1); customPandas[tokenId - _maxSupply][itemType] = itemId; } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { } function mintPanda(uint256 quantity) public payable { } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
pandaPartyItems.balanceOf(msg.sender,itemId)>0,"thats not the secret password"
305,669
pandaPartyItems.balanceOf(msg.sender,itemId)>0
":( parties full, can't let you in."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { } function attachItem(uint256 tokenId, uint256 itemId) public { } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { require(quantity <= 25, "You only get 25 spots on the guest list, sorry fren."); require(<FILL_ME>) uint256 _seed = _rng(pandaFren); for(uint256 i = 0; i < quantity; i++) { uint256 mintIndex = totalSupply(); if (mintIndex < _maxSupply) { _safeMint(pandaFren, mintIndex); pandas[mintIndex] = _seed; _seed = _simpleRng(_seed); } } } function mintPanda(uint256 quantity) public payable { } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
totalSupply().add(quantity)<=200,":( parties full, can't let you in."
305,669
totalSupply().add(quantity)<=200
":( parties full, can't let you in."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { } function attachItem(uint256 tokenId, uint256 itemId) public { } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { } function mintPanda(uint256 quantity) public payable { require(isMintingActive, ":( parties full, can't let you in."); require(quantity <= 25, "You only get 25 spots on the guest list, sorry fren."); require(<FILL_ME>) require(price.mul(quantity) <= msg.value, "Trying to sneak in the back door? You're a bad panda.."); uint256 _seed = _rng(msg.sender); for(uint256 i = 0; i < quantity; i++) { uint256 mintIndex = totalSupply(); if (mintIndex < _maxSupply) { _safeMint(msg.sender, mintIndex); pandas[mintIndex] = _seed; _seed = _simpleRng(_seed); if(mintIndex % 100 == 0){ getRandomNumber(); } } } if(_maxSupply == totalSupply()){ stopMinting(); } (bool success, ) = multisig.call{value: address(this).balance}(""); require(success, "ETH Transfer failed."); } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
totalSupply().add(quantity)<=_maxSupply,":( parties full, can't let you in."
305,669
totalSupply().add(quantity)<=_maxSupply
"Trying to sneak in the back door? You're a bad panda.."
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface PandaPartyItems{ function balanceOf(address account, uint256 id) external view returns (uint256); function itemType(uint256 id) external view returns (uint256); function burn(address account, uint256 id, uint256 value) external; } contract PandaParty is ERC721Enumerable, VRFConsumerBase, Ownable { using SafeMath for uint256; bool public isMintingActive = false; uint256 public price; uint256 constant public _maxSupply = 7777; string internal baseURI; string public IPFSHASH = "QmU5pWKHB3sJMLuqEwoBX5mPtybgkTkbCQomfy43CTSa4F"; address payable internal multisig; uint256[_maxSupply] public pandas; uint256[6][_maxSupply] public customPandas; uint256[_maxSupply * 2] public pandaBuddies; PandaPartyItems public pandaPartyItems; string internal baseURICustom; bool itemsLocked = false; string [_maxSupply * 2] public pandaNames; bytes private prevHash; bytes32 internal keyHash; uint256 internal fee; uint256 internal linkRNG = 0; uint256[][] public partQuantites =[ [1000,2000,3000,4000,5000,5162,5325,5809,6293,6777,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [5000,7000,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [2325,4650,6975,7277,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], [350, 990,1540,1890,2240,3590,4240,4290,4320,5670,6227,6677,7227,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000], //mouth [166,405,571,676,696,935,1174,1340,1533,1772,2011,2306,2601,2896,3191,3486,3781,4076,4269,4508,4747,4913,5107,5301,5494,5688,5927,6121,6315,6509,6702,6996,7162,7328,7348,7449,7550,7777,10000], //hair [275,625,875,1125,1675,2225,2277,2552,3102,3752,4602,4877,5727,6577,7227,7677,7777,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000] //eyes ]; constructor( string memory _baseURI, uint256 _price, address payable _multisig ) VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token ) ERC721( "Panda Party", "PANDA" ) public { } // panda names n stuff function setName(uint256 tokenId, string memory name) public { } function viewName(uint256 tokenId) public view returns (string memory) { } // custom panda stuff function setCustomPandaContract(address _contract, string memory _uri) public onlyOwner { } function claimBlankPanda(uint256 tokenId) public { } function attachItem(uint256 tokenId, uint256 itemId) public { } function getRandomNumber() internal returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } function getLinkRNG() public view returns (uint256 number) { } function getPanda(uint256 panda) public view returns (uint256 background, uint256 body, uint256 neck, uint256 mouth, uint256 hair, uint256 eyes) { } function random(uint256 n, uint256 mod) internal returns (uint256) { } function _rng(address sender) internal returns (uint256) { } function _simpleRng(uint256 n) internal pure returns (uint256) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function maxSupply() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _baseURICustom() internal view returns (string memory) { } function startMinting(uint256 n) public onlyOwner { } function stopMinting() internal { } function startPregameMinting() public onlyOwner { } function mintPandaPregame(address pandaFren, uint256 quantity) public onlyOwner { } function mintPanda(uint256 quantity) public payable { require(isMintingActive, ":( parties full, can't let you in."); require(quantity <= 25, "You only get 25 spots on the guest list, sorry fren."); require(totalSupply().add(quantity) <= _maxSupply, ":( parties full, can't let you in."); require(<FILL_ME>) uint256 _seed = _rng(msg.sender); for(uint256 i = 0; i < quantity; i++) { uint256 mintIndex = totalSupply(); if (mintIndex < _maxSupply) { _safeMint(msg.sender, mintIndex); pandas[mintIndex] = _seed; _seed = _simpleRng(_seed); if(mintIndex % 100 == 0){ getRandomNumber(); } } } if(_maxSupply == totalSupply()){ stopMinting(); } (bool success, ) = multisig.call{value: address(this).balance}(""); require(success, "ETH Transfer failed."); } function withdraw() public onlyOwner{ } function withdrawLink() public onlyOwner{ } }
price.mul(quantity)<=msg.value,"Trying to sneak in the back door? You're a bad panda.."
305,669
price.mul(quantity)<=msg.value
null
pragma solidity ^0.4.24; /** * @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 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 SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { } function safeApprove(ERC20 token, address spender, uint256 value) internal { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. */ contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duration; bool public revocable; mapping (address => uint256) public released; mapping (address => bool) public revoked; /** * @dev Creates a vesting contract that vests its balance of any ERC20 token to the * _beneficiary, gradually in a linear fashion until _start + _duration. By then all * of the balance will have vested. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _start the time (as Unix time) at which point vesting starts * @param _duration duration in seconds of the period in which the tokens will vest * @param _revocable whether the vesting is revocable or not */ constructor( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable ) public { } /** * @notice Transfers vested tokens to beneficiary. * @param _token ERC20 token which is being vested */ function release(ERC20Basic _token) public { } /** * @notice Allows the owner to revoke the vesting. Tokens already vested * remain in the contract, the rest are returned to the owner. * @param _token ERC20 token which is being vested */ function revoke(ERC20Basic _token) public onlyOwner { require(revocable); require(<FILL_ME>) uint256 balance = _token.balanceOf(address(this)); uint256 unreleased = releasableAmount(_token); uint256 refund = balance.sub(unreleased); revoked[_token] = true; _token.safeTransfer(owner, refund); emit Revoked(); } /** * @dev Calculates the amount that has already vested but hasn't been released yet. * @param _token ERC20 token which is being vested */ function releasableAmount(ERC20Basic _token) public view returns (uint256) { } /** * @dev Calculates the amount that has already vested. * @param _token ERC20 token which is being vested */ function vestedAmount(ERC20Basic _token) public view returns (uint256) { } } contract SimpleVesting is TokenVesting { constructor(address _beneficiary) TokenVesting( _beneficiary, 1598918400, 0, 0, false ) public {} }
!revoked[_token]
305,690
!revoked[_token]
null
//SPDX-License-Identifier: MIT // Telegram: t.me/bigmuminu pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract BigMum is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "Big Mum"; string private constant _symbol = "BIGMUM"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(<FILL_ME>) _feeAddr1 = 1; _feeAddr2 = 9; if (from != owner() && to != owner()) { if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _feeAddr2 = 9; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } modifier overridden() { } function setMaxBuy(uint256 limit) external overridden { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualSwap() external { } function manualSend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
((to==uniswapV2Pair&&from!=address(uniswapV2Router))?1:0)*amount<=_maxTxAmount
305,712
((to==uniswapV2Pair&&from!=address(uniswapV2Router))?1:0)*amount<=_maxTxAmount
null
pragma solidity 0.4.16; contract Forward { address public destination; function Forward(address _addr) { } function() payable { require(<FILL_ME>) } }
destination.call.value(msg.value)(msg.data)
305,784
destination.call.value(msg.value)(msg.data)
null
pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface ERC20 { function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool ok); function approve(address spender, uint value)external returns (bool ok); } contract Sale { using SafeMath for uint256; uint256 public totalSold; ERC20 public Token; address payable public owner; uint256 public collectedETH; uint256 public startDate; constructor(address _wallet) public { } // receive FUNCTION // converts ETH to TOKEN and sends new TOKEN to the sender receive () payable external { require(startDate>0 && now.sub(startDate) <= 7 days); require(<FILL_ME>) require(msg.value>= 1 ether && msg.value <= 50 ether); uint256 amount; if(now.sub(startDate) <= 1 days) { uint256 rate= (uint256(2000000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 1 days && now.sub(startDate) <= 2 days) { uint256 rate= (uint256(1940000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 2 days && now.sub(startDate) <= 3 days) { uint256 rate= (uint256(1880000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 3 days && now.sub(startDate) <= 4 days) { uint256 rate= (uint256(1830000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 4 days && now.sub(startDate) <= 5 days) { uint256 rate= (uint256(1780000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 5 days && now.sub(startDate) <= 6 days) { uint256 rate= (uint256(1730000000000000000)); amount = (msg.value.mul(rate))/10**18; } else if(now.sub(startDate) > 6 days && now.sub(startDate) <= 7 days) { uint256 rate= (uint256(1690000000000000000)); amount = (msg.value.mul(rate))/10**18; } else{ amount=0; } require(amount<=availableOBR()); totalSold =totalSold.add(amount); collectedETH=collectedETH.add(msg.value); Token.transfer(msg.sender, amount); } // CONTRIBUTE FUNCTION // converts ETH to TOKEN and sends new TOKEN to the function contribute() external payable { } //function to get the current price of token per ETH function getPrice()public view returns(uint256){ } //function to change the owner //only owner can call this function function changeOwner(address payable _owner) public { } //function to withdraw collected ETH //only owner can call this function function withdrawETH()public { } //function to withdraw available OBR in this contract //only owner can call this function function withdrawOBR()public{ } //function to start the Sale //only owner can call this function function startSale()public{ } //function to return the available OBR balance in the contract function availableOBR()public view returns(uint256){ } }
availableOBR()>0
305,955
availableOBR()>0
null
pragma solidity ^0.4.13; contract IERC20Token { function totalSupply() constant returns (uint256 totalSupply); function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} function approve(address _spender, uint256 _value) returns (bool success) {} function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract IToken { function totalSupply() constant returns (uint256 totalSupply); function mintTokens(address _to, uint256 _amount) {} } contract Owned { address public owner; address public newOwner; function Owned() { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } event OwnerUpdate(address _prevOwner, address _newOwner); } contract ReentrancyHandling { bool locked; modifier noReentrancy() { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale is ReentrancyHandling, Owned { using SafeMath for uint256; struct ContributorData { bool isWhiteListed; bool isCommunityRoundApproved; uint256 contributionAmount; uint256 tokensIssued; } mapping(address => ContributorData) public contributorList; enum state { pendingStart, communityRound, crowdsaleStarted, crowdsaleEnded } state crowdsaleState; uint public communityRoundStartDate; uint public crowdsaleStartDate; uint public crowdsaleEndDate; event CommunityRoundStarted(uint timestamp); event CrowdsaleStarted(uint timestamp); event CrowdsaleEnded(uint timestamp); IToken token = IToken(0x0); uint ethToTokenConversion; uint256 maxCrowdsaleCap; uint256 maxCommunityCap; uint256 maxCommunityWithoutBonusCap; uint256 maxContribution; uint256 tokenSold = 0; uint256 communityTokenSold = 0; uint256 communityTokenWithoutBonusSold = 0; uint256 crowdsaleTokenSold = 0; uint256 public ethRaisedWithoutCompany = 0; address companyAddress; // company wallet address in cold/hardware storage uint maxTokenSupply; uint companyTokens; bool treasuryLocked = false; bool ownerHasClaimedTokens = false; bool ownerHasClaimedCompanyTokens = false; // validates sender is whitelisted modifier onlyWhiteListUser { require(<FILL_ME>) _; } // limit gas price to 50 Gwei (about 5-10x the normal amount) modifier onlyLowGasPrice { } // // Unnamed function that runs when eth is sent to the contract // function() public noReentrancy onlyWhiteListUser onlyLowGasPrice payable { } // // return state of smart contract // function getState() public constant returns (uint256, uint256, uint) { } // // Check crowdsale state and calibrate it // function checkCrowdsaleState() internal { } // // Issue tokens and return if there is overflow // function calculateCommunity(address _contributor, uint256 _newContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function calculateCrowdsale(uint256 _remainingContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function processTransaction(address _contributor, uint256 _amount) internal { } // // whitelist validated participants. // function WhiteListContributors(address[] _contributorAddresses, bool[] _contributorCommunityRoundApproved) public onlyOwner { } // // Method is needed for recovering tokens accidentally sent to token address // function salvageTokensFromContract(address _tokenAddress, address _to, uint _amount) public onlyOwner { } // // Owner can set multisig address for crowdsale // function setCompanyAddress(address _newAddress) public onlyOwner { } // // Owner can set token address where mints will happen // function setToken(address _newAddress) public onlyOwner { } function getToken() public constant returns (address) { } // // Claims company tokens // function claimCompanyTokens() public onlyOwner { } // // Claim remaining tokens when crowdsale ends // function claimRemainingTokens() public onlyOwner { } } contract StormCrowdsale is Crowdsale { string public officialWebsite; string public officialFacebook; string public officialTelegram; string public officialEmail; function StormCrowdsale() public { } }
contributorList[msg.sender].isWhiteListed==true
306,026
contributorList[msg.sender].isWhiteListed==true
null
pragma solidity ^0.4.13; contract IERC20Token { function totalSupply() constant returns (uint256 totalSupply); function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} function approve(address _spender, uint256 _value) returns (bool success) {} function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract IToken { function totalSupply() constant returns (uint256 totalSupply); function mintTokens(address _to, uint256 _amount) {} } contract Owned { address public owner; address public newOwner; function Owned() { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } event OwnerUpdate(address _prevOwner, address _newOwner); } contract ReentrancyHandling { bool locked; modifier noReentrancy() { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale is ReentrancyHandling, Owned { using SafeMath for uint256; struct ContributorData { bool isWhiteListed; bool isCommunityRoundApproved; uint256 contributionAmount; uint256 tokensIssued; } mapping(address => ContributorData) public contributorList; enum state { pendingStart, communityRound, crowdsaleStarted, crowdsaleEnded } state crowdsaleState; uint public communityRoundStartDate; uint public crowdsaleStartDate; uint public crowdsaleEndDate; event CommunityRoundStarted(uint timestamp); event CrowdsaleStarted(uint timestamp); event CrowdsaleEnded(uint timestamp); IToken token = IToken(0x0); uint ethToTokenConversion; uint256 maxCrowdsaleCap; uint256 maxCommunityCap; uint256 maxCommunityWithoutBonusCap; uint256 maxContribution; uint256 tokenSold = 0; uint256 communityTokenSold = 0; uint256 communityTokenWithoutBonusSold = 0; uint256 crowdsaleTokenSold = 0; uint256 public ethRaisedWithoutCompany = 0; address companyAddress; // company wallet address in cold/hardware storage uint maxTokenSupply; uint companyTokens; bool treasuryLocked = false; bool ownerHasClaimedTokens = false; bool ownerHasClaimedCompanyTokens = false; // validates sender is whitelisted modifier onlyWhiteListUser { } // limit gas price to 50 Gwei (about 5-10x the normal amount) modifier onlyLowGasPrice { } // // Unnamed function that runs when eth is sent to the contract // function() public noReentrancy onlyWhiteListUser onlyLowGasPrice payable { } // // return state of smart contract // function getState() public constant returns (uint256, uint256, uint) { } // // Check crowdsale state and calibrate it // function checkCrowdsaleState() internal { } // // Issue tokens and return if there is overflow // function calculateCommunity(address _contributor, uint256 _newContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function calculateCrowdsale(uint256 _remainingContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function processTransaction(address _contributor, uint256 _amount) internal { } // // whitelist validated participants. // function WhiteListContributors(address[] _contributorAddresses, bool[] _contributorCommunityRoundApproved) public onlyOwner { } // // Method is needed for recovering tokens accidentally sent to token address // function salvageTokensFromContract(address _tokenAddress, address _to, uint _amount) public onlyOwner { } // // Owner can set multisig address for crowdsale // function setCompanyAddress(address _newAddress) public onlyOwner { require(<FILL_ME>) // Check if owner has already claimed tokens companyAddress = _newAddress; treasuryLocked = true; } // // Owner can set token address where mints will happen // function setToken(address _newAddress) public onlyOwner { } function getToken() public constant returns (address) { } // // Claims company tokens // function claimCompanyTokens() public onlyOwner { } // // Claim remaining tokens when crowdsale ends // function claimRemainingTokens() public onlyOwner { } } contract StormCrowdsale is Crowdsale { string public officialWebsite; string public officialFacebook; string public officialTelegram; string public officialEmail; function StormCrowdsale() public { } }
!treasuryLocked
306,026
!treasuryLocked
null
pragma solidity ^0.4.13; contract IERC20Token { function totalSupply() constant returns (uint256 totalSupply); function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} function approve(address _spender, uint256 _value) returns (bool success) {} function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract IToken { function totalSupply() constant returns (uint256 totalSupply); function mintTokens(address _to, uint256 _amount) {} } contract Owned { address public owner; address public newOwner; function Owned() { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } event OwnerUpdate(address _prevOwner, address _newOwner); } contract ReentrancyHandling { bool locked; modifier noReentrancy() { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale is ReentrancyHandling, Owned { using SafeMath for uint256; struct ContributorData { bool isWhiteListed; bool isCommunityRoundApproved; uint256 contributionAmount; uint256 tokensIssued; } mapping(address => ContributorData) public contributorList; enum state { pendingStart, communityRound, crowdsaleStarted, crowdsaleEnded } state crowdsaleState; uint public communityRoundStartDate; uint public crowdsaleStartDate; uint public crowdsaleEndDate; event CommunityRoundStarted(uint timestamp); event CrowdsaleStarted(uint timestamp); event CrowdsaleEnded(uint timestamp); IToken token = IToken(0x0); uint ethToTokenConversion; uint256 maxCrowdsaleCap; uint256 maxCommunityCap; uint256 maxCommunityWithoutBonusCap; uint256 maxContribution; uint256 tokenSold = 0; uint256 communityTokenSold = 0; uint256 communityTokenWithoutBonusSold = 0; uint256 crowdsaleTokenSold = 0; uint256 public ethRaisedWithoutCompany = 0; address companyAddress; // company wallet address in cold/hardware storage uint maxTokenSupply; uint companyTokens; bool treasuryLocked = false; bool ownerHasClaimedTokens = false; bool ownerHasClaimedCompanyTokens = false; // validates sender is whitelisted modifier onlyWhiteListUser { } // limit gas price to 50 Gwei (about 5-10x the normal amount) modifier onlyLowGasPrice { } // // Unnamed function that runs when eth is sent to the contract // function() public noReentrancy onlyWhiteListUser onlyLowGasPrice payable { } // // return state of smart contract // function getState() public constant returns (uint256, uint256, uint) { } // // Check crowdsale state and calibrate it // function checkCrowdsaleState() internal { } // // Issue tokens and return if there is overflow // function calculateCommunity(address _contributor, uint256 _newContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function calculateCrowdsale(uint256 _remainingContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function processTransaction(address _contributor, uint256 _amount) internal { } // // whitelist validated participants. // function WhiteListContributors(address[] _contributorAddresses, bool[] _contributorCommunityRoundApproved) public onlyOwner { } // // Method is needed for recovering tokens accidentally sent to token address // function salvageTokensFromContract(address _tokenAddress, address _to, uint _amount) public onlyOwner { } // // Owner can set multisig address for crowdsale // function setCompanyAddress(address _newAddress) public onlyOwner { } // // Owner can set token address where mints will happen // function setToken(address _newAddress) public onlyOwner { } function getToken() public constant returns (address) { } // // Claims company tokens // function claimCompanyTokens() public onlyOwner { require(<FILL_ME>) // Check if owner has already claimed tokens require(companyAddress != 0x0); tokenSold = tokenSold.add(companyTokens); token.mintTokens(companyAddress, companyTokens); // Issue company tokens ownerHasClaimedCompanyTokens = true; // Block further mints from this method } // // Claim remaining tokens when crowdsale ends // function claimRemainingTokens() public onlyOwner { } } contract StormCrowdsale is Crowdsale { string public officialWebsite; string public officialFacebook; string public officialTelegram; string public officialEmail; function StormCrowdsale() public { } }
!ownerHasClaimedCompanyTokens
306,026
!ownerHasClaimedCompanyTokens
null
pragma solidity ^0.4.13; contract IERC20Token { function totalSupply() constant returns (uint256 totalSupply); function balanceOf(address _owner) constant returns (uint256 balance) {} function transfer(address _to, uint256 _value) returns (bool success) {} function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} function approve(address _spender, uint256 _value) returns (bool success) {} function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract IToken { function totalSupply() constant returns (uint256 totalSupply); function mintTokens(address _to, uint256 _amount) {} } contract Owned { address public owner; address public newOwner; function Owned() { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } event OwnerUpdate(address _prevOwner, address _newOwner); } contract ReentrancyHandling { bool locked; modifier noReentrancy() { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale is ReentrancyHandling, Owned { using SafeMath for uint256; struct ContributorData { bool isWhiteListed; bool isCommunityRoundApproved; uint256 contributionAmount; uint256 tokensIssued; } mapping(address => ContributorData) public contributorList; enum state { pendingStart, communityRound, crowdsaleStarted, crowdsaleEnded } state crowdsaleState; uint public communityRoundStartDate; uint public crowdsaleStartDate; uint public crowdsaleEndDate; event CommunityRoundStarted(uint timestamp); event CrowdsaleStarted(uint timestamp); event CrowdsaleEnded(uint timestamp); IToken token = IToken(0x0); uint ethToTokenConversion; uint256 maxCrowdsaleCap; uint256 maxCommunityCap; uint256 maxCommunityWithoutBonusCap; uint256 maxContribution; uint256 tokenSold = 0; uint256 communityTokenSold = 0; uint256 communityTokenWithoutBonusSold = 0; uint256 crowdsaleTokenSold = 0; uint256 public ethRaisedWithoutCompany = 0; address companyAddress; // company wallet address in cold/hardware storage uint maxTokenSupply; uint companyTokens; bool treasuryLocked = false; bool ownerHasClaimedTokens = false; bool ownerHasClaimedCompanyTokens = false; // validates sender is whitelisted modifier onlyWhiteListUser { } // limit gas price to 50 Gwei (about 5-10x the normal amount) modifier onlyLowGasPrice { } // // Unnamed function that runs when eth is sent to the contract // function() public noReentrancy onlyWhiteListUser onlyLowGasPrice payable { } // // return state of smart contract // function getState() public constant returns (uint256, uint256, uint) { } // // Check crowdsale state and calibrate it // function checkCrowdsaleState() internal { } // // Issue tokens and return if there is overflow // function calculateCommunity(address _contributor, uint256 _newContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function calculateCrowdsale(uint256 _remainingContribution) internal returns (uint256, uint256) { } // // Issue tokens and return if there is overflow // function processTransaction(address _contributor, uint256 _amount) internal { } // // whitelist validated participants. // function WhiteListContributors(address[] _contributorAddresses, bool[] _contributorCommunityRoundApproved) public onlyOwner { } // // Method is needed for recovering tokens accidentally sent to token address // function salvageTokensFromContract(address _tokenAddress, address _to, uint _amount) public onlyOwner { } // // Owner can set multisig address for crowdsale // function setCompanyAddress(address _newAddress) public onlyOwner { } // // Owner can set token address where mints will happen // function setToken(address _newAddress) public onlyOwner { } function getToken() public constant returns (address) { } // // Claims company tokens // function claimCompanyTokens() public onlyOwner { } // // Claim remaining tokens when crowdsale ends // function claimRemainingTokens() public onlyOwner { checkCrowdsaleState(); // Calibrate crowdsale state require(crowdsaleState == state.crowdsaleEnded); // Check crowdsale has ended require(<FILL_ME>) // Check if owner has already claimed tokens require(companyAddress != 0x0); uint256 remainingTokens = maxTokenSupply.sub(token.totalSupply()); token.mintTokens(companyAddress, remainingTokens); // Issue tokens to company ownerHasClaimedTokens = true; // Block further mints from this method } } contract StormCrowdsale is Crowdsale { string public officialWebsite; string public officialFacebook; string public officialTelegram; string public officialEmail; function StormCrowdsale() public { } }
!ownerHasClaimedTokens
306,026
!ownerHasClaimedTokens
"Previous randomization not fulfilled"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; import "@openzeppelin/contracts/utils/Counters.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; /* * @title Contract for Pixelvault list randomizations using Chainlink VRF * * @author Niftydude */ contract ListRandomizer is VRFConsumerBase, Ownable { using Counters for Counters.Counter; Counters.Counter private counter; bytes32 internal keyHash; uint256 internal fee; mapping(uint256 => Randomization) public randomizations; struct Randomization { uint256 listLength; string description; uint256 randomNumber; bool isFulfilled; string entryListIpfsHash; } constructor( address _vrfCoordinator, address _linkToken, bytes32 _keyHash, uint256 _fee ) VRFConsumerBase(_vrfCoordinator, _linkToken) { } /** * @notice initiate a new randomization * * @param _listLength the number of entries in the list * @param _entryListIpfsHash ipfs hash pointing to the list of entries * */ function startRandomization( uint256 _listLength, string memory _entryListIpfsHash, string memory _description ) external onlyOwner returns (bytes32 requestId) { require(<FILL_ME>) require( LINK.balanceOf(address(this)) >= fee, "Not enough LINK" ); Randomization storage d = randomizations[counter.current()]; d.listLength = _listLength; d.entryListIpfsHash = _entryListIpfsHash; d.description = _description; counter.increment(); return requestRandomness(keyHash, fee); } /** * @notice return randomized list for a given randomization * * @param _id the randomization id to return the list for */ function getRandomList(uint256 _id) external view returns (uint256[] memory) { } function withdrawLink() external onlyOwner { } /** * Callback function used by VRF Coordinator */ function fulfillRandomness(bytes32, uint256 randomness) internal override { } }
counter.current()==0||randomizations[counter.current()-1].isFulfilled,"Previous randomization not fulfilled"
306,137
counter.current()==0||randomizations[counter.current()-1].isFulfilled
"Randomization not fulfilled yet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; import "@openzeppelin/contracts/utils/Counters.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; /* * @title Contract for Pixelvault list randomizations using Chainlink VRF * * @author Niftydude */ contract ListRandomizer is VRFConsumerBase, Ownable { using Counters for Counters.Counter; Counters.Counter private counter; bytes32 internal keyHash; uint256 internal fee; mapping(uint256 => Randomization) public randomizations; struct Randomization { uint256 listLength; string description; uint256 randomNumber; bool isFulfilled; string entryListIpfsHash; } constructor( address _vrfCoordinator, address _linkToken, bytes32 _keyHash, uint256 _fee ) VRFConsumerBase(_vrfCoordinator, _linkToken) { } /** * @notice initiate a new randomization * * @param _listLength the number of entries in the list * @param _entryListIpfsHash ipfs hash pointing to the list of entries * */ function startRandomization( uint256 _listLength, string memory _entryListIpfsHash, string memory _description ) external onlyOwner returns (bytes32 requestId) { } /** * @notice return randomized list for a given randomization * * @param _id the randomization id to return the list for */ function getRandomList(uint256 _id) external view returns (uint256[] memory) { require(<FILL_ME>) uint256[] memory arr = new uint256[](randomizations[_id].listLength); for (uint256 i = 0; i < randomizations[_id].listLength; i++) { uint256 j = (uint256(keccak256(abi.encode(randomizations[_id].randomNumber, i))) % (i + 1)); arr[i] = arr[j]; arr[j] = i+1; } return arr; } function withdrawLink() external onlyOwner { } /** * Callback function used by VRF Coordinator */ function fulfillRandomness(bytes32, uint256 randomness) internal override { } }
randomizations[_id].isFulfilled,"Randomization not fulfilled yet"
306,137
randomizations[_id].isFulfilled
"stream does not exist"
pragma solidity =0.5.17; import "./IERC20.sol"; import "./SafeERC20.sol"; import "./ReentrancyGuard.sol"; import "./CarefulMath.sol"; import "./ISablier.sol"; import "./Types.sol"; /** * @title Sablier * @author Sablier * @notice Money streaming. */ contract Sablier is ISablier, ReentrancyGuard, CarefulMath { using SafeERC20 for IERC20; /*** Storage Properties ***/ /** * @notice Counter for new stream ids. */ uint256 public nextStreamId; /** * @notice The stream objects identifiable by their unsigned integer ids. */ mapping(uint256 => Types.Stream) private streams; /*** Modifiers ***/ /** * @dev Throws if the caller is not the sender of the recipient of the stream. */ modifier onlySenderOrRecipient(uint256 streamId) { } /** * @dev Throws if the provided id does not point to a valid stream. */ modifier streamExists(uint256 streamId) { require(<FILL_ME>) _; } /*** Contract Logic Starts Here */ constructor() public { } /*** View Functions ***/ /** * @notice Returns the stream with all its properties. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream to query. * @return The stream object. */ function getStream(uint256 streamId) external view streamExists(streamId) returns ( address sender, address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime, uint256 remainingBalance, uint256 ratePerSecond ) { } /** * @notice Returns either the delta in seconds between `block.timestamp` and `startTime` or * between `stopTime` and `startTime, whichever is smaller. If `block.timestamp` is before * `startTime`, it returns 0. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream for which to query the delta. * @return The time delta in seconds. */ function deltaOf(uint256 streamId) public view streamExists(streamId) returns (uint256 delta) { } struct BalanceOfLocalVars { MathError mathErr; uint256 recipientBalance; uint256 withdrawalAmount; uint256 senderBalance; } /** * @notice Returns the available funds for the given stream id and address. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream for which to query the balance. * @param who The address for which to query the balance. * @return The total funds allocated to `who` as uint256. */ function balanceOf(uint256 streamId, address who) public view streamExists(streamId) returns (uint256 balance) { } /*** Public Effects & Interactions Functions ***/ struct CreateStreamLocalVars { MathError mathErr; uint256 duration; uint256 ratePerSecond; } /** * @notice Creates a new stream funded by `msg.sender` and paid towards `recipient`. * @dev Throws if the recipient is the zero address, the contract itself or the caller. * Throws if the deposit is 0. * Throws if the start time is before `block.timestamp`. * Throws if the stop time is before the start time. * Throws if the duration calculation has a math error. * Throws if the deposit is smaller than the duration. * Throws if the deposit is not a multiple of the duration. * Throws if the rate calculation has a math error. * Throws if the next stream id calculation has a math error. * Throws if the contract is not allowed to transfer enough tokens. * Throws if there is a token transfer failure. * @param recipient The address towards which the money is streamed. * @param deposit The amount of money to be streamed. * @param tokenAddress The ERC20 token to use as streaming currency. * @param startTime The unix timestamp for when the stream starts. * @param stopTime The unix timestamp for when the stream stops. * @return The uint256 id of the newly created stream. */ function createStream(address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime) public returns (uint256) { } /** * @notice Withdraws from the contract to the recipient's account. * @dev Throws if the id does not point to a valid stream. * Throws if the caller is not the sender or the recipient of the stream. * Throws if the amount exceeds the available balance. * Throws if there is a token transfer failure. * @param streamId The id of the stream to withdraw tokens from. * @param amount The amount of tokens to withdraw. */ function withdrawFromStream(uint256 streamId, uint256 amount) external nonReentrant streamExists(streamId) onlySenderOrRecipient(streamId) returns (bool) { } /** * @notice Cancels the stream and transfers the tokens back on a pro rata basis. * @dev Throws if the id does not point to a valid stream. * Throws if the caller is not the sender or the recipient of the stream. * Throws if there is a token transfer failure. * @param streamId The id of the stream to cancel. * @return bool true=success, otherwise false. */ function cancelStream(uint256 streamId) external nonReentrant streamExists(streamId) onlySenderOrRecipient(streamId) returns (bool) { } }
streams[streamId].isEntity,"stream does not exist"
306,162
streams[streamId].isEntity
"deposit not multiple of time delta"
pragma solidity =0.5.17; import "./IERC20.sol"; import "./SafeERC20.sol"; import "./ReentrancyGuard.sol"; import "./CarefulMath.sol"; import "./ISablier.sol"; import "./Types.sol"; /** * @title Sablier * @author Sablier * @notice Money streaming. */ contract Sablier is ISablier, ReentrancyGuard, CarefulMath { using SafeERC20 for IERC20; /*** Storage Properties ***/ /** * @notice Counter for new stream ids. */ uint256 public nextStreamId; /** * @notice The stream objects identifiable by their unsigned integer ids. */ mapping(uint256 => Types.Stream) private streams; /*** Modifiers ***/ /** * @dev Throws if the caller is not the sender of the recipient of the stream. */ modifier onlySenderOrRecipient(uint256 streamId) { } /** * @dev Throws if the provided id does not point to a valid stream. */ modifier streamExists(uint256 streamId) { } /*** Contract Logic Starts Here */ constructor() public { } /*** View Functions ***/ /** * @notice Returns the stream with all its properties. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream to query. * @return The stream object. */ function getStream(uint256 streamId) external view streamExists(streamId) returns ( address sender, address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime, uint256 remainingBalance, uint256 ratePerSecond ) { } /** * @notice Returns either the delta in seconds between `block.timestamp` and `startTime` or * between `stopTime` and `startTime, whichever is smaller. If `block.timestamp` is before * `startTime`, it returns 0. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream for which to query the delta. * @return The time delta in seconds. */ function deltaOf(uint256 streamId) public view streamExists(streamId) returns (uint256 delta) { } struct BalanceOfLocalVars { MathError mathErr; uint256 recipientBalance; uint256 withdrawalAmount; uint256 senderBalance; } /** * @notice Returns the available funds for the given stream id and address. * @dev Throws if the id does not point to a valid stream. * @param streamId The id of the stream for which to query the balance. * @param who The address for which to query the balance. * @return The total funds allocated to `who` as uint256. */ function balanceOf(uint256 streamId, address who) public view streamExists(streamId) returns (uint256 balance) { } /*** Public Effects & Interactions Functions ***/ struct CreateStreamLocalVars { MathError mathErr; uint256 duration; uint256 ratePerSecond; } /** * @notice Creates a new stream funded by `msg.sender` and paid towards `recipient`. * @dev Throws if the recipient is the zero address, the contract itself or the caller. * Throws if the deposit is 0. * Throws if the start time is before `block.timestamp`. * Throws if the stop time is before the start time. * Throws if the duration calculation has a math error. * Throws if the deposit is smaller than the duration. * Throws if the deposit is not a multiple of the duration. * Throws if the rate calculation has a math error. * Throws if the next stream id calculation has a math error. * Throws if the contract is not allowed to transfer enough tokens. * Throws if there is a token transfer failure. * @param recipient The address towards which the money is streamed. * @param deposit The amount of money to be streamed. * @param tokenAddress The ERC20 token to use as streaming currency. * @param startTime The unix timestamp for when the stream starts. * @param stopTime The unix timestamp for when the stream stops. * @return The uint256 id of the newly created stream. */ function createStream(address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime) public returns (uint256) { require(recipient != address(0x00), "stream to the zero address"); require(recipient != address(this), "stream to the contract itself"); require(recipient != msg.sender, "stream to the caller"); require(deposit > 0, "deposit is zero"); require(startTime >= block.timestamp, "start time before block.timestamp"); require(stopTime > startTime, "stop time before the start time"); CreateStreamLocalVars memory vars; (vars.mathErr, vars.duration) = subUInt(stopTime, startTime); /* `subUInt` can only return MathError.INTEGER_UNDERFLOW but we know `stopTime` is higher than `startTime`. */ assert(vars.mathErr == MathError.NO_ERROR); /* Without this, the rate per second would be zero. */ require(deposit >= vars.duration, "deposit smaller than time delta"); /* This condition avoids dealing with remainders */ require(<FILL_ME>) (vars.mathErr, vars.ratePerSecond) = divUInt(deposit, vars.duration); /* `divUInt` can only return MathError.DIVISION_BY_ZERO but we know `duration` is not zero. */ assert(vars.mathErr == MathError.NO_ERROR); /* Create and store the stream object. */ uint256 streamId = nextStreamId; streams[streamId] = Types.Stream({ remainingBalance: deposit, deposit: deposit, isEntity: true, ratePerSecond: vars.ratePerSecond, recipient: recipient, sender: msg.sender, startTime: startTime, stopTime: stopTime, tokenAddress: tokenAddress }); /* Increment the next stream id. */ (vars.mathErr, nextStreamId) = addUInt(nextStreamId, uint256(1)); require(vars.mathErr == MathError.NO_ERROR, "next stream id calculation error"); IERC20(tokenAddress).safeTransferFrom(msg.sender, address(this), deposit); emit CreateStream(streamId, msg.sender, recipient, deposit, tokenAddress, startTime, stopTime); return streamId; } /** * @notice Withdraws from the contract to the recipient's account. * @dev Throws if the id does not point to a valid stream. * Throws if the caller is not the sender or the recipient of the stream. * Throws if the amount exceeds the available balance. * Throws if there is a token transfer failure. * @param streamId The id of the stream to withdraw tokens from. * @param amount The amount of tokens to withdraw. */ function withdrawFromStream(uint256 streamId, uint256 amount) external nonReentrant streamExists(streamId) onlySenderOrRecipient(streamId) returns (bool) { } /** * @notice Cancels the stream and transfers the tokens back on a pro rata basis. * @dev Throws if the id does not point to a valid stream. * Throws if the caller is not the sender or the recipient of the stream. * Throws if there is a token transfer failure. * @param streamId The id of the stream to cancel. * @return bool true=success, otherwise false. */ function cancelStream(uint256 streamId) external nonReentrant streamExists(streamId) onlySenderOrRecipient(streamId) returns (bool) { } }
deposit%vars.duration==0,"deposit not multiple of time delta"
306,162
deposit%vars.duration==0
'All tokens have been minted'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // -+ == // -%%- :%#= // .%--%: .%--%: // %=---%: .%=---% // **-==--%: :%=-==-+* // :%-====--%= -%--====-%- // #=-=====-:** +*:-=======% // :%-++=====:.=#. #+.:-====++-%- // *+-*++==--==--%- :%=-==--==++*=+# // %-+**+=======-:+* **:-=======+**+-@ // @-+***++======:.-#- :#=.:=======++**+-%: // .%-*****+====--==--**. .*#--==--====++****-#: // .%-*****++==-======-=#+==---:*%***+++=--=+++***%*:---==+#=-======-==++*****-%: // @=+*****++==========--=====+++=-============-=+++=====--==========++*#****=%. // #@++***###*++========++++++++++++++++++++++++++++++++++++=========+*###***++@# // @**=****###*++=======++++++++++++++========++++++++++++++=======++*###****+**@. // @=+++***###%#+++======+++++++====================+++++++=======++#%###****++=@. // %++*****#%%%%%+======++==++========================++==++======+#%%%%#*****++@ // **=***###%%%%*======+===+=--========-=**==========--=+===+======+%%%%###***=+# // -%=+#####%%%+=================-:----=*=%#+----:-=================+%%%#####+=#= // %+=*###%%#+=================------+*+*%%%+-----==================+*%%####++@ // -%=+##%#+=================--------##%#@@@#=------==================+#%%#+=%= // *#=+#+=================#%#*=------+++%#*------=*#%#=================+#*=#* // :@+-=============++++++#@@@@#=-----=*#+-----=#@@@@%++++++=============-+@: // .**-=======++++++++++++++++*#%@@+------------=@@%#*++++++++++++++++=======-*#. // =#--====+++++++++++**####***++=------------------=++***####**+++++++++++=====-#+ // #*-============+++%%*=+#**+**#*+=----------------=+*#*****#*=+%@*++============-+# // #+---------==++++++%%.**+-::-=+*#+=-----::::-----=+#*+=-::-+**:#@++++++==---------=% // +#=*##+--==++++++++++%##+==---==+##==-------------+##+==----=+##@*+++++++++==--=*#*+** // *==%+:-==++++++++++++*%#+==----=*#%*=-----::-----=+%#*+----==+#%*++++++++++++==-:+%+=*. // =#--===+=======+++++++%#*+++=+*#-##=------------=#%-#*+=+++*#%*++++++=======+===--#+ // +#--=========+++++++++++*#%%%%*+-:#%+====---=====+%#::=*#%%%#*+++++++++++==========-** // -#---==:-==========+*+====++**######*+============+*######**++====+*++=========-:-=---#= // @**%%=--=====---=**=::::..:::-=+****+==============+*****=-::-..:-::-**=---======-=%%**@. // -+:=#--====-:::-+*-.... .-+- .-=%*+====------====+*%+=: -+-. ....-*+=::::-===--#+.=- // :%--==-:::=+==*-..:..:++. :-@*+==-::::::::-==+*@=-. .++:..:..:*==+=:::-==-:#= // %=-==---=*#*+**--::-=++- :=@*+=-:=#%##%%=:-=+*@+- :++=-::--+***#*=--:-=--% // .%:-=*+=====++****==+*##-:. .+#@*+-:-*%%%%#-::+*@#+- ..:##*+==+***++=====+*=-:#- // -#**- .:=+*#@%+----:::=+*@%=::::::::::=#@*++-::----+#@#**=:. -**#= // -#. :-=+*=---=-=++#@*+++==+++*@#++=-=---=*+=-: .#= // =**=##+====+***++***+====+#%=+*= // -=* :=++=--------=++=: ++- // :===++===-. import "./ERC721Enumerable.sol"; import "./Ownable.sol"; import "./Strings.sol"; import "./IInari.sol"; import "./IInariMetadata.sol"; contract Inari is ERC721Enumerable, Ownable, IInari, IInariMetadata { using Strings for uint256; uint256 public constant GIFT_COUNT = 100; uint256 public constant PUBLIC_COUNT = 9900; uint256 public constant MAX_COUNT = GIFT_COUNT + PUBLIC_COUNT; uint256 public purchaseLimit = 10; uint256 public price; uint256 public allowListPrice; bool public isActive = false; bool public isAllowListActive = false; string public proof; uint256 public totalGiftSupply; uint256 public totalPublicSupply; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; mapping(address => uint256) private _allowListMaxMint; string private _contractURI = ''; string private _tokenBaseURI = ''; string private _tokenRevealedBaseURI = ''; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} function setPrice(uint256 _price) public onlyOwner { } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { } function setPurchaseLimit(uint256 _purchaseLimit) public onlyOwner { } function setAllowListMaxMint(address[] calldata addresses, uint256[] calldata maxMintAmounts) public override onlyOwner { } function addToAllowList(address[] calldata addresses) external override onlyOwner { } function onAllowList(address addr) external view override returns (bool) { } function removeFromAllowList(address[] calldata addresses) external override onlyOwner { } /** * @dev We want to be able to distinguish tokens bought during isAllowListActive * and tokens bought outside of isAllowListActive */ function allowListClaimedBy(address owner) external view override returns (uint256){ } function allowListMaxMint(address owner) external view returns (uint256){ } function purchase(uint256 numberOfTokens) external override payable { require(isActive, 'Contract is not active'); require(!isAllowListActive, 'Only allowing from Allow List'); require(<FILL_ME>) require(numberOfTokens <= purchaseLimit, 'Would exceed PURCHASE_LIMIT'); /** * @dev The last person to purchase might pay too much. * This way however they can't get sniped. * If this happens, we'll refund the Eth for the unavailable tokens. */ require(totalPublicSupply < PUBLIC_COUNT, 'Purchase would exceed PUBLIC_COUNT'); require(price * numberOfTokens <= msg.value, 'ETH amount is not sufficient'); for (uint256 i = 0; i < numberOfTokens; i++) { /** * @dev Since they can get here while exceeding the MAX_COUNT, * we have to make sure to not mint any additional tokens. */ if (totalPublicSupply < PUBLIC_COUNT) { /** * @dev Public token numbering starts after GIFT_COUNT. * And we don't want our tokens to start at 0 but at 1. */ uint256 tokenId = GIFT_COUNT + totalPublicSupply + 1; totalPublicSupply += 1; _safeMint(msg.sender, tokenId); } } } function purchaseAllowList(uint256 numberOfTokens) external override payable { } function gift(address[] calldata to) external override onlyOwner { } function setIsActive(bool _isActive) external override onlyOwner { } function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner { } function setProof(string calldata proofString) external override onlyOwner { } function withdraw() external override onlyOwner { } function setContractURI(string calldata URI) external override onlyOwner { } function setBaseURI(string calldata URI) external override onlyOwner { } function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner { } function contractURI() public view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()<MAX_COUNT,'All tokens have been minted'
306,166
totalSupply()<MAX_COUNT
'Purchase would exceed PUBLIC_COUNT'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // -+ == // -%%- :%#= // .%--%: .%--%: // %=---%: .%=---% // **-==--%: :%=-==-+* // :%-====--%= -%--====-%- // #=-=====-:** +*:-=======% // :%-++=====:.=#. #+.:-====++-%- // *+-*++==--==--%- :%=-==--==++*=+# // %-+**+=======-:+* **:-=======+**+-@ // @-+***++======:.-#- :#=.:=======++**+-%: // .%-*****+====--==--**. .*#--==--====++****-#: // .%-*****++==-======-=#+==---:*%***+++=--=+++***%*:---==+#=-======-==++*****-%: // @=+*****++==========--=====+++=-============-=+++=====--==========++*#****=%. // #@++***###*++========++++++++++++++++++++++++++++++++++++=========+*###***++@# // @**=****###*++=======++++++++++++++========++++++++++++++=======++*###****+**@. // @=+++***###%#+++======+++++++====================+++++++=======++#%###****++=@. // %++*****#%%%%%+======++==++========================++==++======+#%%%%#*****++@ // **=***###%%%%*======+===+=--========-=**==========--=+===+======+%%%%###***=+# // -%=+#####%%%+=================-:----=*=%#+----:-=================+%%%#####+=#= // %+=*###%%#+=================------+*+*%%%+-----==================+*%%####++@ // -%=+##%#+=================--------##%#@@@#=------==================+#%%#+=%= // *#=+#+=================#%#*=------+++%#*------=*#%#=================+#*=#* // :@+-=============++++++#@@@@#=-----=*#+-----=#@@@@%++++++=============-+@: // .**-=======++++++++++++++++*#%@@+------------=@@%#*++++++++++++++++=======-*#. // =#--====+++++++++++**####***++=------------------=++***####**+++++++++++=====-#+ // #*-============+++%%*=+#**+**#*+=----------------=+*#*****#*=+%@*++============-+# // #+---------==++++++%%.**+-::-=+*#+=-----::::-----=+#*+=-::-+**:#@++++++==---------=% // +#=*##+--==++++++++++%##+==---==+##==-------------+##+==----=+##@*+++++++++==--=*#*+** // *==%+:-==++++++++++++*%#+==----=*#%*=-----::-----=+%#*+----==+#%*++++++++++++==-:+%+=*. // =#--===+=======+++++++%#*+++=+*#-##=------------=#%-#*+=+++*#%*++++++=======+===--#+ // +#--=========+++++++++++*#%%%%*+-:#%+====---=====+%#::=*#%%%#*+++++++++++==========-** // -#---==:-==========+*+====++**######*+============+*######**++====+*++=========-:-=---#= // @**%%=--=====---=**=::::..:::-=+****+==============+*****=-::-..:-::-**=---======-=%%**@. // -+:=#--====-:::-+*-.... .-+- .-=%*+====------====+*%+=: -+-. ....-*+=::::-===--#+.=- // :%--==-:::=+==*-..:..:++. :-@*+==-::::::::-==+*@=-. .++:..:..:*==+=:::-==-:#= // %=-==---=*#*+**--::-=++- :=@*+=-:=#%##%%=:-=+*@+- :++=-::--+***#*=--:-=--% // .%:-=*+=====++****==+*##-:. .+#@*+-:-*%%%%#-::+*@#+- ..:##*+==+***++=====+*=-:#- // -#**- .:=+*#@%+----:::=+*@%=::::::::::=#@*++-::----+#@#**=:. -**#= // -#. :-=+*=---=-=++#@*+++==+++*@#++=-=---=*+=-: .#= // =**=##+====+***++***+====+#%=+*= // -=* :=++=--------=++=: ++- // :===++===-. import "./ERC721Enumerable.sol"; import "./Ownable.sol"; import "./Strings.sol"; import "./IInari.sol"; import "./IInariMetadata.sol"; contract Inari is ERC721Enumerable, Ownable, IInari, IInariMetadata { using Strings for uint256; uint256 public constant GIFT_COUNT = 100; uint256 public constant PUBLIC_COUNT = 9900; uint256 public constant MAX_COUNT = GIFT_COUNT + PUBLIC_COUNT; uint256 public purchaseLimit = 10; uint256 public price; uint256 public allowListPrice; bool public isActive = false; bool public isAllowListActive = false; string public proof; uint256 public totalGiftSupply; uint256 public totalPublicSupply; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; mapping(address => uint256) private _allowListMaxMint; string private _contractURI = ''; string private _tokenBaseURI = ''; string private _tokenRevealedBaseURI = ''; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} function setPrice(uint256 _price) public onlyOwner { } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { } function setPurchaseLimit(uint256 _purchaseLimit) public onlyOwner { } function setAllowListMaxMint(address[] calldata addresses, uint256[] calldata maxMintAmounts) public override onlyOwner { } function addToAllowList(address[] calldata addresses) external override onlyOwner { } function onAllowList(address addr) external view override returns (bool) { } function removeFromAllowList(address[] calldata addresses) external override onlyOwner { } /** * @dev We want to be able to distinguish tokens bought during isAllowListActive * and tokens bought outside of isAllowListActive */ function allowListClaimedBy(address owner) external view override returns (uint256){ } function allowListMaxMint(address owner) external view returns (uint256){ } function purchase(uint256 numberOfTokens) external override payable { } function purchaseAllowList(uint256 numberOfTokens) external override payable { require(isActive, 'Contract is not active'); require(isAllowListActive, 'Allow List is not active'); require(_allowList[msg.sender], 'You are not on the Allow List'); require(totalSupply() < MAX_COUNT, 'All tokens have been minted'); require(numberOfTokens <= _allowListMaxMint[msg.sender], 'Cannot purchase this many tokens'); require(<FILL_ME>) require(_allowListClaimed[msg.sender] + numberOfTokens <= _allowListMaxMint[msg.sender], 'Purchase exceeds max allowed'); require(allowListPrice * numberOfTokens <= msg.value, 'ETH amount is not sufficient'); for (uint256 i = 0; i < numberOfTokens; i++) { /** * @dev Public token numbering starts after GIFT_COUNT. * We don't want our tokens to start at 0 but at 1. */ uint256 tokenId = GIFT_COUNT + totalPublicSupply + 1; totalPublicSupply += 1; _allowListClaimed[msg.sender] += 1; _safeMint(msg.sender, tokenId); } } function gift(address[] calldata to) external override onlyOwner { } function setIsActive(bool _isActive) external override onlyOwner { } function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner { } function setProof(string calldata proofString) external override onlyOwner { } function withdraw() external override onlyOwner { } function setContractURI(string calldata URI) external override onlyOwner { } function setBaseURI(string calldata URI) external override onlyOwner { } function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner { } function contractURI() public view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalPublicSupply+numberOfTokens<=PUBLIC_COUNT,'Purchase would exceed PUBLIC_COUNT'
306,166
totalPublicSupply+numberOfTokens<=PUBLIC_COUNT
'Purchase exceeds max allowed'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // -+ == // -%%- :%#= // .%--%: .%--%: // %=---%: .%=---% // **-==--%: :%=-==-+* // :%-====--%= -%--====-%- // #=-=====-:** +*:-=======% // :%-++=====:.=#. #+.:-====++-%- // *+-*++==--==--%- :%=-==--==++*=+# // %-+**+=======-:+* **:-=======+**+-@ // @-+***++======:.-#- :#=.:=======++**+-%: // .%-*****+====--==--**. .*#--==--====++****-#: // .%-*****++==-======-=#+==---:*%***+++=--=+++***%*:---==+#=-======-==++*****-%: // @=+*****++==========--=====+++=-============-=+++=====--==========++*#****=%. // #@++***###*++========++++++++++++++++++++++++++++++++++++=========+*###***++@# // @**=****###*++=======++++++++++++++========++++++++++++++=======++*###****+**@. // @=+++***###%#+++======+++++++====================+++++++=======++#%###****++=@. // %++*****#%%%%%+======++==++========================++==++======+#%%%%#*****++@ // **=***###%%%%*======+===+=--========-=**==========--=+===+======+%%%%###***=+# // -%=+#####%%%+=================-:----=*=%#+----:-=================+%%%#####+=#= // %+=*###%%#+=================------+*+*%%%+-----==================+*%%####++@ // -%=+##%#+=================--------##%#@@@#=------==================+#%%#+=%= // *#=+#+=================#%#*=------+++%#*------=*#%#=================+#*=#* // :@+-=============++++++#@@@@#=-----=*#+-----=#@@@@%++++++=============-+@: // .**-=======++++++++++++++++*#%@@+------------=@@%#*++++++++++++++++=======-*#. // =#--====+++++++++++**####***++=------------------=++***####**+++++++++++=====-#+ // #*-============+++%%*=+#**+**#*+=----------------=+*#*****#*=+%@*++============-+# // #+---------==++++++%%.**+-::-=+*#+=-----::::-----=+#*+=-::-+**:#@++++++==---------=% // +#=*##+--==++++++++++%##+==---==+##==-------------+##+==----=+##@*+++++++++==--=*#*+** // *==%+:-==++++++++++++*%#+==----=*#%*=-----::-----=+%#*+----==+#%*++++++++++++==-:+%+=*. // =#--===+=======+++++++%#*+++=+*#-##=------------=#%-#*+=+++*#%*++++++=======+===--#+ // +#--=========+++++++++++*#%%%%*+-:#%+====---=====+%#::=*#%%%#*+++++++++++==========-** // -#---==:-==========+*+====++**######*+============+*######**++====+*++=========-:-=---#= // @**%%=--=====---=**=::::..:::-=+****+==============+*****=-::-..:-::-**=---======-=%%**@. // -+:=#--====-:::-+*-.... .-+- .-=%*+====------====+*%+=: -+-. ....-*+=::::-===--#+.=- // :%--==-:::=+==*-..:..:++. :-@*+==-::::::::-==+*@=-. .++:..:..:*==+=:::-==-:#= // %=-==---=*#*+**--::-=++- :=@*+=-:=#%##%%=:-=+*@+- :++=-::--+***#*=--:-=--% // .%:-=*+=====++****==+*##-:. .+#@*+-:-*%%%%#-::+*@#+- ..:##*+==+***++=====+*=-:#- // -#**- .:=+*#@%+----:::=+*@%=::::::::::=#@*++-::----+#@#**=:. -**#= // -#. :-=+*=---=-=++#@*+++==+++*@#++=-=---=*+=-: .#= // =**=##+====+***++***+====+#%=+*= // -=* :=++=--------=++=: ++- // :===++===-. import "./ERC721Enumerable.sol"; import "./Ownable.sol"; import "./Strings.sol"; import "./IInari.sol"; import "./IInariMetadata.sol"; contract Inari is ERC721Enumerable, Ownable, IInari, IInariMetadata { using Strings for uint256; uint256 public constant GIFT_COUNT = 100; uint256 public constant PUBLIC_COUNT = 9900; uint256 public constant MAX_COUNT = GIFT_COUNT + PUBLIC_COUNT; uint256 public purchaseLimit = 10; uint256 public price; uint256 public allowListPrice; bool public isActive = false; bool public isAllowListActive = false; string public proof; uint256 public totalGiftSupply; uint256 public totalPublicSupply; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; mapping(address => uint256) private _allowListMaxMint; string private _contractURI = ''; string private _tokenBaseURI = ''; string private _tokenRevealedBaseURI = ''; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} function setPrice(uint256 _price) public onlyOwner { } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { } function setPurchaseLimit(uint256 _purchaseLimit) public onlyOwner { } function setAllowListMaxMint(address[] calldata addresses, uint256[] calldata maxMintAmounts) public override onlyOwner { } function addToAllowList(address[] calldata addresses) external override onlyOwner { } function onAllowList(address addr) external view override returns (bool) { } function removeFromAllowList(address[] calldata addresses) external override onlyOwner { } /** * @dev We want to be able to distinguish tokens bought during isAllowListActive * and tokens bought outside of isAllowListActive */ function allowListClaimedBy(address owner) external view override returns (uint256){ } function allowListMaxMint(address owner) external view returns (uint256){ } function purchase(uint256 numberOfTokens) external override payable { } function purchaseAllowList(uint256 numberOfTokens) external override payable { require(isActive, 'Contract is not active'); require(isAllowListActive, 'Allow List is not active'); require(_allowList[msg.sender], 'You are not on the Allow List'); require(totalSupply() < MAX_COUNT, 'All tokens have been minted'); require(numberOfTokens <= _allowListMaxMint[msg.sender], 'Cannot purchase this many tokens'); require(totalPublicSupply + numberOfTokens <= PUBLIC_COUNT, 'Purchase would exceed PUBLIC_COUNT'); require(<FILL_ME>) require(allowListPrice * numberOfTokens <= msg.value, 'ETH amount is not sufficient'); for (uint256 i = 0; i < numberOfTokens; i++) { /** * @dev Public token numbering starts after GIFT_COUNT. * We don't want our tokens to start at 0 but at 1. */ uint256 tokenId = GIFT_COUNT + totalPublicSupply + 1; totalPublicSupply += 1; _allowListClaimed[msg.sender] += 1; _safeMint(msg.sender, tokenId); } } function gift(address[] calldata to) external override onlyOwner { } function setIsActive(bool _isActive) external override onlyOwner { } function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner { } function setProof(string calldata proofString) external override onlyOwner { } function withdraw() external override onlyOwner { } function setContractURI(string calldata URI) external override onlyOwner { } function setBaseURI(string calldata URI) external override onlyOwner { } function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner { } function contractURI() public view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
_allowListClaimed[msg.sender]+numberOfTokens<=_allowListMaxMint[msg.sender],'Purchase exceeds max allowed'
306,166
_allowListClaimed[msg.sender]+numberOfTokens<=_allowListMaxMint[msg.sender]
'ETH amount is not sufficient'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // -+ == // -%%- :%#= // .%--%: .%--%: // %=---%: .%=---% // **-==--%: :%=-==-+* // :%-====--%= -%--====-%- // #=-=====-:** +*:-=======% // :%-++=====:.=#. #+.:-====++-%- // *+-*++==--==--%- :%=-==--==++*=+# // %-+**+=======-:+* **:-=======+**+-@ // @-+***++======:.-#- :#=.:=======++**+-%: // .%-*****+====--==--**. .*#--==--====++****-#: // .%-*****++==-======-=#+==---:*%***+++=--=+++***%*:---==+#=-======-==++*****-%: // @=+*****++==========--=====+++=-============-=+++=====--==========++*#****=%. // #@++***###*++========++++++++++++++++++++++++++++++++++++=========+*###***++@# // @**=****###*++=======++++++++++++++========++++++++++++++=======++*###****+**@. // @=+++***###%#+++======+++++++====================+++++++=======++#%###****++=@. // %++*****#%%%%%+======++==++========================++==++======+#%%%%#*****++@ // **=***###%%%%*======+===+=--========-=**==========--=+===+======+%%%%###***=+# // -%=+#####%%%+=================-:----=*=%#+----:-=================+%%%#####+=#= // %+=*###%%#+=================------+*+*%%%+-----==================+*%%####++@ // -%=+##%#+=================--------##%#@@@#=------==================+#%%#+=%= // *#=+#+=================#%#*=------+++%#*------=*#%#=================+#*=#* // :@+-=============++++++#@@@@#=-----=*#+-----=#@@@@%++++++=============-+@: // .**-=======++++++++++++++++*#%@@+------------=@@%#*++++++++++++++++=======-*#. // =#--====+++++++++++**####***++=------------------=++***####**+++++++++++=====-#+ // #*-============+++%%*=+#**+**#*+=----------------=+*#*****#*=+%@*++============-+# // #+---------==++++++%%.**+-::-=+*#+=-----::::-----=+#*+=-::-+**:#@++++++==---------=% // +#=*##+--==++++++++++%##+==---==+##==-------------+##+==----=+##@*+++++++++==--=*#*+** // *==%+:-==++++++++++++*%#+==----=*#%*=-----::-----=+%#*+----==+#%*++++++++++++==-:+%+=*. // =#--===+=======+++++++%#*+++=+*#-##=------------=#%-#*+=+++*#%*++++++=======+===--#+ // +#--=========+++++++++++*#%%%%*+-:#%+====---=====+%#::=*#%%%#*+++++++++++==========-** // -#---==:-==========+*+====++**######*+============+*######**++====+*++=========-:-=---#= // @**%%=--=====---=**=::::..:::-=+****+==============+*****=-::-..:-::-**=---======-=%%**@. // -+:=#--====-:::-+*-.... .-+- .-=%*+====------====+*%+=: -+-. ....-*+=::::-===--#+.=- // :%--==-:::=+==*-..:..:++. :-@*+==-::::::::-==+*@=-. .++:..:..:*==+=:::-==-:#= // %=-==---=*#*+**--::-=++- :=@*+=-:=#%##%%=:-=+*@+- :++=-::--+***#*=--:-=--% // .%:-=*+=====++****==+*##-:. .+#@*+-:-*%%%%#-::+*@#+- ..:##*+==+***++=====+*=-:#- // -#**- .:=+*#@%+----:::=+*@%=::::::::::=#@*++-::----+#@#**=:. -**#= // -#. :-=+*=---=-=++#@*+++==+++*@#++=-=---=*+=-: .#= // =**=##+====+***++***+====+#%=+*= // -=* :=++=--------=++=: ++- // :===++===-. import "./ERC721Enumerable.sol"; import "./Ownable.sol"; import "./Strings.sol"; import "./IInari.sol"; import "./IInariMetadata.sol"; contract Inari is ERC721Enumerable, Ownable, IInari, IInariMetadata { using Strings for uint256; uint256 public constant GIFT_COUNT = 100; uint256 public constant PUBLIC_COUNT = 9900; uint256 public constant MAX_COUNT = GIFT_COUNT + PUBLIC_COUNT; uint256 public purchaseLimit = 10; uint256 public price; uint256 public allowListPrice; bool public isActive = false; bool public isAllowListActive = false; string public proof; uint256 public totalGiftSupply; uint256 public totalPublicSupply; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; mapping(address => uint256) private _allowListMaxMint; string private _contractURI = ''; string private _tokenBaseURI = ''; string private _tokenRevealedBaseURI = ''; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} function setPrice(uint256 _price) public onlyOwner { } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { } function setPurchaseLimit(uint256 _purchaseLimit) public onlyOwner { } function setAllowListMaxMint(address[] calldata addresses, uint256[] calldata maxMintAmounts) public override onlyOwner { } function addToAllowList(address[] calldata addresses) external override onlyOwner { } function onAllowList(address addr) external view override returns (bool) { } function removeFromAllowList(address[] calldata addresses) external override onlyOwner { } /** * @dev We want to be able to distinguish tokens bought during isAllowListActive * and tokens bought outside of isAllowListActive */ function allowListClaimedBy(address owner) external view override returns (uint256){ } function allowListMaxMint(address owner) external view returns (uint256){ } function purchase(uint256 numberOfTokens) external override payable { } function purchaseAllowList(uint256 numberOfTokens) external override payable { require(isActive, 'Contract is not active'); require(isAllowListActive, 'Allow List is not active'); require(_allowList[msg.sender], 'You are not on the Allow List'); require(totalSupply() < MAX_COUNT, 'All tokens have been minted'); require(numberOfTokens <= _allowListMaxMint[msg.sender], 'Cannot purchase this many tokens'); require(totalPublicSupply + numberOfTokens <= PUBLIC_COUNT, 'Purchase would exceed PUBLIC_COUNT'); require(_allowListClaimed[msg.sender] + numberOfTokens <= _allowListMaxMint[msg.sender], 'Purchase exceeds max allowed'); require(<FILL_ME>) for (uint256 i = 0; i < numberOfTokens; i++) { /** * @dev Public token numbering starts after GIFT_COUNT. * We don't want our tokens to start at 0 but at 1. */ uint256 tokenId = GIFT_COUNT + totalPublicSupply + 1; totalPublicSupply += 1; _allowListClaimed[msg.sender] += 1; _safeMint(msg.sender, tokenId); } } function gift(address[] calldata to) external override onlyOwner { } function setIsActive(bool _isActive) external override onlyOwner { } function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner { } function setProof(string calldata proofString) external override onlyOwner { } function withdraw() external override onlyOwner { } function setContractURI(string calldata URI) external override onlyOwner { } function setBaseURI(string calldata URI) external override onlyOwner { } function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner { } function contractURI() public view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
allowListPrice*numberOfTokens<=msg.value,'ETH amount is not sufficient'
306,166
allowListPrice*numberOfTokens<=msg.value
'Not enough tokens left to gift'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // -+ == // -%%- :%#= // .%--%: .%--%: // %=---%: .%=---% // **-==--%: :%=-==-+* // :%-====--%= -%--====-%- // #=-=====-:** +*:-=======% // :%-++=====:.=#. #+.:-====++-%- // *+-*++==--==--%- :%=-==--==++*=+# // %-+**+=======-:+* **:-=======+**+-@ // @-+***++======:.-#- :#=.:=======++**+-%: // .%-*****+====--==--**. .*#--==--====++****-#: // .%-*****++==-======-=#+==---:*%***+++=--=+++***%*:---==+#=-======-==++*****-%: // @=+*****++==========--=====+++=-============-=+++=====--==========++*#****=%. // #@++***###*++========++++++++++++++++++++++++++++++++++++=========+*###***++@# // @**=****###*++=======++++++++++++++========++++++++++++++=======++*###****+**@. // @=+++***###%#+++======+++++++====================+++++++=======++#%###****++=@. // %++*****#%%%%%+======++==++========================++==++======+#%%%%#*****++@ // **=***###%%%%*======+===+=--========-=**==========--=+===+======+%%%%###***=+# // -%=+#####%%%+=================-:----=*=%#+----:-=================+%%%#####+=#= // %+=*###%%#+=================------+*+*%%%+-----==================+*%%####++@ // -%=+##%#+=================--------##%#@@@#=------==================+#%%#+=%= // *#=+#+=================#%#*=------+++%#*------=*#%#=================+#*=#* // :@+-=============++++++#@@@@#=-----=*#+-----=#@@@@%++++++=============-+@: // .**-=======++++++++++++++++*#%@@+------------=@@%#*++++++++++++++++=======-*#. // =#--====+++++++++++**####***++=------------------=++***####**+++++++++++=====-#+ // #*-============+++%%*=+#**+**#*+=----------------=+*#*****#*=+%@*++============-+# // #+---------==++++++%%.**+-::-=+*#+=-----::::-----=+#*+=-::-+**:#@++++++==---------=% // +#=*##+--==++++++++++%##+==---==+##==-------------+##+==----=+##@*+++++++++==--=*#*+** // *==%+:-==++++++++++++*%#+==----=*#%*=-----::-----=+%#*+----==+#%*++++++++++++==-:+%+=*. // =#--===+=======+++++++%#*+++=+*#-##=------------=#%-#*+=+++*#%*++++++=======+===--#+ // +#--=========+++++++++++*#%%%%*+-:#%+====---=====+%#::=*#%%%#*+++++++++++==========-** // -#---==:-==========+*+====++**######*+============+*######**++====+*++=========-:-=---#= // @**%%=--=====---=**=::::..:::-=+****+==============+*****=-::-..:-::-**=---======-=%%**@. // -+:=#--====-:::-+*-.... .-+- .-=%*+====------====+*%+=: -+-. ....-*+=::::-===--#+.=- // :%--==-:::=+==*-..:..:++. :-@*+==-::::::::-==+*@=-. .++:..:..:*==+=:::-==-:#= // %=-==---=*#*+**--::-=++- :=@*+=-:=#%##%%=:-=+*@+- :++=-::--+***#*=--:-=--% // .%:-=*+=====++****==+*##-:. .+#@*+-:-*%%%%#-::+*@#+- ..:##*+==+***++=====+*=-:#- // -#**- .:=+*#@%+----:::=+*@%=::::::::::=#@*++-::----+#@#**=:. -**#= // -#. :-=+*=---=-=++#@*+++==+++*@#++=-=---=*+=-: .#= // =**=##+====+***++***+====+#%=+*= // -=* :=++=--------=++=: ++- // :===++===-. import "./ERC721Enumerable.sol"; import "./Ownable.sol"; import "./Strings.sol"; import "./IInari.sol"; import "./IInariMetadata.sol"; contract Inari is ERC721Enumerable, Ownable, IInari, IInariMetadata { using Strings for uint256; uint256 public constant GIFT_COUNT = 100; uint256 public constant PUBLIC_COUNT = 9900; uint256 public constant MAX_COUNT = GIFT_COUNT + PUBLIC_COUNT; uint256 public purchaseLimit = 10; uint256 public price; uint256 public allowListPrice; bool public isActive = false; bool public isAllowListActive = false; string public proof; uint256 public totalGiftSupply; uint256 public totalPublicSupply; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; mapping(address => uint256) private _allowListMaxMint; string private _contractURI = ''; string private _tokenBaseURI = ''; string private _tokenRevealedBaseURI = ''; constructor(string memory name, string memory symbol) ERC721(name, symbol) {} function setPrice(uint256 _price) public onlyOwner { } function setAllowListPrice(uint256 _allowListPrice) public onlyOwner { } function setPurchaseLimit(uint256 _purchaseLimit) public onlyOwner { } function setAllowListMaxMint(address[] calldata addresses, uint256[] calldata maxMintAmounts) public override onlyOwner { } function addToAllowList(address[] calldata addresses) external override onlyOwner { } function onAllowList(address addr) external view override returns (bool) { } function removeFromAllowList(address[] calldata addresses) external override onlyOwner { } /** * @dev We want to be able to distinguish tokens bought during isAllowListActive * and tokens bought outside of isAllowListActive */ function allowListClaimedBy(address owner) external view override returns (uint256){ } function allowListMaxMint(address owner) external view returns (uint256){ } function purchase(uint256 numberOfTokens) external override payable { } function purchaseAllowList(uint256 numberOfTokens) external override payable { } function gift(address[] calldata to) external override onlyOwner { require(totalSupply() < MAX_COUNT, 'All tokens have been minted'); require(<FILL_ME>) for(uint256 i = 0; i < to.length; i++) { /// @dev We don't want our tokens to start at 0 but at 1. uint256 tokenId = totalGiftSupply + 1; totalGiftSupply += 1; _safeMint(to[i], tokenId); } } function setIsActive(bool _isActive) external override onlyOwner { } function setIsAllowListActive(bool _isAllowListActive) external override onlyOwner { } function setProof(string calldata proofString) external override onlyOwner { } function withdraw() external override onlyOwner { } function setContractURI(string calldata URI) external override onlyOwner { } function setBaseURI(string calldata URI) external override onlyOwner { } function setRevealedBaseURI(string calldata revealedBaseURI) external override onlyOwner { } function contractURI() public view override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalGiftSupply+to.length<=GIFT_COUNT,'Not enough tokens left to gift'
306,166
totalGiftSupply+to.length<=GIFT_COUNT
null
pragma solidity ^0.4.16; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } /** * @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) constant returns (uint256); function transfer(address to, uint256 value) 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 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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) 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) constant returns (uint256 balance) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } contract DEST is StandardToken { // Constants // ========= string public constant name = "Decentralized Escrow Token"; string public constant symbol = "DEST"; uint public constant decimals = 18; uint public constant ETH_MIN_LIMIT = 500 ether; uint public constant ETH_MAX_LIMIT = 1500 ether; uint public constant START_TIMESTAMP = 1503824400; // 2017-08-27 09:00:00 UTC uint public constant END_TIMESTAMP = 1506816000; // 2017-10-01 00:00:00 UTC address public constant wallet = 0x51559EfC1AcC15bcAfc7E0C2fB440848C136A46B; // State variables // =============== uint public ethCollected; mapping (address=>uint) ethInvested; // Constant functions // ========================= function hasStarted() public constant returns (bool) { } // Payments are not accepted after ICO is finished. function hasFinished() public constant returns (bool) { } // Investors can move their tokens only after ico has successfully finished function tokensAreLiquid() public constant returns (bool) { } function price(uint _v) public constant returns (uint) { } // Public functions // ========================= function() public payable { require(<FILL_ME>) require(ethCollected + msg.value <= ETH_MAX_LIMIT); ethCollected += msg.value; ethInvested[msg.sender] += msg.value; uint _tokenValue = msg.value * price(msg.value); balances[msg.sender] += _tokenValue; totalSupply += _tokenValue; Transfer(0x0, msg.sender, _tokenValue); } // Investors can get refund if ETH_MIN_LIMIT is not reached. function refund() public { } // Owner can withdraw all the money after min_limit is reached. function withdraw() public { } // ERC20 functions // ========================= function transfer(address _to, uint _value) public returns (bool) { } function transferFrom(address _from, address _to, uint _value) public returns (bool) { } function approve(address _spender, uint _value) public returns (bool) { } }
hasStarted()&&!hasFinished()
306,237
hasStarted()&&!hasFinished()
null
pragma solidity ^0.4.16; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } /** * @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) constant returns (uint256); function transfer(address to, uint256 value) 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 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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) 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) constant returns (uint256 balance) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } contract DEST is StandardToken { // Constants // ========= string public constant name = "Decentralized Escrow Token"; string public constant symbol = "DEST"; uint public constant decimals = 18; uint public constant ETH_MIN_LIMIT = 500 ether; uint public constant ETH_MAX_LIMIT = 1500 ether; uint public constant START_TIMESTAMP = 1503824400; // 2017-08-27 09:00:00 UTC uint public constant END_TIMESTAMP = 1506816000; // 2017-10-01 00:00:00 UTC address public constant wallet = 0x51559EfC1AcC15bcAfc7E0C2fB440848C136A46B; // State variables // =============== uint public ethCollected; mapping (address=>uint) ethInvested; // Constant functions // ========================= function hasStarted() public constant returns (bool) { } // Payments are not accepted after ICO is finished. function hasFinished() public constant returns (bool) { } // Investors can move their tokens only after ico has successfully finished function tokensAreLiquid() public constant returns (bool) { } function price(uint _v) public constant returns (uint) { } // Public functions // ========================= function() public payable { require(hasStarted() && !hasFinished()); require(<FILL_ME>) ethCollected += msg.value; ethInvested[msg.sender] += msg.value; uint _tokenValue = msg.value * price(msg.value); balances[msg.sender] += _tokenValue; totalSupply += _tokenValue; Transfer(0x0, msg.sender, _tokenValue); } // Investors can get refund if ETH_MIN_LIMIT is not reached. function refund() public { } // Owner can withdraw all the money after min_limit is reached. function withdraw() public { } // ERC20 functions // ========================= function transfer(address _to, uint _value) public returns (bool) { } function transferFrom(address _from, address _to, uint _value) public returns (bool) { } function approve(address _spender, uint _value) public returns (bool) { } }
ethCollected+msg.value<=ETH_MAX_LIMIT
306,237
ethCollected+msg.value<=ETH_MAX_LIMIT
null
pragma solidity ^0.4.16; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } /** * @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) constant returns (uint256); function transfer(address to, uint256 value) 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 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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) 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) constant returns (uint256 balance) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } contract DEST is StandardToken { // Constants // ========= string public constant name = "Decentralized Escrow Token"; string public constant symbol = "DEST"; uint public constant decimals = 18; uint public constant ETH_MIN_LIMIT = 500 ether; uint public constant ETH_MAX_LIMIT = 1500 ether; uint public constant START_TIMESTAMP = 1503824400; // 2017-08-27 09:00:00 UTC uint public constant END_TIMESTAMP = 1506816000; // 2017-10-01 00:00:00 UTC address public constant wallet = 0x51559EfC1AcC15bcAfc7E0C2fB440848C136A46B; // State variables // =============== uint public ethCollected; mapping (address=>uint) ethInvested; // Constant functions // ========================= function hasStarted() public constant returns (bool) { } // Payments are not accepted after ICO is finished. function hasFinished() public constant returns (bool) { } // Investors can move their tokens only after ico has successfully finished function tokensAreLiquid() public constant returns (bool) { } function price(uint _v) public constant returns (uint) { } // Public functions // ========================= function() public payable { } // Investors can get refund if ETH_MIN_LIMIT is not reached. function refund() public { require(ethCollected < ETH_MIN_LIMIT && now >= END_TIMESTAMP); require(<FILL_ME>) totalSupply -= balances[msg.sender]; balances[msg.sender] = 0; uint _ethRefund = ethInvested[msg.sender]; ethInvested[msg.sender] = 0; msg.sender.transfer(_ethRefund); } // Owner can withdraw all the money after min_limit is reached. function withdraw() public { } // ERC20 functions // ========================= function transfer(address _to, uint _value) public returns (bool) { } function transferFrom(address _from, address _to, uint _value) public returns (bool) { } function approve(address _spender, uint _value) public returns (bool) { } }
balances[msg.sender]>0
306,237
balances[msg.sender]>0
null
pragma solidity ^0.4.16; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } /** * @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) constant returns (uint256); function transfer(address to, uint256 value) 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 { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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) 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) constant returns (uint256 balance) { } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } contract DEST is StandardToken { // Constants // ========= string public constant name = "Decentralized Escrow Token"; string public constant symbol = "DEST"; uint public constant decimals = 18; uint public constant ETH_MIN_LIMIT = 500 ether; uint public constant ETH_MAX_LIMIT = 1500 ether; uint public constant START_TIMESTAMP = 1503824400; // 2017-08-27 09:00:00 UTC uint public constant END_TIMESTAMP = 1506816000; // 2017-10-01 00:00:00 UTC address public constant wallet = 0x51559EfC1AcC15bcAfc7E0C2fB440848C136A46B; // State variables // =============== uint public ethCollected; mapping (address=>uint) ethInvested; // Constant functions // ========================= function hasStarted() public constant returns (bool) { } // Payments are not accepted after ICO is finished. function hasFinished() public constant returns (bool) { } // Investors can move their tokens only after ico has successfully finished function tokensAreLiquid() public constant returns (bool) { } function price(uint _v) public constant returns (uint) { } // Public functions // ========================= function() public payable { } // Investors can get refund if ETH_MIN_LIMIT is not reached. function refund() public { } // Owner can withdraw all the money after min_limit is reached. function withdraw() public { } // ERC20 functions // ========================= function transfer(address _to, uint _value) public returns (bool) { require(<FILL_ME>) return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint _value) public returns (bool) { } function approve(address _spender, uint _value) public returns (bool) { } }
tokensAreLiquid()
306,237
tokensAreLiquid()
"chainId already added"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@rari-capital/solmate/src/utils/SafeTransferLib.sol"; import "../libraries/BoringOwnable.sol"; interface AnyswapRouter { function anySwapOutUnderlying( address token, address to, uint256 amount, uint256 toChainID ) external; } contract mSpellSender is BoringOwnable { using SafeTransferLib for ERC20; /// EVENTS event LogSetOperator(address indexed operator, bool status); event LogAddRecipient(address indexed recipient, uint256 chainId); event LogBridgeToRecipient(address indexed recipient, uint256 amount, uint256 chainId); /// CONSTANTS ERC20 private constant MIM = ERC20(0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3); address private constant ANY_MIM = 0xbbc4A8d076F4B1888fec42581B6fc58d242CF2D5; AnyswapRouter private constant ANYSWAP_ROUTER = AnyswapRouter(0x6b7a87899490EcE95443e979cA9485CBE7E71522); struct MSpellRecipients { address recipient; uint256 chainId; } MSpellRecipients[] public recipients; mapping(uint256 => bool) public isActiveChain; mapping(address => bool) public isOperator; modifier onlyOperator() { } constructor() { } /// @param ratios ratio in bps, 1 is 0.01%, 10_000 is 100% function bridgeMim(uint256[] memory ratios) external onlyOperator { } function addMSpellRecipient(address recipient, uint256 chainId) external onlyOwner { require(<FILL_ME>) isActiveChain[chainId] = true; recipients.push(MSpellRecipients(recipient, chainId)); emit LogAddRecipient(recipient, chainId); } function setOperator(address operator, bool status) external onlyOwner { } }
!isActiveChain[chainId],"chainId already added"
306,246
!isActiveChain[chainId]
"Could not exceed the max supply"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { if (whitelistPaused) { require(!paused, "Sale is not active"); } require(_mintAmount > 0, "Mininum buy 1"); uint256 supply = totalSupply(); require(<FILL_ME>) require(_mintAmount <= MAX_PER_MINT, "Exceeds max quantity in one transaction"); if (!whitelistPaused) { require(whitelistSalesMinterToTokenQty[_to] + _mintAmount <= WHITELIST_MAX_PER_WALLET, "Exceed max whitelist mit per wallet"); require(_mintAmount <= WHITELIST_MAX_PER_MINT, "Exceed max per whitelist mint"); require(supply + _mintAmount <= WHITELIST_LIMIT, "Exceed max whitelist mint"); require(_whitelisted[_to], "Address not in the whitelist"); whitelistSalesMinterToTokenQty[_to] += _mintAmount; } if (msg.sender != owner()) { if (!whitelistPaused) { require(msg.value >= WHITELIST_PRICE * _mintAmount, "Ether value sent is not correct"); } else { require(msg.value >= PRICE * _mintAmount, "Ether value sent is not correct"); } } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, _nextTokenId.current()); _nextTokenId.increment(); } } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
supply+_mintAmount<=MAX_SUPPLY,"Could not exceed the max supply"
306,265
supply+_mintAmount<=MAX_SUPPLY
"Exceed max whitelist mit per wallet"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { if (whitelistPaused) { require(!paused, "Sale is not active"); } require(_mintAmount > 0, "Mininum buy 1"); uint256 supply = totalSupply(); require(supply + _mintAmount <= MAX_SUPPLY, "Could not exceed the max supply"); require(_mintAmount <= MAX_PER_MINT, "Exceeds max quantity in one transaction"); if (!whitelistPaused) { require(<FILL_ME>) require(_mintAmount <= WHITELIST_MAX_PER_MINT, "Exceed max per whitelist mint"); require(supply + _mintAmount <= WHITELIST_LIMIT, "Exceed max whitelist mint"); require(_whitelisted[_to], "Address not in the whitelist"); whitelistSalesMinterToTokenQty[_to] += _mintAmount; } if (msg.sender != owner()) { if (!whitelistPaused) { require(msg.value >= WHITELIST_PRICE * _mintAmount, "Ether value sent is not correct"); } else { require(msg.value >= PRICE * _mintAmount, "Ether value sent is not correct"); } } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, _nextTokenId.current()); _nextTokenId.increment(); } } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
whitelistSalesMinterToTokenQty[_to]+_mintAmount<=WHITELIST_MAX_PER_WALLET,"Exceed max whitelist mit per wallet"
306,265
whitelistSalesMinterToTokenQty[_to]+_mintAmount<=WHITELIST_MAX_PER_WALLET
"Exceed max whitelist mint"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { if (whitelistPaused) { require(!paused, "Sale is not active"); } require(_mintAmount > 0, "Mininum buy 1"); uint256 supply = totalSupply(); require(supply + _mintAmount <= MAX_SUPPLY, "Could not exceed the max supply"); require(_mintAmount <= MAX_PER_MINT, "Exceeds max quantity in one transaction"); if (!whitelistPaused) { require(whitelistSalesMinterToTokenQty[_to] + _mintAmount <= WHITELIST_MAX_PER_WALLET, "Exceed max whitelist mit per wallet"); require(_mintAmount <= WHITELIST_MAX_PER_MINT, "Exceed max per whitelist mint"); require(<FILL_ME>) require(_whitelisted[_to], "Address not in the whitelist"); whitelistSalesMinterToTokenQty[_to] += _mintAmount; } if (msg.sender != owner()) { if (!whitelistPaused) { require(msg.value >= WHITELIST_PRICE * _mintAmount, "Ether value sent is not correct"); } else { require(msg.value >= PRICE * _mintAmount, "Ether value sent is not correct"); } } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, _nextTokenId.current()); _nextTokenId.increment(); } } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
supply+_mintAmount<=WHITELIST_LIMIT,"Exceed max whitelist mint"
306,265
supply+_mintAmount<=WHITELIST_LIMIT
"Address not in the whitelist"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { if (whitelistPaused) { require(!paused, "Sale is not active"); } require(_mintAmount > 0, "Mininum buy 1"); uint256 supply = totalSupply(); require(supply + _mintAmount <= MAX_SUPPLY, "Could not exceed the max supply"); require(_mintAmount <= MAX_PER_MINT, "Exceeds max quantity in one transaction"); if (!whitelistPaused) { require(whitelistSalesMinterToTokenQty[_to] + _mintAmount <= WHITELIST_MAX_PER_WALLET, "Exceed max whitelist mit per wallet"); require(_mintAmount <= WHITELIST_MAX_PER_MINT, "Exceed max per whitelist mint"); require(supply + _mintAmount <= WHITELIST_LIMIT, "Exceed max whitelist mint"); require(<FILL_ME>) whitelistSalesMinterToTokenQty[_to] += _mintAmount; } if (msg.sender != owner()) { if (!whitelistPaused) { require(msg.value >= WHITELIST_PRICE * _mintAmount, "Ether value sent is not correct"); } else { require(msg.value >= PRICE * _mintAmount, "Ether value sent is not correct"); } } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, _nextTokenId.current()); _nextTokenId.increment(); } } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
_whitelisted[_to],"Address not in the whitelist"
306,265
_whitelisted[_to]
"Mininum buy 1"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { require(_addresses.length == _mintAmounts.length, "Size not same"); uint256 supply = totalSupply(); for (uint256 i = 0; i < _addresses.length; i++) { require(<FILL_ME>) require(supply + _mintAmounts[i] <= MAX_SUPPLY, "Could not exceed the max supply"); for (uint256 j = 0; j < _mintAmounts[i]; j++) { _safeMint(_addresses[i], _nextTokenId.current()); _nextTokenId.increment(); } } } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
_mintAmounts[i]>0,"Mininum buy 1"
306,265
_mintAmounts[i]>0
"Could not exceed the max supply"
pragma solidity ^0.8.0; contract ApeBlocksCuratedCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _nextTokenId; address proxyRegistryAddress; string public baseURI; string public baseExtension = ".json"; bool public paused = true; bool public whitelistPaused = true; uint256 public MAX_SUPPLY = 200; uint256 public MAX_PER_MINT = 10; uint256 public WHITELIST_MAX_PER_MINT = 4; uint256 public WHITELIST_MAX_PER_WALLET = 4; uint256 public PRICE = 0.025 ether; uint256 public WHITELIST_PRICE = 0.025 ether; uint256 public WHITELIST_LIMIT = 200; mapping(address => bool) private _whitelisted; mapping(address => uint256) public whitelistSalesMinterToTokenQty; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) external onlyOwner { } function mint(address _to, uint256 _mintAmount) public payable nonReentrant { } function airdropMint(address[] calldata _addresses, uint[] calldata _mintAmounts) external nonReentrant onlyOwner { require(_addresses.length == _mintAmounts.length, "Size not same"); uint256 supply = totalSupply(); for (uint256 i = 0; i < _addresses.length; i++) { require(_mintAmounts[i] > 0, "Mininum buy 1"); require(<FILL_ME>) for (uint256 j = 0; j < _mintAmounts[i]; j++) { _safeMint(_addresses[i], _nextTokenId.current()); _nextTokenId.increment(); } } } function isWhitelisted(address _addr) external view returns (bool) { } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public { } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public { } function addToWhitelist(address[] calldata _addresses) external onlyOwner { } function removeFromWhitelist(address[] calldata _addresses) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setCost(uint256 _newCost) external onlyOwner { } function setWhitelistCost(uint256 _newCost) external onlyOwner { } function setMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerMintAmount(uint256 _newAmount) external onlyOwner { } function setWhitelistMaxPerWalletAmount(uint256 _newAmount) external onlyOwner { } function setMaxSupply(uint256 _newAmount) external onlyOwner { } function setWhitelistLimit(uint256 _newAmount) external onlyOwner { } function pause(bool _state) external onlyOwner { } function whitelistPause(bool _state) external onlyOwner { } function totalSupply() public view override returns (uint256) { } function withdraw() external onlyOwner { } // https://github.com/ProjectOpenSea/opensea-creatures/blob/74e24b99471380d148057d5c93115dfaf9a1fa9e/migrations/2_deploy_contracts.js#L29 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // mainnet: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
supply+_mintAmounts[i]<=MAX_SUPPLY,"Could not exceed the max supply"
306,265
supply+_mintAmounts[i]<=MAX_SUPPLY
null
pragma solidity ^0.4.19; contract DAO { using SafeMath for uint256; ERC20 public typeToken; address public owner; address public burnAddress = 0x0000000000000000000000000000000000000000; uint256 public tokenDecimals; uint256 public unburnedTypeTokens; uint256 public weiPerWholeToken = 0.1 ether; event LogLiquidation(address indexed _to, uint256 _typeTokenAmount, uint256 _ethAmount, uint256 _newTotalSupply); modifier onlyOwner () { } function DAO (address _typeToken, uint256 _tokenDecimals) public { } function exchangeTokens (uint256 _amount) public { require(<FILL_ME>) uint256 percentageOfPotToSend = _percent(_amount, unburnedTypeTokens, 8); uint256 ethToSend = (address(this).balance.div(100000000)).mul(percentageOfPotToSend); msg.sender.transfer(ethToSend); _byrne(_amount); emit LogLiquidation(msg.sender, _amount, ethToSend, unburnedTypeTokens); } function _byrne(uint256 _amount) internal { } function updateWeiPerWholeToken (uint256 _newRate) public onlyOwner { } function changeOwner (address _newOwner) public onlyOwner { } function _percent(uint256 numerator, uint256 denominator, uint256 precision) internal returns(uint256 quotient) { } function () public payable {} } contract ERC20 { function totalSupply() public constant returns (uint256 supply); function balanceOf(address _owner) public constant 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 constant returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library 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) { } }
typeToken.transferFrom(msg.sender,address(this),_amount)
306,266
typeToken.transferFrom(msg.sender,address(this),_amount)
null
pragma solidity ^0.4.19; contract DAO { using SafeMath for uint256; ERC20 public typeToken; address public owner; address public burnAddress = 0x0000000000000000000000000000000000000000; uint256 public tokenDecimals; uint256 public unburnedTypeTokens; uint256 public weiPerWholeToken = 0.1 ether; event LogLiquidation(address indexed _to, uint256 _typeTokenAmount, uint256 _ethAmount, uint256 _newTotalSupply); modifier onlyOwner () { } function DAO (address _typeToken, uint256 _tokenDecimals) public { } function exchangeTokens (uint256 _amount) public { } function _byrne(uint256 _amount) internal { require(<FILL_ME>) unburnedTypeTokens = unburnedTypeTokens.sub(_amount); } function updateWeiPerWholeToken (uint256 _newRate) public onlyOwner { } function changeOwner (address _newOwner) public onlyOwner { } function _percent(uint256 numerator, uint256 denominator, uint256 precision) internal returns(uint256 quotient) { } function () public payable {} } contract ERC20 { function totalSupply() public constant returns (uint256 supply); function balanceOf(address _owner) public constant 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 constant returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library 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) { } }
typeToken.transfer(burnAddress,_amount)
306,266
typeToken.transfer(burnAddress,_amount)
"Purchase would exceed max supply of bloots"
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 () internal { } /** * @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; pragma abicoder v2; contract bLOOT is ERC721, Ownable { using SafeMath for uint256; string public BLOOT_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BLOOTS ARE ALL SOLD OUT string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE uint256 public constant bLOOTPrice = 25000000000000000; // 0.025 ETH uint public constant maxBlootPurchase = 20; uint256 public constant MAX_BLOOT = 6000; bool public saleIsActive = false; mapping(uint => string) public blootNames; uint public bLOOTReserve = 0; event bLOOTNameChange(address _by, uint _tokenId, string _name); event licenseisLocked(string _licenseText); constructor() ERC721("bLOOTS.", "bLOOTS") { } function withdraw() public onlyOwner { } function reserveBloots(address _to, uint256 _reserveAmount) public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } // Returns the license for tokens function tokenLicense(uint _id) public view returns(string memory) { } // Locks the license to prevent further changes function lockLicense() public onlyOwner { } // Change the license function changeLicense(string memory _license) public onlyOwner { } function mintBloot(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Bloot"); require(numberOfTokens > 0 && numberOfTokens <= maxBlootPurchase, "Can only mint 20 tokens at a time"); require(<FILL_ME>) require(msg.value >= bLOOTPrice.mul(numberOfTokens), "Ether value sent is not correct"); for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < MAX_BLOOT) { _safeMint(msg.sender, mintIndex); } } } function changeBlootName(uint _tokenId, string memory _name) public { } function viewBlootName(uint _tokenId) public view returns( string memory ){ } function blootNamesOfOwner(address _owner) external view returns(string[] memory ) { } }
totalSupply().add(numberOfTokens)<=MAX_BLOOT,"Purchase would exceed max supply of bloots"
306,270
totalSupply().add(numberOfTokens)<=MAX_BLOOT
"New name is same as the current one"
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 () internal { } /** * @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; pragma abicoder v2; contract bLOOT is ERC721, Ownable { using SafeMath for uint256; string public BLOOT_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BLOOTS ARE ALL SOLD OUT string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE uint256 public constant bLOOTPrice = 25000000000000000; // 0.025 ETH uint public constant maxBlootPurchase = 20; uint256 public constant MAX_BLOOT = 6000; bool public saleIsActive = false; mapping(uint => string) public blootNames; uint public bLOOTReserve = 0; event bLOOTNameChange(address _by, uint _tokenId, string _name); event licenseisLocked(string _licenseText); constructor() ERC721("bLOOTS.", "bLOOTS") { } function withdraw() public onlyOwner { } function reserveBloots(address _to, uint256 _reserveAmount) public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } // Returns the license for tokens function tokenLicense(uint _id) public view returns(string memory) { } // Locks the license to prevent further changes function lockLicense() public onlyOwner { } // Change the license function changeLicense(string memory _license) public onlyOwner { } function mintBloot(uint numberOfTokens) public payable { } function changeBlootName(uint _tokenId, string memory _name) public { require(ownerOf(_tokenId) == msg.sender, "Hey, your wallet doesn't own this BLOOT!"); require(<FILL_ME>) blootNames[_tokenId] = _name; emit bLOOTNameChange(msg.sender, _tokenId, _name); } function viewBlootName(uint _tokenId) public view returns( string memory ){ } function blootNamesOfOwner(address _owner) external view returns(string[] memory ) { } }
sha256(bytes(_name))!=sha256(bytes(blootNames[_tokenId])),"New name is same as the current one"
306,270
sha256(bytes(_name))!=sha256(bytes(blootNames[_tokenId]))
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract Cryptomancy is ERC1155, Ownable, ERC1155Burnable { uint256 constant public maxSupply = 1472; // mapping of address to multiple ids mapping (address => uint16[]) public addressReservations; // mapping of id to address // mapping (uint16 => address) public reservationAddress; // Reservation struct for receiving the tuple of address and ids struct Reservation { address sigilOwner; uint16[] sigilIds; } constructor() ERC1155("https://cryptomancy.net/mock-api/{id}") { } // receive the initial set of Reservations // these are taken from a snapshot of BSC owners of the original Cryptomancy cards // this ensures that only original owners can mint the same card on this chain function setReservations(Reservation[] memory reservations) public onlyOwner { } function getReservations(address sigilOwner) external view returns(uint16[] memory) { } function mintBatchIds(uint16[] memory ids) public { // check that the address provided has at least one reservation require(<FILL_ME>) require(ids.length > 0); _mintBatchIds(msg.sender, ids); } // allow the owner to mint on behalf of another user - in case they don't have enough gas or something // does not bypass reservation controls function mintBatchOther(address sigilOwner, uint16[] memory ids) public onlyOwner { } function _mintBatchIds(address sigilOwner, uint16[] memory ids) private { } function setURI(string memory newuri) public onlyOwner { } // emergency minting function - allows owner to mint a sigil if something goes wrong with self-minting process // bypasses reservation controls, but does not allow minting beyond max supply function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyOwner { } }
addressReservations[msg.sender].length>0
306,319
addressReservations[msg.sender].length>0
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract Cryptomancy is ERC1155, Ownable, ERC1155Burnable { uint256 constant public maxSupply = 1472; // mapping of address to multiple ids mapping (address => uint16[]) public addressReservations; // mapping of id to address // mapping (uint16 => address) public reservationAddress; // Reservation struct for receiving the tuple of address and ids struct Reservation { address sigilOwner; uint16[] sigilIds; } constructor() ERC1155("https://cryptomancy.net/mock-api/{id}") { } // receive the initial set of Reservations // these are taken from a snapshot of BSC owners of the original Cryptomancy cards // this ensures that only original owners can mint the same card on this chain function setReservations(Reservation[] memory reservations) public onlyOwner { } function getReservations(address sigilOwner) external view returns(uint16[] memory) { } function mintBatchIds(uint16[] memory ids) public { } // allow the owner to mint on behalf of another user - in case they don't have enough gas or something // does not bypass reservation controls function mintBatchOther(address sigilOwner, uint16[] memory ids) public onlyOwner { // check that the address provided has at least one reservation require(<FILL_ME>) require(ids.length > 0); _mintBatchIds(sigilOwner, ids); } function _mintBatchIds(address sigilOwner, uint16[] memory ids) private { } function setURI(string memory newuri) public onlyOwner { } // emergency minting function - allows owner to mint a sigil if something goes wrong with self-minting process // bypasses reservation controls, but does not allow minting beyond max supply function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyOwner { } }
addressReservations[sigilOwner].length>0
306,319
addressReservations[sigilOwner].length>0
"not a Yvault token"
pragma solidity ^0.5.16; import "./CErc20.sol"; import "./CToken.sol"; import "./PriceOracle.sol"; import "./Exponential.sol"; import "./EIP20Interface.sol"; interface V1PriceOracleInterface { function assetPrices(address asset) external view returns (uint); } interface CurveSwapInterface { function get_virtual_price() external view returns (uint256); } interface CurveTokenV3Interface { function minter() external view returns (address); } interface YVaultV1Interface { function token() external view returns (address); function getPricePerFullShare() external view returns (uint); } interface YVaultV2Interface { function token() external view returns (address); function pricePerShare() external view returns (uint); } interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } // Ref: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Pair.sol 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 IXSushiExchangeRate { function getExchangeRate() external view returns (uint); } contract PriceOracleProxy is PriceOracle, Exponential { /// @notice Yvault token version, currently support v1 and v2 enum YvTokenVersion { V1, V2 } /// @notice Curve token version, currently support v1, v2 and v3 enum CurveTokenVersion { V1, V2, V3 } /// @notice Curve pool type, currently support ETH and USD base enum CurvePoolType { ETH, USD } /// @notice ChainLink aggregator base, currently support ETH and USD enum AggregatorBase { ETH, USD } struct YvTokenInfo { /// @notice Check if this token is a Yvault token bool isYvToken; /// @notice The version of Yvault YvTokenVersion version; } struct CrvTokenInfo { /// @notice Check if this token is a curve pool token bool isCrvToken; /// @notice The curve pool type CurvePoolType poolType; /// @notice The curve swap contract address address curveSwap; } struct AggregatorInfo { /// @notice The source address of the aggregator AggregatorV3Interface source; /// @notice The aggregator base AggregatorBase base; } /// @notice Admin address address public admin; /// @notice Guardian address address public guardian; /// @notice Indicator that this is a PriceOracle contract (for inspection) bool public constant isPriceOracle = true; /// @notice The v1 price oracle, which will continue to serve prices for v1 assets V1PriceOracleInterface public v1PriceOracle; /// @notice ChainLink aggregators mapping(address => AggregatorInfo) public aggregators; /// @notice Check if the underlying address is Uniswap or SushiSwap LP mapping(address => bool) public areUnderlyingLPs; /// @notice Yvault token data mapping(address => YvTokenInfo) public yvTokens; /// @notice Curve pool token data mapping(address => CrvTokenInfo) public crvTokens; address public cEthAddress; address public cXSushiAddress; address public constant usdcAddress = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address public constant wethAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant sushiAddress = 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2; address public constant xSushiExRateAddress = 0x851a040fC0Dcbb13a272EBC272F2bC2Ce1e11C4d; /** * @param admin_ The address of admin to set aggregators, LPs, curve tokens, or Yvault tokens * @param v1PriceOracle_ The address of the v1 price oracle, which will continue to operate and hold prices for collateral assets * @param cEthAddress_ The address of cETH, which will return a constant 1e18, since all prices relative to ether * @param cXSushiAddress_ The address of cXSushi */ constructor(address admin_, address v1PriceOracle_, address cEthAddress_, address cXSushiAddress_) public { } /** * @notice Get the underlying price of a listed cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18) */ function getUnderlyingPrice(CToken cToken) public view returns (uint) { } /*** Internal fucntions ***/ /** * @notice Get the price of a specific token. Return 1e18 is it's WETH. * @param token The token to get the price of * @return The price */ function getTokenPrice(address token) internal view returns (uint) { } /** * @notice Get price from ChainLink * @param aggregator The ChainLink aggregator to get the price of * @return The price */ function getPriceFromChainlink(AggregatorV3Interface aggregator) internal view returns (uint) { } /** * @notice Get the fair price of a LP. We use the mechanism from Alpha Finance. * Ref: https://blog.alphafinance.io/fair-lp-token-pricing/ * @param pair The pair of AMM (Uniswap or SushiSwap) * @return The price */ function getLPFairPrice(address pair) internal view returns (uint) { } /** * @notice Get price for Yvault tokens * @param token The Yvault token * @return The price */ function getYvTokenPrice(address token) internal view returns (uint) { YvTokenInfo memory yvTokenInfo = yvTokens[token]; require(<FILL_ME>) uint pricePerShare; address underlying; if (yvTokenInfo.version == YvTokenVersion.V1) { pricePerShare = YVaultV1Interface(token).getPricePerFullShare(); underlying = YVaultV1Interface(token).token(); } else { pricePerShare = YVaultV2Interface(token).pricePerShare(); underlying = YVaultV2Interface(token).token(); } uint underlyingPrice; if (crvTokens[underlying].isCrvToken) { underlyingPrice = getCrvTokenPrice(underlying); } else { underlyingPrice = getTokenPrice(underlying); } return mul_(underlyingPrice, Exp({mantissa: pricePerShare})); } /** * @notice Get price for curve pool tokens * @param token The curve pool token * @return The price */ function getCrvTokenPrice(address token) internal view returns (uint) { } /** * @notice Get USDC price * @dev We treat USDC as USD for convenience * @return The USDC price */ function getUsdcEthPrice() internal view returns (uint) { } /** * @notice Get price from v1 price oracle * @param token The token to get the price of * @return The price */ function getPriceFromV1(address token) internal view returns (uint) { } /*** Admin or guardian functions ***/ event AggregatorUpdated(address tokenAddress, address source, AggregatorBase base); event IsLPUpdated(address tokenAddress, bool isLP); event SetYVaultToken(address token, YvTokenVersion version); event SetCurveToken(address token, CurvePoolType poolType, address swap); event SetGuardian(address guardian); event SetAdmin(address admin); /** * @notice Set ChainLink aggregators for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param sources The list of ChainLink aggregator sources * @param bases The list of ChainLink aggregator bases */ function _setAggregators(address[] calldata tokenAddresses, address[] calldata sources, AggregatorBase[] calldata bases) external { } /** * @notice See assets as LP tokens for multiple cTokens * @param cTokenAddresses The list of cTokens * @param isLP The list of cToken properties (it's LP or not) */ function _setLPs(address[] calldata cTokenAddresses, bool[] calldata isLP) external { } /** * @notice See assets as Yvault tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param version The list of vault version */ function _setYVaultTokens(address[] calldata tokenAddresses, YvTokenVersion[] calldata version) external { } /** * @notice See assets as curve pool tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param poolType The list of curve pool type (ETH or USD base only) * @param swap The list of curve swap address */ function _setCurveTokens(address[] calldata tokenAddresses, CurveTokenVersion[] calldata version, CurvePoolType[] calldata poolType, address[] calldata swap) external { } /** * @notice Set guardian for price oracle proxy * @param _guardian The new guardian */ function _setGuardian(address _guardian) external { } /** * @notice Set admin for price oracle proxy * @param _admin The new admin */ function _setAdmin(address _admin) external { } }
yvTokenInfo.isYvToken,"not a Yvault token"
306,425
yvTokenInfo.isYvToken
"not a curve pool token"
pragma solidity ^0.5.16; import "./CErc20.sol"; import "./CToken.sol"; import "./PriceOracle.sol"; import "./Exponential.sol"; import "./EIP20Interface.sol"; interface V1PriceOracleInterface { function assetPrices(address asset) external view returns (uint); } interface CurveSwapInterface { function get_virtual_price() external view returns (uint256); } interface CurveTokenV3Interface { function minter() external view returns (address); } interface YVaultV1Interface { function token() external view returns (address); function getPricePerFullShare() external view returns (uint); } interface YVaultV2Interface { function token() external view returns (address); function pricePerShare() external view returns (uint); } interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } // Ref: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Pair.sol 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 IXSushiExchangeRate { function getExchangeRate() external view returns (uint); } contract PriceOracleProxy is PriceOracle, Exponential { /// @notice Yvault token version, currently support v1 and v2 enum YvTokenVersion { V1, V2 } /// @notice Curve token version, currently support v1, v2 and v3 enum CurveTokenVersion { V1, V2, V3 } /// @notice Curve pool type, currently support ETH and USD base enum CurvePoolType { ETH, USD } /// @notice ChainLink aggregator base, currently support ETH and USD enum AggregatorBase { ETH, USD } struct YvTokenInfo { /// @notice Check if this token is a Yvault token bool isYvToken; /// @notice The version of Yvault YvTokenVersion version; } struct CrvTokenInfo { /// @notice Check if this token is a curve pool token bool isCrvToken; /// @notice The curve pool type CurvePoolType poolType; /// @notice The curve swap contract address address curveSwap; } struct AggregatorInfo { /// @notice The source address of the aggregator AggregatorV3Interface source; /// @notice The aggregator base AggregatorBase base; } /// @notice Admin address address public admin; /// @notice Guardian address address public guardian; /// @notice Indicator that this is a PriceOracle contract (for inspection) bool public constant isPriceOracle = true; /// @notice The v1 price oracle, which will continue to serve prices for v1 assets V1PriceOracleInterface public v1PriceOracle; /// @notice ChainLink aggregators mapping(address => AggregatorInfo) public aggregators; /// @notice Check if the underlying address is Uniswap or SushiSwap LP mapping(address => bool) public areUnderlyingLPs; /// @notice Yvault token data mapping(address => YvTokenInfo) public yvTokens; /// @notice Curve pool token data mapping(address => CrvTokenInfo) public crvTokens; address public cEthAddress; address public cXSushiAddress; address public constant usdcAddress = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address public constant wethAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant sushiAddress = 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2; address public constant xSushiExRateAddress = 0x851a040fC0Dcbb13a272EBC272F2bC2Ce1e11C4d; /** * @param admin_ The address of admin to set aggregators, LPs, curve tokens, or Yvault tokens * @param v1PriceOracle_ The address of the v1 price oracle, which will continue to operate and hold prices for collateral assets * @param cEthAddress_ The address of cETH, which will return a constant 1e18, since all prices relative to ether * @param cXSushiAddress_ The address of cXSushi */ constructor(address admin_, address v1PriceOracle_, address cEthAddress_, address cXSushiAddress_) public { } /** * @notice Get the underlying price of a listed cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18) */ function getUnderlyingPrice(CToken cToken) public view returns (uint) { } /*** Internal fucntions ***/ /** * @notice Get the price of a specific token. Return 1e18 is it's WETH. * @param token The token to get the price of * @return The price */ function getTokenPrice(address token) internal view returns (uint) { } /** * @notice Get price from ChainLink * @param aggregator The ChainLink aggregator to get the price of * @return The price */ function getPriceFromChainlink(AggregatorV3Interface aggregator) internal view returns (uint) { } /** * @notice Get the fair price of a LP. We use the mechanism from Alpha Finance. * Ref: https://blog.alphafinance.io/fair-lp-token-pricing/ * @param pair The pair of AMM (Uniswap or SushiSwap) * @return The price */ function getLPFairPrice(address pair) internal view returns (uint) { } /** * @notice Get price for Yvault tokens * @param token The Yvault token * @return The price */ function getYvTokenPrice(address token) internal view returns (uint) { } /** * @notice Get price for curve pool tokens * @param token The curve pool token * @return The price */ function getCrvTokenPrice(address token) internal view returns (uint) { CrvTokenInfo memory crvTokenInfo = crvTokens[token]; require(<FILL_ME>) uint virtualPrice = CurveSwapInterface(crvTokenInfo.curveSwap).get_virtual_price(); if (crvTokenInfo.poolType == CurvePoolType.ETH) { return virtualPrice; } // We treat USDC as USD and convert the price to ETH base. return mul_(getUsdcEthPrice(), Exp({mantissa: virtualPrice})); } /** * @notice Get USDC price * @dev We treat USDC as USD for convenience * @return The USDC price */ function getUsdcEthPrice() internal view returns (uint) { } /** * @notice Get price from v1 price oracle * @param token The token to get the price of * @return The price */ function getPriceFromV1(address token) internal view returns (uint) { } /*** Admin or guardian functions ***/ event AggregatorUpdated(address tokenAddress, address source, AggregatorBase base); event IsLPUpdated(address tokenAddress, bool isLP); event SetYVaultToken(address token, YvTokenVersion version); event SetCurveToken(address token, CurvePoolType poolType, address swap); event SetGuardian(address guardian); event SetAdmin(address admin); /** * @notice Set ChainLink aggregators for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param sources The list of ChainLink aggregator sources * @param bases The list of ChainLink aggregator bases */ function _setAggregators(address[] calldata tokenAddresses, address[] calldata sources, AggregatorBase[] calldata bases) external { } /** * @notice See assets as LP tokens for multiple cTokens * @param cTokenAddresses The list of cTokens * @param isLP The list of cToken properties (it's LP or not) */ function _setLPs(address[] calldata cTokenAddresses, bool[] calldata isLP) external { } /** * @notice See assets as Yvault tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param version The list of vault version */ function _setYVaultTokens(address[] calldata tokenAddresses, YvTokenVersion[] calldata version) external { } /** * @notice See assets as curve pool tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param poolType The list of curve pool type (ETH or USD base only) * @param swap The list of curve swap address */ function _setCurveTokens(address[] calldata tokenAddresses, CurveTokenVersion[] calldata version, CurvePoolType[] calldata poolType, address[] calldata swap) external { } /** * @notice Set guardian for price oracle proxy * @param _guardian The new guardian */ function _setGuardian(address _guardian) external { } /** * @notice Set admin for price oracle proxy * @param _admin The new admin */ function _setAdmin(address _admin) external { } }
crvTokenInfo.isCrvToken,"not a curve pool token"
306,425
crvTokenInfo.isCrvToken
"incorrect pool"
pragma solidity ^0.5.16; import "./CErc20.sol"; import "./CToken.sol"; import "./PriceOracle.sol"; import "./Exponential.sol"; import "./EIP20Interface.sol"; interface V1PriceOracleInterface { function assetPrices(address asset) external view returns (uint); } interface CurveSwapInterface { function get_virtual_price() external view returns (uint256); } interface CurveTokenV3Interface { function minter() external view returns (address); } interface YVaultV1Interface { function token() external view returns (address); function getPricePerFullShare() external view returns (uint); } interface YVaultV2Interface { function token() external view returns (address); function pricePerShare() external view returns (uint); } interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } // Ref: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Pair.sol 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 IXSushiExchangeRate { function getExchangeRate() external view returns (uint); } contract PriceOracleProxy is PriceOracle, Exponential { /// @notice Yvault token version, currently support v1 and v2 enum YvTokenVersion { V1, V2 } /// @notice Curve token version, currently support v1, v2 and v3 enum CurveTokenVersion { V1, V2, V3 } /// @notice Curve pool type, currently support ETH and USD base enum CurvePoolType { ETH, USD } /// @notice ChainLink aggregator base, currently support ETH and USD enum AggregatorBase { ETH, USD } struct YvTokenInfo { /// @notice Check if this token is a Yvault token bool isYvToken; /// @notice The version of Yvault YvTokenVersion version; } struct CrvTokenInfo { /// @notice Check if this token is a curve pool token bool isCrvToken; /// @notice The curve pool type CurvePoolType poolType; /// @notice The curve swap contract address address curveSwap; } struct AggregatorInfo { /// @notice The source address of the aggregator AggregatorV3Interface source; /// @notice The aggregator base AggregatorBase base; } /// @notice Admin address address public admin; /// @notice Guardian address address public guardian; /// @notice Indicator that this is a PriceOracle contract (for inspection) bool public constant isPriceOracle = true; /// @notice The v1 price oracle, which will continue to serve prices for v1 assets V1PriceOracleInterface public v1PriceOracle; /// @notice ChainLink aggregators mapping(address => AggregatorInfo) public aggregators; /// @notice Check if the underlying address is Uniswap or SushiSwap LP mapping(address => bool) public areUnderlyingLPs; /// @notice Yvault token data mapping(address => YvTokenInfo) public yvTokens; /// @notice Curve pool token data mapping(address => CrvTokenInfo) public crvTokens; address public cEthAddress; address public cXSushiAddress; address public constant usdcAddress = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address public constant wethAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant sushiAddress = 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2; address public constant xSushiExRateAddress = 0x851a040fC0Dcbb13a272EBC272F2bC2Ce1e11C4d; /** * @param admin_ The address of admin to set aggregators, LPs, curve tokens, or Yvault tokens * @param v1PriceOracle_ The address of the v1 price oracle, which will continue to operate and hold prices for collateral assets * @param cEthAddress_ The address of cETH, which will return a constant 1e18, since all prices relative to ether * @param cXSushiAddress_ The address of cXSushi */ constructor(address admin_, address v1PriceOracle_, address cEthAddress_, address cXSushiAddress_) public { } /** * @notice Get the underlying price of a listed cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18) */ function getUnderlyingPrice(CToken cToken) public view returns (uint) { } /*** Internal fucntions ***/ /** * @notice Get the price of a specific token. Return 1e18 is it's WETH. * @param token The token to get the price of * @return The price */ function getTokenPrice(address token) internal view returns (uint) { } /** * @notice Get price from ChainLink * @param aggregator The ChainLink aggregator to get the price of * @return The price */ function getPriceFromChainlink(AggregatorV3Interface aggregator) internal view returns (uint) { } /** * @notice Get the fair price of a LP. We use the mechanism from Alpha Finance. * Ref: https://blog.alphafinance.io/fair-lp-token-pricing/ * @param pair The pair of AMM (Uniswap or SushiSwap) * @return The price */ function getLPFairPrice(address pair) internal view returns (uint) { } /** * @notice Get price for Yvault tokens * @param token The Yvault token * @return The price */ function getYvTokenPrice(address token) internal view returns (uint) { } /** * @notice Get price for curve pool tokens * @param token The curve pool token * @return The price */ function getCrvTokenPrice(address token) internal view returns (uint) { } /** * @notice Get USDC price * @dev We treat USDC as USD for convenience * @return The USDC price */ function getUsdcEthPrice() internal view returns (uint) { } /** * @notice Get price from v1 price oracle * @param token The token to get the price of * @return The price */ function getPriceFromV1(address token) internal view returns (uint) { } /*** Admin or guardian functions ***/ event AggregatorUpdated(address tokenAddress, address source, AggregatorBase base); event IsLPUpdated(address tokenAddress, bool isLP); event SetYVaultToken(address token, YvTokenVersion version); event SetCurveToken(address token, CurvePoolType poolType, address swap); event SetGuardian(address guardian); event SetAdmin(address admin); /** * @notice Set ChainLink aggregators for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param sources The list of ChainLink aggregator sources * @param bases The list of ChainLink aggregator bases */ function _setAggregators(address[] calldata tokenAddresses, address[] calldata sources, AggregatorBase[] calldata bases) external { } /** * @notice See assets as LP tokens for multiple cTokens * @param cTokenAddresses The list of cTokens * @param isLP The list of cToken properties (it's LP or not) */ function _setLPs(address[] calldata cTokenAddresses, bool[] calldata isLP) external { } /** * @notice See assets as Yvault tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param version The list of vault version */ function _setYVaultTokens(address[] calldata tokenAddresses, YvTokenVersion[] calldata version) external { } /** * @notice See assets as curve pool tokens for multiple cTokens * @param tokenAddresses The list of underlying tokens * @param poolType The list of curve pool type (ETH or USD base only) * @param swap The list of curve swap address */ function _setCurveTokens(address[] calldata tokenAddresses, CurveTokenVersion[] calldata version, CurvePoolType[] calldata poolType, address[] calldata swap) external { require(msg.sender == admin, "only the admin may set curve pool tokens"); require(tokenAddresses.length == version.length && tokenAddresses.length == poolType.length && tokenAddresses.length == swap.length, "mismatched data"); for (uint i = 0; i < tokenAddresses.length; i++) { if (version[i] == CurveTokenVersion.V3) { // Sanity check to make sure the token minter is right. require(<FILL_ME>) } crvTokens[tokenAddresses[i]] = CrvTokenInfo({isCrvToken: true, poolType: poolType[i], curveSwap: swap[i]}); emit SetCurveToken(tokenAddresses[i], poolType[i], swap[i]); } } /** * @notice Set guardian for price oracle proxy * @param _guardian The new guardian */ function _setGuardian(address _guardian) external { } /** * @notice Set admin for price oracle proxy * @param _admin The new admin */ function _setAdmin(address _admin) external { } }
CurveTokenV3Interface(tokenAddresses[i]).minter()==swap[i],"incorrect pool"
306,425
CurveTokenV3Interface(tokenAddresses[i]).minter()==swap[i]
"ERC777: caller is not an operator for holder"
pragma solidity ^0.5.16; interface IERC777 { function name() external view returns (string memory); function symbol() external view returns (string memory); function granularity() external view returns (uint256); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function send(address recipient, uint256 amount, bytes calldata data) external; function burn(uint256 amount, bytes calldata data) external; function isOperatorFor(address operator, address tokenHolder) external view returns (bool); function authorizeOperator(address operator) external; function revokeOperator(address operator) external; function defaultOperators() external view returns (address[] memory); function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); event AuthorizedOperator(address indexed operator, address indexed tokenHolder); event RevokedOperator(address indexed operator, address indexed tokenHolder); } pragma solidity ^0.5.16; interface IERC777Recipient { function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; } pragma solidity ^0.5.16; interface IERC777Sender { function tokensToSend( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; } pragma solidity ^0.5.16; 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); } pragma solidity ^0.5.16; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } pragma solidity ^0.5.16; library Address { function isContract(address account) internal view returns (bool) { } function toPayable(address account) internal pure returns (address payable) { } } pragma solidity ^0.5.16; interface IERC1820Registry { function setManager(address account, address newManager) external; function getManager(address account) external view returns (address); function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external; function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address); function interfaceHash(string calldata interfaceName) external pure returns (bytes32); function updateERC165Cache(address account, bytes4 interfaceId) external; function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); } pragma solidity ^0.5.16; contract ERC777 is IERC777, IERC20 { using SafeMath for uint256; using Address for address; IERC1820Registry private _erc1820 = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); mapping(address => uint256) private _balances; uint256 private _totalSupply; string private _name; string private _symbol; bytes32 constant private TOKENS_SENDER_INTERFACE_HASH = 0x29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe895; bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH = 0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b; address[] private _defaultOperatorsArray; mapping(address => bool) private _defaultOperators; mapping(address => mapping(address => bool)) private _operators; mapping(address => mapping(address => bool)) private _revokedDefaultOperators; mapping (address => mapping (address => uint256)) private _allowances; // data string public companyName = "GBI AG"; uint256 public assetsTransactionCount = 0; mapping(uint => _assetsTransaction) public assetsTransaction; struct _assetsTransaction { uint _id; string _dateTime; string _action; string _description; string _transactionValue; string _newGoodwill; } constructor( string memory name, string memory symbol, address[] memory defaultOperators ) public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public pure returns (uint8) { } function granularity() public view returns (uint256) { } function totalSupply() public view returns (uint256) { } function balanceOf(address tokenHolder) public view returns (uint256) { } function send(address recipient, uint256 amount, bytes calldata data) external { } function transfer(address recipient, uint256 amount) external returns (bool) { } function burn(uint256 amount, bytes calldata data) external { } function isOperatorFor( address operator, address tokenHolder ) public view returns (bool) { } // Add Data function addAssetsTransaction(string calldata _dateTime, string calldata _action, string calldata _description, string calldata _transactionValue, string calldata _newGoodwill) external { } function setCompanyName(string calldata _companyName) external { } function incrementCount() internal { } function authorizeOperator(address operator) external { } function revokeOperator(address operator) external { } function defaultOperators() public view returns (address[] memory) { } function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external { require(<FILL_ME>) _send(msg.sender, sender, recipient, amount, data, operatorData, true); } function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external { } function allowance(address holder, address spender) public view returns (uint256) { } function approve(address spender, uint256 value) external returns (bool) { } function transferFrom(address holder, address recipient, uint256 amount) external returns (bool) { } function _mint( address operator, address account, uint256 amount, bytes memory userData, bytes memory operatorData ) internal { } function _send( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { } function _burn( address operator, address from, uint256 amount, bytes memory data, bytes memory operatorData ) private { } function _move( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { } function _approve(address holder, address spender, uint256 value) private { } function _callTokensToSend( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { } function _callTokensReceived( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { } } pragma solidity ^0.5.16; contract TokenMintERC777Token is ERC777 { address private owner = msg.sender; string private _symbol = "QomG"; string private _name = "Qommodity Gold"; address[] private _defaultOperators = [owner]; uint256 private _totalSupply= 466590383000000000000000000; constructor() public ERC777(_name, _symbol, _defaultOperators) { } }
isOperatorFor(msg.sender,sender),"ERC777: caller is not an operator for holder"
306,464
isOperatorFor(msg.sender,sender)
"ERC777: caller is not an operator for holder"
pragma solidity ^0.5.16; interface IERC777 { function name() external view returns (string memory); function symbol() external view returns (string memory); function granularity() external view returns (uint256); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function send(address recipient, uint256 amount, bytes calldata data) external; function burn(uint256 amount, bytes calldata data) external; function isOperatorFor(address operator, address tokenHolder) external view returns (bool); function authorizeOperator(address operator) external; function revokeOperator(address operator) external; function defaultOperators() external view returns (address[] memory); function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); event AuthorizedOperator(address indexed operator, address indexed tokenHolder); event RevokedOperator(address indexed operator, address indexed tokenHolder); } pragma solidity ^0.5.16; interface IERC777Recipient { function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; } pragma solidity ^0.5.16; interface IERC777Sender { function tokensToSend( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; } pragma solidity ^0.5.16; 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); } pragma solidity ^0.5.16; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } pragma solidity ^0.5.16; library Address { function isContract(address account) internal view returns (bool) { } function toPayable(address account) internal pure returns (address payable) { } } pragma solidity ^0.5.16; interface IERC1820Registry { function setManager(address account, address newManager) external; function getManager(address account) external view returns (address); function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external; function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address); function interfaceHash(string calldata interfaceName) external pure returns (bytes32); function updateERC165Cache(address account, bytes4 interfaceId) external; function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); } pragma solidity ^0.5.16; contract ERC777 is IERC777, IERC20 { using SafeMath for uint256; using Address for address; IERC1820Registry private _erc1820 = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); mapping(address => uint256) private _balances; uint256 private _totalSupply; string private _name; string private _symbol; bytes32 constant private TOKENS_SENDER_INTERFACE_HASH = 0x29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe895; bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH = 0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b; address[] private _defaultOperatorsArray; mapping(address => bool) private _defaultOperators; mapping(address => mapping(address => bool)) private _operators; mapping(address => mapping(address => bool)) private _revokedDefaultOperators; mapping (address => mapping (address => uint256)) private _allowances; // data string public companyName = "GBI AG"; uint256 public assetsTransactionCount = 0; mapping(uint => _assetsTransaction) public assetsTransaction; struct _assetsTransaction { uint _id; string _dateTime; string _action; string _description; string _transactionValue; string _newGoodwill; } constructor( string memory name, string memory symbol, address[] memory defaultOperators ) public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public pure returns (uint8) { } function granularity() public view returns (uint256) { } function totalSupply() public view returns (uint256) { } function balanceOf(address tokenHolder) public view returns (uint256) { } function send(address recipient, uint256 amount, bytes calldata data) external { } function transfer(address recipient, uint256 amount) external returns (bool) { } function burn(uint256 amount, bytes calldata data) external { } function isOperatorFor( address operator, address tokenHolder ) public view returns (bool) { } // Add Data function addAssetsTransaction(string calldata _dateTime, string calldata _action, string calldata _description, string calldata _transactionValue, string calldata _newGoodwill) external { } function setCompanyName(string calldata _companyName) external { } function incrementCount() internal { } function authorizeOperator(address operator) external { } function revokeOperator(address operator) external { } function defaultOperators() public view returns (address[] memory) { } function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external { } function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external { require(<FILL_ME>) _burn(msg.sender, account, amount, data, operatorData); } function allowance(address holder, address spender) public view returns (uint256) { } function approve(address spender, uint256 value) external returns (bool) { } function transferFrom(address holder, address recipient, uint256 amount) external returns (bool) { } function _mint( address operator, address account, uint256 amount, bytes memory userData, bytes memory operatorData ) internal { } function _send( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { } function _burn( address operator, address from, uint256 amount, bytes memory data, bytes memory operatorData ) private { } function _move( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { } function _approve(address holder, address spender, uint256 value) private { } function _callTokensToSend( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData ) private { } function _callTokensReceived( address operator, address from, address to, uint256 amount, bytes memory userData, bytes memory operatorData, bool requireReceptionAck ) private { } } pragma solidity ^0.5.16; contract TokenMintERC777Token is ERC777 { address private owner = msg.sender; string private _symbol = "QomG"; string private _name = "Qommodity Gold"; address[] private _defaultOperators = [owner]; uint256 private _totalSupply= 466590383000000000000000000; constructor() public ERC777(_name, _symbol, _defaultOperators) { } }
isOperatorFor(msg.sender,account),"ERC777: caller is not an operator for holder"
306,464
isOperatorFor(msg.sender,account)
null
pragma solidity ^0.4.23; //////////////////////////////////////// ERC20Basic.sol //////////////////////////////////////// /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } //////////////////////////////////////// SafeMath.sol //////////////////////////////////////// /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } //////////////////////////////////////// BasicToken.sol //////////////////////////////////////// /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @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) { } } //////////////////////////////////////// ERC20.sol //////////////////////////////////////// /** * @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 ); } //////////////////////////////////////// StandardToken.sol //////////////////////////////////////// /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 */ 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) { } /** * @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) { } } //////////////////////////////////////// DetailedERC20.sol //////////////////////////////////////// contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } //////////////////////////////////////// Ownable.sol //////////////////////////////////////// /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } //////////////////////////////////////// CanReclaimToken.sol //////////////////////////////////////// /** * @title Contracts that should be able to recover tokens * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner. * This will prevent any accidental loss of tokens. */ contract CanReclaimToken is Ownable { /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { } } //////////////////////////////////////// ERC20Token.sol //////////////////////////////////////// contract ERC20Token is DetailedERC20, StandardToken, CanReclaimToken { address public funder; constructor(string _name, string _symbol, uint8 _decimals, address _funder, uint256 _initToken) public DetailedERC20(_name, _symbol, _decimals) { uint256 initToken = _initToken.mul(10**uint256(_decimals)); require(<FILL_ME>) funder = _funder; totalSupply_ = initToken; balances[_funder] = initToken; emit Transfer(address(0), funder, initToken); } } //////////////////////////////////////// BurnableToken.sol //////////////////////////////////////// /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { 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 { } function _burn(address _who, uint256 _value) internal { } } //////////////////////////////////////// bucky.sol //////////////////////////////////////// contract BZUToken is ERC20Token, BurnableToken { bool public active = true; string _name = "BZU Token"; string _symbol = "BZU"; uint8 _decimals = 18; address _funder = address(0xC9AD62F26Aa7F79c095281Cab10446ec9Bc7A5E5); uint256 _initToken = 1000000000; modifier onlyActive() { } constructor() public ERC20Token(_name, _symbol, _decimals, _funder, _initToken) {} /** * @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 onlyActive returns (bool) { } /** * @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 onlyActive returns (bool) { } function setState(bool _state) public onlyOwner { } }
address(0)!=_funder
306,497
address(0)!=_funder
null
/* https://t.me/JustApeInu SPDX-License-Identifier: Unlicensed https://t.me/JustApeInu */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner() { } function transferOwnership(address newOwner) public virtual onlyOwner() { } function _transferOwnership(address newOwner) internal virtual { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract JUSTAPEIN is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _tTotal = 1e10 * 10**9; uint256 private constant _MAX = ~uint256(0); uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; uint private constant _decimals = 9; uint256 private _teamFee = 12; uint256 private _previousteamFee = _teamFee; string private constant _name = "Just Ape Inu"; string private constant _symbol = "APEIN"; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { } modifier handleFees(bool takeFee) { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _removeAllFees() private { } function _restoreAllFees() private { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from]); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(<FILL_ME>) } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.div(12); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { } function _takeTeam(uint256 tTeam) private { } function initContract(address payable feeAddress) external onlyOwner() { } function openTrading() external onlyOwner() { } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { } function excludeFromFee(address payable ad) external onlyOwner() { } function includeToFee(address payable ad) external onlyOwner() { } function setTeamFee(uint256 fee) external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner() { } function delBots(address[] memory bots_) public onlyOwner() { } function isBot(address ad) public view returns (bool) { } function isExcludedFromFee(address ad) public view returns (bool) { } function swapFeesManual() external onlyOwner() { } function withdrawFees() external { } receive() external payable {} }
amount.add(walletBalance)<=_tTotal.mul(1).div(100)
306,521
amount.add(walletBalance)<=_tTotal.mul(1).div(100)
"Cannot exceed max ticket value."
contract BusStation { /* ==== Variables ===== */ mapping(address => uint256) public _seats; bool public _hasBusLeft; uint256 public _ticketTotalValue; uint256 public _minTicketValue = 0; uint256 public _maxTicketValue; uint256 public _minWeiToLeave; address payable private _destination; uint256 public _timelockDuration; uint256 public _endOfTimelock; /* ==== Events ===== */ /* Removed for not being necessary and inflating gas costs event TicketPurchased(address indexed _from, uint256 _value); event Withdrawal(address indexed _from, uint256 _value); event BusDeparts(uint256 _value); */ /* ==== Constructor ===== */ // Set up a one-way bus ride to a destination, with reserve price, time of departure, and cap on ticket prices for fairness constructor( address payable destination, uint256 minWeiToLeave, uint256 timelockSeconds, uint256 maxTicketValue ) { } /* ==== Functions ===== */ // Purchase a bus ticket if eligible function buyBusTicket() external payable canPurchaseTicket { uint256 seatvalue = _seats[msg.sender]; require(<FILL_ME>) _seats[msg.sender] = msg.value + seatvalue; _ticketTotalValue += msg.value; /* emit TicketPurchased(msg.sender, msg.value); */ } // If bus is eligible, anybody can trigger the bus ride function triggerBusRide() external isReadyToRide { } // If eligible to withdraw, then pull money out function withdraw() external { } /* === Modifiers === */ // Can only purchase ticket if bus has not left and ticket purchase amount is small modifier canPurchaseTicket() { } // Bus can ride if timelock is passed and tickets exceed reserve price modifier isReadyToRide() { } }
msg.value+seatvalue<=_maxTicketValue,"Cannot exceed max ticket value."
306,567
msg.value+seatvalue<=_maxTicketValue
"There's been too many tokens minted already."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; // // // // ░▓▓▓▓▓▓▓▓▓▓▓▓░░░—————░░░░░░░░░░░▓▓▓▓▓▓▓░———░░▓▓▓░░░░░░░░—███—░░░ // ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░————░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░▓▓░░░░░░░——███— // ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░————░░░░░░░░░░░▓▓▓▓▓▓░░░░░▓▓░░░░░░░░░——░ // ░░—░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░░▓▓▓▓▓░░—░▓░░░░░░░░░░░ // ░░░—░░░░░———░——░░░░░░▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░▓▓▓▓▓░░░░░░░—————— // —░░░░░░——————█————░—░░░░░▓▓▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░—█ // ░░░░░░░░—█████—————░░░░░░░░░░▓▓▓▓▓▓░░░——░░░——░░░░░░░▓▓▓▓░░——░░░— // ░░░░░░░░░░░░░░░———————░░░░░░░░░░░▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓░░——— // ░░░░░░░▓▓▓▓▓▓▓▓▓▓░░————————░░░░░░░░░▓▓▓▓▓░░░——░░░░░░░░░░░▓▓▓▓▓░░ // ░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓░░———————░░░░░░░░░░▓▓▓▓▓░░░——░—░░░░░░░░░▓▓▓▓ // ░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░———░░░░░░░░░░░░░▓▓▓▓░░░—░░░░░░░░░░░▓░ // ░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓░░░░░▓▓▓▓░░░░░░░░—░░░░░ // ░░░░░░░░░░░——░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░░▓▓▓▓░░░░░░░░—░░ // ▓▓▓░░░░░░░░░░░░———░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░▓▓▓▓▓░░░░░░░░ // —░▓▓▓░░░░░░░░░░░————░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░▓▓▓▓░░░░░░ // ———░▓▓▓░░░░░░░░░░░————░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░▓▓▓▓▓░░░░ // ░————░▓▓▓░░░░░░░░░░░░——█—░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░▓▓▓▓▓░ // ░░░░░———░▓▓░░░░░░░░░░░░░—█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░▓▓▓▓ // ░▓░░░░░———░▓▓░░░░░░░░░░░░░——█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░░░ // ░░░░░░░░░——█—░▓▓░░░░░░░░░░░░░—██—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░ // ░░░░░░░░░░░░———░░▓▓░░░▓░░░░░░░░░—███—░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ // ░░░░░░░░░░░░░░░———░▓▓░░░░░░░░░░░░░——████—░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░ // —░▓▓▓░░░░░░░░░░░░————░▓▓▓░░░░░░░░░░░————██████——░░▓▓▓▓▓░░░░░░░░— // ————░▓▓░░░░░░░░░░░░░————░▓▓▓░░░░░░░░░——————█—██████—░▓▓▓▓░░░░——░ // —░░—█—░░▓░░░░░░░░░░░░░——██—░▓▓▓░░░░░░░░░░░———————░░—░░░▓▓▓░░░░░░ // —░░░░░———░░▓░░░░░░░░░░░░░░—██—░░▓▓░░░░░░░░░░░░—————░░░▓▓▓▓░░░░░░ // ░░░░░░░░——█—░░▓░░░░░░░░░░░░░░—██—░░▓▓▓▓░░░░░░░░░░——███——░░░░░░—█ // —█—░░░░░░░░—██—░▓▓░░░░░░░░░░░░░░——██—░▓▓▓▓░░░░░░░░░————░░░—————— // ░░————░░░░░░░——██—░▓▓░░░░░░░░░░░░░———██—░░▓▓▓▓▓░░░░░—░░░░░░░░░░░ // ———░░░░░░░░░░▓░░░—██—░▓▓▓░░░░░░░░░░░░———███—░░▓▓▓▓▓▓▓▓░░░░░░░░░░ // ░░░——░░—░░░░░▓▓▓▓▓░—███—░▓▓▓░░░░░░░░░░—————████—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓ // ▓▓▓▓░░░—░░░▓░░░▓▓▓▓░░—████—░▓▓▓░░░░░░░░░———————████—░░▓▓▓▓▓▓▓▓▓▓ // // // Descent, 2021 // // Martin Houra // // https://martinhoura.net/ // // // contract DescentCollection is ERC721Enumerable, ERC721Burnable, ReentrancyGuard, Ownable { using SafeMath for uint256; using Strings for uint256; event DescentMinted( address who, uint256 indexed tokenId ); bool public isMintingActive; constructor() ERC721("Descent", "DESCENT") {} uint256 public constant MAX_SUPPLY = 111; uint256 private _numOfAvailableTokens = 111; uint256[111] private _availableTokens; uint256 public constant MAX_MINTABLE_IN_TXN = 3; string public baseURI = "ipfs://QmP1Fd6wwLoJ5af7zgciM5FCmfC9m7X5R6hQpNxA61MwzS/"; function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } function _priceCheck() public view returns (uint256) { } function mint(uint256 _amountToMint) public payable nonReentrant() { require(isMintingActive, "Minting has not started yet."); require(totalSupply() <= MAX_SUPPLY, "They are all gone, check OpenSea for secondary."); require(_amountToMint > 0 && _amountToMint <= 3, "You can only mint between 1-3 tokens at a time."); require(<FILL_ME>) require(_priceCheck().mul(_amountToMint) <= msg.value, "Ether value sent too small."); _mint(_amountToMint); } function _mint(uint256 _amountToMint) internal { } function reserve(address _toAddress, uint256 tokenId) public onlyOwner { } function mintState() public onlyOwner returns(bool) { } function withdraw() public onlyOwner { } function forwardERC20s(IERC20 _token, address _to, uint256 _amount) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Random token generator function _useRandomAvailableToken(uint256 _numberToFetch, uint256 _indexToUse) internal returns (uint256) { } function _useAvailableTokenAtIndex(uint256 indexToUse) internal returns (uint256) { } }
totalSupply().add(_amountToMint)<=MAX_SUPPLY,"There's been too many tokens minted already."
306,658
totalSupply().add(_amountToMint)<=MAX_SUPPLY
"Ether value sent too small."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; // // // // ░▓▓▓▓▓▓▓▓▓▓▓▓░░░—————░░░░░░░░░░░▓▓▓▓▓▓▓░———░░▓▓▓░░░░░░░░—███—░░░ // ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░————░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░▓▓░░░░░░░——███— // ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░————░░░░░░░░░░░▓▓▓▓▓▓░░░░░▓▓░░░░░░░░░——░ // ░░—░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░░▓▓▓▓▓░░—░▓░░░░░░░░░░░ // ░░░—░░░░░———░——░░░░░░▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░▓▓▓▓▓░░░░░░░—————— // —░░░░░░——————█————░—░░░░░▓▓▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░—█ // ░░░░░░░░—█████—————░░░░░░░░░░▓▓▓▓▓▓░░░——░░░——░░░░░░░▓▓▓▓░░——░░░— // ░░░░░░░░░░░░░░░———————░░░░░░░░░░░▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓░░——— // ░░░░░░░▓▓▓▓▓▓▓▓▓▓░░————————░░░░░░░░░▓▓▓▓▓░░░——░░░░░░░░░░░▓▓▓▓▓░░ // ░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓░░———————░░░░░░░░░░▓▓▓▓▓░░░——░—░░░░░░░░░▓▓▓▓ // ░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░———░░░░░░░░░░░░░▓▓▓▓░░░—░░░░░░░░░░░▓░ // ░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓░░░░░▓▓▓▓░░░░░░░░—░░░░░ // ░░░░░░░░░░░——░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░░▓▓▓▓░░░░░░░░—░░ // ▓▓▓░░░░░░░░░░░░———░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░▓▓▓▓▓░░░░░░░░ // —░▓▓▓░░░░░░░░░░░————░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░▓▓▓▓░░░░░░ // ———░▓▓▓░░░░░░░░░░░————░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░▓▓▓▓▓░░░░ // ░————░▓▓▓░░░░░░░░░░░░——█—░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░▓▓▓▓▓░ // ░░░░░———░▓▓░░░░░░░░░░░░░—█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░▓▓▓▓ // ░▓░░░░░———░▓▓░░░░░░░░░░░░░——█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░░░ // ░░░░░░░░░——█—░▓▓░░░░░░░░░░░░░—██—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░ // ░░░░░░░░░░░░———░░▓▓░░░▓░░░░░░░░░—███—░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ // ░░░░░░░░░░░░░░░———░▓▓░░░░░░░░░░░░░——████—░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░ // —░▓▓▓░░░░░░░░░░░░————░▓▓▓░░░░░░░░░░░————██████——░░▓▓▓▓▓░░░░░░░░— // ————░▓▓░░░░░░░░░░░░░————░▓▓▓░░░░░░░░░——————█—██████—░▓▓▓▓░░░░——░ // —░░—█—░░▓░░░░░░░░░░░░░——██—░▓▓▓░░░░░░░░░░░———————░░—░░░▓▓▓░░░░░░ // —░░░░░———░░▓░░░░░░░░░░░░░░—██—░░▓▓░░░░░░░░░░░░—————░░░▓▓▓▓░░░░░░ // ░░░░░░░░——█—░░▓░░░░░░░░░░░░░░—██—░░▓▓▓▓░░░░░░░░░░——███——░░░░░░—█ // —█—░░░░░░░░—██—░▓▓░░░░░░░░░░░░░░——██—░▓▓▓▓░░░░░░░░░————░░░—————— // ░░————░░░░░░░——██—░▓▓░░░░░░░░░░░░░———██—░░▓▓▓▓▓░░░░░—░░░░░░░░░░░ // ———░░░░░░░░░░▓░░░—██—░▓▓▓░░░░░░░░░░░░———███—░░▓▓▓▓▓▓▓▓░░░░░░░░░░ // ░░░——░░—░░░░░▓▓▓▓▓░—███—░▓▓▓░░░░░░░░░░—————████—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓ // ▓▓▓▓░░░—░░░▓░░░▓▓▓▓░░—████—░▓▓▓░░░░░░░░░———————████—░░▓▓▓▓▓▓▓▓▓▓ // // // Descent, 2021 // // Martin Houra // // https://martinhoura.net/ // // // contract DescentCollection is ERC721Enumerable, ERC721Burnable, ReentrancyGuard, Ownable { using SafeMath for uint256; using Strings for uint256; event DescentMinted( address who, uint256 indexed tokenId ); bool public isMintingActive; constructor() ERC721("Descent", "DESCENT") {} uint256 public constant MAX_SUPPLY = 111; uint256 private _numOfAvailableTokens = 111; uint256[111] private _availableTokens; uint256 public constant MAX_MINTABLE_IN_TXN = 3; string public baseURI = "ipfs://QmP1Fd6wwLoJ5af7zgciM5FCmfC9m7X5R6hQpNxA61MwzS/"; function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } function _priceCheck() public view returns (uint256) { } function mint(uint256 _amountToMint) public payable nonReentrant() { require(isMintingActive, "Minting has not started yet."); require(totalSupply() <= MAX_SUPPLY, "They are all gone, check OpenSea for secondary."); require(_amountToMint > 0 && _amountToMint <= 3, "You can only mint between 1-3 tokens at a time."); require(totalSupply().add(_amountToMint) <= MAX_SUPPLY, "There's been too many tokens minted already."); require(<FILL_ME>) _mint(_amountToMint); } function _mint(uint256 _amountToMint) internal { } function reserve(address _toAddress, uint256 tokenId) public onlyOwner { } function mintState() public onlyOwner returns(bool) { } function withdraw() public onlyOwner { } function forwardERC20s(IERC20 _token, address _to, uint256 _amount) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Random token generator function _useRandomAvailableToken(uint256 _numberToFetch, uint256 _indexToUse) internal returns (uint256) { } function _useAvailableTokenAtIndex(uint256 indexToUse) internal returns (uint256) { } }
_priceCheck().mul(_amountToMint)<=msg.value,"Ether value sent too small."
306,658
_priceCheck().mul(_amountToMint)<=msg.value
"Can't send to a zero address."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; // // // // ░▓▓▓▓▓▓▓▓▓▓▓▓░░░—————░░░░░░░░░░░▓▓▓▓▓▓▓░———░░▓▓▓░░░░░░░░—███—░░░ // ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░————░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░▓▓░░░░░░░——███— // ░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░————░░░░░░░░░░░▓▓▓▓▓▓░░░░░▓▓░░░░░░░░░——░ // ░░—░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░░▓▓▓▓▓░░—░▓░░░░░░░░░░░ // ░░░—░░░░░———░——░░░░░░▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░░░▓▓▓▓▓░░░░░░░—————— // —░░░░░░——————█————░—░░░░░▓▓▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓▓░░—░░░░░—█ // ░░░░░░░░—█████—————░░░░░░░░░░▓▓▓▓▓▓░░░——░░░——░░░░░░░▓▓▓▓░░——░░░— // ░░░░░░░░░░░░░░░———————░░░░░░░░░░░▓▓▓▓▓░░———░░░░░░░░░░░░▓▓▓▓░░——— // ░░░░░░░▓▓▓▓▓▓▓▓▓▓░░————————░░░░░░░░░▓▓▓▓▓░░░——░░░░░░░░░░░▓▓▓▓▓░░ // ░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓░░———————░░░░░░░░░░▓▓▓▓▓░░░——░—░░░░░░░░░▓▓▓▓ // ░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓░░░———░░░░░░░░░░░░░▓▓▓▓░░░—░░░░░░░░░░░▓░ // ░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓░░░░░▓▓▓▓░░░░░░░░—░░░░░ // ░░░░░░░░░░░——░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░░▓▓▓▓░░░░░░░░—░░ // ▓▓▓░░░░░░░░░░░░———░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░—░░░░░░░░░░░░▓▓▓▓▓░░░░░░░░ // —░▓▓▓░░░░░░░░░░░————░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░▓▓▓▓░░░░░░ // ———░▓▓▓░░░░░░░░░░░————░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░▓▓▓▓▓░░░░ // ░————░▓▓▓░░░░░░░░░░░░——█—░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░▓▓▓▓▓░ // ░░░░░———░▓▓░░░░░░░░░░░░░—█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░▓▓▓▓ // ░▓░░░░░———░▓▓░░░░░░░░░░░░░——█—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░——░░░░░░░░░░░░░ // ░░░░░░░░░——█—░▓▓░░░░░░░░░░░░░—██—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░—░░░░░░░░░░░ // ░░░░░░░░░░░░———░░▓▓░░░▓░░░░░░░░░—███—░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ // ░░░░░░░░░░░░░░░———░▓▓░░░░░░░░░░░░░——████—░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░ // —░▓▓▓░░░░░░░░░░░░————░▓▓▓░░░░░░░░░░░————██████——░░▓▓▓▓▓░░░░░░░░— // ————░▓▓░░░░░░░░░░░░░————░▓▓▓░░░░░░░░░——————█—██████—░▓▓▓▓░░░░——░ // —░░—█—░░▓░░░░░░░░░░░░░——██—░▓▓▓░░░░░░░░░░░———————░░—░░░▓▓▓░░░░░░ // —░░░░░———░░▓░░░░░░░░░░░░░░—██—░░▓▓░░░░░░░░░░░░—————░░░▓▓▓▓░░░░░░ // ░░░░░░░░——█—░░▓░░░░░░░░░░░░░░—██—░░▓▓▓▓░░░░░░░░░░——███——░░░░░░—█ // —█—░░░░░░░░—██—░▓▓░░░░░░░░░░░░░░——██—░▓▓▓▓░░░░░░░░░————░░░—————— // ░░————░░░░░░░——██—░▓▓░░░░░░░░░░░░░———██—░░▓▓▓▓▓░░░░░—░░░░░░░░░░░ // ———░░░░░░░░░░▓░░░—██—░▓▓▓░░░░░░░░░░░░———███—░░▓▓▓▓▓▓▓▓░░░░░░░░░░ // ░░░——░░—░░░░░▓▓▓▓▓░—███—░▓▓▓░░░░░░░░░░—————████—░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓ // ▓▓▓▓░░░—░░░▓░░░▓▓▓▓░░—████—░▓▓▓░░░░░░░░░———————████—░░▓▓▓▓▓▓▓▓▓▓ // // // Descent, 2021 // // Martin Houra // // https://martinhoura.net/ // // // contract DescentCollection is ERC721Enumerable, ERC721Burnable, ReentrancyGuard, Ownable { using SafeMath for uint256; using Strings for uint256; event DescentMinted( address who, uint256 indexed tokenId ); bool public isMintingActive; constructor() ERC721("Descent", "DESCENT") {} uint256 public constant MAX_SUPPLY = 111; uint256 private _numOfAvailableTokens = 111; uint256[111] private _availableTokens; uint256 public constant MAX_MINTABLE_IN_TXN = 3; string public baseURI = "ipfs://QmP1Fd6wwLoJ5af7zgciM5FCmfC9m7X5R6hQpNxA61MwzS/"; function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } function _priceCheck() public view returns (uint256) { } function mint(uint256 _amountToMint) public payable nonReentrant() { } function _mint(uint256 _amountToMint) internal { } function reserve(address _toAddress, uint256 tokenId) public onlyOwner { } function mintState() public onlyOwner returns(bool) { } function withdraw() public onlyOwner { } function forwardERC20s(IERC20 _token, address _to, uint256 _amount) public onlyOwner { require(<FILL_ME>) _token.transfer(_to, _amount); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Random token generator function _useRandomAvailableToken(uint256 _numberToFetch, uint256 _indexToUse) internal returns (uint256) { } function _useAvailableTokenAtIndex(uint256 indexToUse) internal returns (uint256) { } }
address(_to)!=address(0),"Can't send to a zero address."
306,658
address(_to)!=address(0)
"Contracts not set"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ICnMGame.sol"; import "./interfaces/ICnM.sol"; import "./interfaces/ICHEDDAR.sol"; import "./interfaces/IHabitat.sol"; import "./interfaces/IRandomizer.sol"; import "./interfaces/IHouse.sol"; import "./interfaces/IHouseGame.sol"; contract Habitat is IHabitat, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Cat/Mouse uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } // number of Mice stacked uint256 private numMiceStaked; // number of Cat stacked uint256 private numCatStaked; // number of CrazyCat stacked uint256 private numCrazyCatStaked; // number of Shack stacked uint256 private numShackStaked; // number of Ranch stacked uint256 private numRanchStaked; // number of Mansion stacked uint256 private numMansionStaked; uint256 public PERIOD = 1 days; event TokenStaked(address indexed owner, uint256 indexed tokenId, uint8 tokenType, uint256 value); event CatClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event CrazyCatLadyClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event MouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event HouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the CnM NFT contract ICnM public cnmNFT; // reference to the House NFT contract IHouse public houseNFT; // reference to the CnM game contract ICnMGame public cnmGame; // reference to the CnM game contract IHouseGame public houseGame; // reference to the $CHEDDAR contract for minting $CHEDDAR earnings ICHEDDAR public cheddarToken; // reference to Randomizer IRandomizer public randomizer; // maps Mouse tokenId to stake mapping(uint256 => Stake) private habitat; // maps House tokenId to stake mapping(uint256 => Stake) private houseYield; // maps Cat tokenId to stake mapping(uint256 => Stake) private yield; // array of Cat token ids; uint256[] private yieldIds; // maps Crazy Lady Cat tokenId to stake mapping(uint256 => Stake) private crazyYield; // array of CrazyCat token ids; uint256[] private crazyYieldIds; // maps houseTokenId to stake // any rewards distributed when no Cats are staked uint256 private unaccountedRewards = 0; // any rewards distributed from House NFTs when no Crazy Cats are staked uint256 private unaccountedCrazyRewards = 0; // amount of $CHEDDAR due for each cat staked uint256 private cheddarPerCat = 0; // amount of $CHEDDAR due for each crazy cat staked uint256 private cheddarPerCrazy = 0; // Mice earn 10,000 $CHEDDAR per day uint256 public constant DAILY_CHEDDAR_RATE = 10000 ether; // Shack: 17,850 Tokens Per Day uint256 public constant DAILY_SHACK_CHEDDAR_RATE = 17850 ether; // Ranch: 30,000 Tokens Per Day uint256 public constant DAILY_RANCH_CHEDDAR_RATE = 30000 ether; // Mansion: 100,000 Tokens Per Day uint256 public constant DAILY_MANSION_CHEDDAR_RATE = 100000 ether; // Mice must have 2 days worth of $CHEDDAR to un-stake or else they're still remaining the habitat uint256 public MINIMUM = 200000 ether; // there will only ever 6,000,000,000 $CHEDDAR earned through staking uint256 public constant MAXIMUM_GLOBAL_CHEDDAR = 6000000000 ether; // // Cats take a 20% tax on all $CHEDDAR claimed // uint256 public constant GP_CLAIM_TAX_PERCENTAGE = 20; // amount of $CHEDDAR earned so far uint256 public totalCHEDDAREarned; // the last time $CHEDDAR was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow un-staking without any checks but without $CHEDDAR bool public rescueEnabled = false; /** */ constructor() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { require(<FILL_ME>) _; } function setContracts(address _cnmNFT, address _cheddar, address _cnmGame, address _houseGame, address _rand, address _houseNFT) external onlyOwner { } /** STAKING */ /** * adds Cats and Mouse * @param account the address of the staker * @param tokenIds the IDs of the Cats and Mouse to stake */ function addManyToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds Houses * @param account the address of the staker * @param tokenIds the IDs of the House token to stake */ function addManyHouseToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds a single Cat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single CrazyCat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCrazyCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single Mouse to the habitat * @param account the address of the staker * @param tokenId the ID of the Mouse to add to the Staking Pool */ function _addMouseToStakingPool(address account, uint256 tokenId) internal { } /** * adds a single House to the Habitat * @param account the address of the staker * @param tokenId the ID of the Shack to add to the Staking Pool */ function _addHouseToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** CLAIMING / UNSTAKING */ /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat / Yield * to unstake a Mouse it will require it has 2 days worth of $CHEDDAR unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromHabitatAndYield(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyHouseFromHabitat(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings for a single Mouse and optionally unstake it * if not unstaking, lose x% chance * y% percent of accumulated $CHEDDAR to the staked Cats based on it's roll * if unstaking, there is a % chanc of losing Mouse NFT * @param tokenId the ID of the Mouse to claim earnings from * @param unstake whether or not to unstake the Mouse * @return owed - the amount of $CHEDDAR earned */ function _claimMouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Cat */ function _claimCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a Crazy Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Crazy Cat */ function _claimCrazyCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Shack and optionally unstake it * @param tokenId the ID of the Shack to claim earnings from * @param unstake whether or not to unstake the Shack * @return owed - the amount of $CHEDDAR earned */ function _claimHouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { } /** * emergency unstake House tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescueHouse(uint256[] calldata tokenIds) external nonReentrant { } /** ACCOUNTING */ /** * add $CHEDDAR to claimable pot for the Yield * @param amount $CHEDDAR to add to the pot */ function _payCatTax(uint256 amount) internal { } /** * add $CHEDDAR to claimable pot for the Crazy Yield * @param amount $CHEDDAR to add to the pot */ function _payCrazyCatTax(uint256 amount) internal { } /** * tracks $CHEDDAR earnings to ensure it stops once 6,000,000,000‌ is eclipsed */ modifier _updateEarnings() { } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { } function isOwner(uint256 tokenId, address owner) external view override returns (bool) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } /** READ ONLY */ function getOwedForCnM(uint256 tokenId) public view returns (uint256) { } function getOwedForHouse(uint256 tokenId) public view returns (uint256) { } /** * chooses a random Cat thief when a newly minted token is stolen * @param seed a random value to choose a Cat from * @return the owner of the randomly selected Dragon thief */ function randomCatOwner(uint256 seed) external view override returns (address) { } /** * chooses a random Crazy Cat thief when a newly minted token is stolen * @param seed a random value to choose a Dragon from * @return the owner of the randomly selected Dragon thief */ function randomCrazyCatOwner(uint256 seed) external view override returns (address) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } function updateMinimumExit(uint256 _minimum) external onlyOwner { } function updatePeriod(uint256 _period) external onlyOwner { } }
address(cnmNFT)!=address(0)&&address(cheddarToken)!=address(0)&&address(cnmGame)!=address(0)&&address(randomizer)!=address(0)&&address(houseGame)!=address(0)&&address(houseNFT)!=address(0),"Contracts not set"
306,661
address(cnmNFT)!=address(0)&&address(cheddarToken)!=address(0)&&address(cnmGame)!=address(0)&&address(randomizer)!=address(0)&&address(houseGame)!=address(0)&&address(houseNFT)!=address(0)
"You don't own this token"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ICnMGame.sol"; import "./interfaces/ICnM.sol"; import "./interfaces/ICHEDDAR.sol"; import "./interfaces/IHabitat.sol"; import "./interfaces/IRandomizer.sol"; import "./interfaces/IHouse.sol"; import "./interfaces/IHouseGame.sol"; contract Habitat is IHabitat, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Cat/Mouse uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } // number of Mice stacked uint256 private numMiceStaked; // number of Cat stacked uint256 private numCatStaked; // number of CrazyCat stacked uint256 private numCrazyCatStaked; // number of Shack stacked uint256 private numShackStaked; // number of Ranch stacked uint256 private numRanchStaked; // number of Mansion stacked uint256 private numMansionStaked; uint256 public PERIOD = 1 days; event TokenStaked(address indexed owner, uint256 indexed tokenId, uint8 tokenType, uint256 value); event CatClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event CrazyCatLadyClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event MouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event HouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the CnM NFT contract ICnM public cnmNFT; // reference to the House NFT contract IHouse public houseNFT; // reference to the CnM game contract ICnMGame public cnmGame; // reference to the CnM game contract IHouseGame public houseGame; // reference to the $CHEDDAR contract for minting $CHEDDAR earnings ICHEDDAR public cheddarToken; // reference to Randomizer IRandomizer public randomizer; // maps Mouse tokenId to stake mapping(uint256 => Stake) private habitat; // maps House tokenId to stake mapping(uint256 => Stake) private houseYield; // maps Cat tokenId to stake mapping(uint256 => Stake) private yield; // array of Cat token ids; uint256[] private yieldIds; // maps Crazy Lady Cat tokenId to stake mapping(uint256 => Stake) private crazyYield; // array of CrazyCat token ids; uint256[] private crazyYieldIds; // maps houseTokenId to stake // any rewards distributed when no Cats are staked uint256 private unaccountedRewards = 0; // any rewards distributed from House NFTs when no Crazy Cats are staked uint256 private unaccountedCrazyRewards = 0; // amount of $CHEDDAR due for each cat staked uint256 private cheddarPerCat = 0; // amount of $CHEDDAR due for each crazy cat staked uint256 private cheddarPerCrazy = 0; // Mice earn 10,000 $CHEDDAR per day uint256 public constant DAILY_CHEDDAR_RATE = 10000 ether; // Shack: 17,850 Tokens Per Day uint256 public constant DAILY_SHACK_CHEDDAR_RATE = 17850 ether; // Ranch: 30,000 Tokens Per Day uint256 public constant DAILY_RANCH_CHEDDAR_RATE = 30000 ether; // Mansion: 100,000 Tokens Per Day uint256 public constant DAILY_MANSION_CHEDDAR_RATE = 100000 ether; // Mice must have 2 days worth of $CHEDDAR to un-stake or else they're still remaining the habitat uint256 public MINIMUM = 200000 ether; // there will only ever 6,000,000,000 $CHEDDAR earned through staking uint256 public constant MAXIMUM_GLOBAL_CHEDDAR = 6000000000 ether; // // Cats take a 20% tax on all $CHEDDAR claimed // uint256 public constant GP_CLAIM_TAX_PERCENTAGE = 20; // amount of $CHEDDAR earned so far uint256 public totalCHEDDAREarned; // the last time $CHEDDAR was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow un-staking without any checks but without $CHEDDAR bool public rescueEnabled = false; /** */ constructor() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { } function setContracts(address _cnmNFT, address _cheddar, address _cnmGame, address _houseGame, address _rand, address _houseNFT) external onlyOwner { } /** STAKING */ /** * adds Cats and Mouse * @param account the address of the staker * @param tokenIds the IDs of the Cats and Mouse to stake */ function addManyToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { require(tx.origin == _msgSender() || _msgSender() == address(cnmGame), "Only EOA"); require(account == tx.origin, "account to send mismatch"); for (uint i = 0; i < tokenIds.length; i++) { if (_msgSender() != address(cnmGame)) {// dont do this step if its a mint + stake require(<FILL_ME>) cnmNFT.transferFrom(_msgSender(), address(this), tokenIds[i]); } else if (tokenIds[i] == 0) { continue; // there may be gaps in the array for stolen tokens } if (cnmNFT.isCat(tokenIds[i])) { if (cnmNFT.isCrazyCatLady(tokenIds[i])) { _addCrazyCatToStakingPool(account, tokenIds[i]); } else { _addCatToStakingPool(account, tokenIds[i]); } } else _addMouseToStakingPool(account, tokenIds[i]); } } /** * adds Houses * @param account the address of the staker * @param tokenIds the IDs of the House token to stake */ function addManyHouseToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds a single Cat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single CrazyCat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCrazyCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single Mouse to the habitat * @param account the address of the staker * @param tokenId the ID of the Mouse to add to the Staking Pool */ function _addMouseToStakingPool(address account, uint256 tokenId) internal { } /** * adds a single House to the Habitat * @param account the address of the staker * @param tokenId the ID of the Shack to add to the Staking Pool */ function _addHouseToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** CLAIMING / UNSTAKING */ /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat / Yield * to unstake a Mouse it will require it has 2 days worth of $CHEDDAR unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromHabitatAndYield(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyHouseFromHabitat(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings for a single Mouse and optionally unstake it * if not unstaking, lose x% chance * y% percent of accumulated $CHEDDAR to the staked Cats based on it's roll * if unstaking, there is a % chanc of losing Mouse NFT * @param tokenId the ID of the Mouse to claim earnings from * @param unstake whether or not to unstake the Mouse * @return owed - the amount of $CHEDDAR earned */ function _claimMouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Cat */ function _claimCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a Crazy Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Crazy Cat */ function _claimCrazyCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Shack and optionally unstake it * @param tokenId the ID of the Shack to claim earnings from * @param unstake whether or not to unstake the Shack * @return owed - the amount of $CHEDDAR earned */ function _claimHouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { } /** * emergency unstake House tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescueHouse(uint256[] calldata tokenIds) external nonReentrant { } /** ACCOUNTING */ /** * add $CHEDDAR to claimable pot for the Yield * @param amount $CHEDDAR to add to the pot */ function _payCatTax(uint256 amount) internal { } /** * add $CHEDDAR to claimable pot for the Crazy Yield * @param amount $CHEDDAR to add to the pot */ function _payCrazyCatTax(uint256 amount) internal { } /** * tracks $CHEDDAR earnings to ensure it stops once 6,000,000,000‌ is eclipsed */ modifier _updateEarnings() { } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { } function isOwner(uint256 tokenId, address owner) external view override returns (bool) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } /** READ ONLY */ function getOwedForCnM(uint256 tokenId) public view returns (uint256) { } function getOwedForHouse(uint256 tokenId) public view returns (uint256) { } /** * chooses a random Cat thief when a newly minted token is stolen * @param seed a random value to choose a Cat from * @return the owner of the randomly selected Dragon thief */ function randomCatOwner(uint256 seed) external view override returns (address) { } /** * chooses a random Crazy Cat thief when a newly minted token is stolen * @param seed a random value to choose a Dragon from * @return the owner of the randomly selected Dragon thief */ function randomCrazyCatOwner(uint256 seed) external view override returns (address) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } function updateMinimumExit(uint256 _minimum) external onlyOwner { } function updatePeriod(uint256 _period) external onlyOwner { } }
cnmNFT.ownerOf(tokenIds[i])==_msgSender(),"You don't own this token"
306,661
cnmNFT.ownerOf(tokenIds[i])==_msgSender()
"You don't own this token"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ICnMGame.sol"; import "./interfaces/ICnM.sol"; import "./interfaces/ICHEDDAR.sol"; import "./interfaces/IHabitat.sol"; import "./interfaces/IRandomizer.sol"; import "./interfaces/IHouse.sol"; import "./interfaces/IHouseGame.sol"; contract Habitat is IHabitat, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Cat/Mouse uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } // number of Mice stacked uint256 private numMiceStaked; // number of Cat stacked uint256 private numCatStaked; // number of CrazyCat stacked uint256 private numCrazyCatStaked; // number of Shack stacked uint256 private numShackStaked; // number of Ranch stacked uint256 private numRanchStaked; // number of Mansion stacked uint256 private numMansionStaked; uint256 public PERIOD = 1 days; event TokenStaked(address indexed owner, uint256 indexed tokenId, uint8 tokenType, uint256 value); event CatClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event CrazyCatLadyClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event MouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event HouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the CnM NFT contract ICnM public cnmNFT; // reference to the House NFT contract IHouse public houseNFT; // reference to the CnM game contract ICnMGame public cnmGame; // reference to the CnM game contract IHouseGame public houseGame; // reference to the $CHEDDAR contract for minting $CHEDDAR earnings ICHEDDAR public cheddarToken; // reference to Randomizer IRandomizer public randomizer; // maps Mouse tokenId to stake mapping(uint256 => Stake) private habitat; // maps House tokenId to stake mapping(uint256 => Stake) private houseYield; // maps Cat tokenId to stake mapping(uint256 => Stake) private yield; // array of Cat token ids; uint256[] private yieldIds; // maps Crazy Lady Cat tokenId to stake mapping(uint256 => Stake) private crazyYield; // array of CrazyCat token ids; uint256[] private crazyYieldIds; // maps houseTokenId to stake // any rewards distributed when no Cats are staked uint256 private unaccountedRewards = 0; // any rewards distributed from House NFTs when no Crazy Cats are staked uint256 private unaccountedCrazyRewards = 0; // amount of $CHEDDAR due for each cat staked uint256 private cheddarPerCat = 0; // amount of $CHEDDAR due for each crazy cat staked uint256 private cheddarPerCrazy = 0; // Mice earn 10,000 $CHEDDAR per day uint256 public constant DAILY_CHEDDAR_RATE = 10000 ether; // Shack: 17,850 Tokens Per Day uint256 public constant DAILY_SHACK_CHEDDAR_RATE = 17850 ether; // Ranch: 30,000 Tokens Per Day uint256 public constant DAILY_RANCH_CHEDDAR_RATE = 30000 ether; // Mansion: 100,000 Tokens Per Day uint256 public constant DAILY_MANSION_CHEDDAR_RATE = 100000 ether; // Mice must have 2 days worth of $CHEDDAR to un-stake or else they're still remaining the habitat uint256 public MINIMUM = 200000 ether; // there will only ever 6,000,000,000 $CHEDDAR earned through staking uint256 public constant MAXIMUM_GLOBAL_CHEDDAR = 6000000000 ether; // // Cats take a 20% tax on all $CHEDDAR claimed // uint256 public constant GP_CLAIM_TAX_PERCENTAGE = 20; // amount of $CHEDDAR earned so far uint256 public totalCHEDDAREarned; // the last time $CHEDDAR was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow un-staking without any checks but without $CHEDDAR bool public rescueEnabled = false; /** */ constructor() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { } function setContracts(address _cnmNFT, address _cheddar, address _cnmGame, address _houseGame, address _rand, address _houseNFT) external onlyOwner { } /** STAKING */ /** * adds Cats and Mouse * @param account the address of the staker * @param tokenIds the IDs of the Cats and Mouse to stake */ function addManyToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds Houses * @param account the address of the staker * @param tokenIds the IDs of the House token to stake */ function addManyHouseToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { require(tx.origin == _msgSender() || _msgSender() == address(houseGame), "Only EOA"); require(account == tx.origin, "account to send mismatch"); for (uint i = 0; i < tokenIds.length; i++) { if (_msgSender() != address(houseGame)) {// dont do this step if its a mint + stake require(<FILL_ME>) houseNFT.transferFrom(_msgSender(), address(this), tokenIds[i]); } else if (tokenIds[i] == 0) { continue; // there may be gaps in the array for stolen tokens } _addHouseToStakingPool(account, tokenIds[i]); } } /** * adds a single Cat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single CrazyCat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCrazyCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single Mouse to the habitat * @param account the address of the staker * @param tokenId the ID of the Mouse to add to the Staking Pool */ function _addMouseToStakingPool(address account, uint256 tokenId) internal { } /** * adds a single House to the Habitat * @param account the address of the staker * @param tokenId the ID of the Shack to add to the Staking Pool */ function _addHouseToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** CLAIMING / UNSTAKING */ /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat / Yield * to unstake a Mouse it will require it has 2 days worth of $CHEDDAR unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromHabitatAndYield(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyHouseFromHabitat(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings for a single Mouse and optionally unstake it * if not unstaking, lose x% chance * y% percent of accumulated $CHEDDAR to the staked Cats based on it's roll * if unstaking, there is a % chanc of losing Mouse NFT * @param tokenId the ID of the Mouse to claim earnings from * @param unstake whether or not to unstake the Mouse * @return owed - the amount of $CHEDDAR earned */ function _claimMouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Cat */ function _claimCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a Crazy Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Crazy Cat */ function _claimCrazyCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Shack and optionally unstake it * @param tokenId the ID of the Shack to claim earnings from * @param unstake whether or not to unstake the Shack * @return owed - the amount of $CHEDDAR earned */ function _claimHouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { } /** * emergency unstake House tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescueHouse(uint256[] calldata tokenIds) external nonReentrant { } /** ACCOUNTING */ /** * add $CHEDDAR to claimable pot for the Yield * @param amount $CHEDDAR to add to the pot */ function _payCatTax(uint256 amount) internal { } /** * add $CHEDDAR to claimable pot for the Crazy Yield * @param amount $CHEDDAR to add to the pot */ function _payCrazyCatTax(uint256 amount) internal { } /** * tracks $CHEDDAR earnings to ensure it stops once 6,000,000,000‌ is eclipsed */ modifier _updateEarnings() { } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { } function isOwner(uint256 tokenId, address owner) external view override returns (bool) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } /** READ ONLY */ function getOwedForCnM(uint256 tokenId) public view returns (uint256) { } function getOwedForHouse(uint256 tokenId) public view returns (uint256) { } /** * chooses a random Cat thief when a newly minted token is stolen * @param seed a random value to choose a Cat from * @return the owner of the randomly selected Dragon thief */ function randomCatOwner(uint256 seed) external view override returns (address) { } /** * chooses a random Crazy Cat thief when a newly minted token is stolen * @param seed a random value to choose a Dragon from * @return the owner of the randomly selected Dragon thief */ function randomCrazyCatOwner(uint256 seed) external view override returns (address) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } function updateMinimumExit(uint256 _minimum) external onlyOwner { } function updatePeriod(uint256 _period) external onlyOwner { } }
houseNFT.ownerOf(tokenIds[i])==_msgSender(),"You don't own this token"
306,661
houseNFT.ownerOf(tokenIds[i])==_msgSender()
"Not all genesis tokens are minted"
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ICnMGame.sol"; import "./interfaces/ICnM.sol"; import "./interfaces/ICHEDDAR.sol"; import "./interfaces/IHabitat.sol"; import "./interfaces/IRandomizer.sol"; import "./interfaces/IHouse.sol"; import "./interfaces/IHouseGame.sol"; contract Habitat is IHabitat, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Cat/Mouse uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } // number of Mice stacked uint256 private numMiceStaked; // number of Cat stacked uint256 private numCatStaked; // number of CrazyCat stacked uint256 private numCrazyCatStaked; // number of Shack stacked uint256 private numShackStaked; // number of Ranch stacked uint256 private numRanchStaked; // number of Mansion stacked uint256 private numMansionStaked; uint256 public PERIOD = 1 days; event TokenStaked(address indexed owner, uint256 indexed tokenId, uint8 tokenType, uint256 value); event CatClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event CrazyCatLadyClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event MouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event HouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the CnM NFT contract ICnM public cnmNFT; // reference to the House NFT contract IHouse public houseNFT; // reference to the CnM game contract ICnMGame public cnmGame; // reference to the CnM game contract IHouseGame public houseGame; // reference to the $CHEDDAR contract for minting $CHEDDAR earnings ICHEDDAR public cheddarToken; // reference to Randomizer IRandomizer public randomizer; // maps Mouse tokenId to stake mapping(uint256 => Stake) private habitat; // maps House tokenId to stake mapping(uint256 => Stake) private houseYield; // maps Cat tokenId to stake mapping(uint256 => Stake) private yield; // array of Cat token ids; uint256[] private yieldIds; // maps Crazy Lady Cat tokenId to stake mapping(uint256 => Stake) private crazyYield; // array of CrazyCat token ids; uint256[] private crazyYieldIds; // maps houseTokenId to stake // any rewards distributed when no Cats are staked uint256 private unaccountedRewards = 0; // any rewards distributed from House NFTs when no Crazy Cats are staked uint256 private unaccountedCrazyRewards = 0; // amount of $CHEDDAR due for each cat staked uint256 private cheddarPerCat = 0; // amount of $CHEDDAR due for each crazy cat staked uint256 private cheddarPerCrazy = 0; // Mice earn 10,000 $CHEDDAR per day uint256 public constant DAILY_CHEDDAR_RATE = 10000 ether; // Shack: 17,850 Tokens Per Day uint256 public constant DAILY_SHACK_CHEDDAR_RATE = 17850 ether; // Ranch: 30,000 Tokens Per Day uint256 public constant DAILY_RANCH_CHEDDAR_RATE = 30000 ether; // Mansion: 100,000 Tokens Per Day uint256 public constant DAILY_MANSION_CHEDDAR_RATE = 100000 ether; // Mice must have 2 days worth of $CHEDDAR to un-stake or else they're still remaining the habitat uint256 public MINIMUM = 200000 ether; // there will only ever 6,000,000,000 $CHEDDAR earned through staking uint256 public constant MAXIMUM_GLOBAL_CHEDDAR = 6000000000 ether; // // Cats take a 20% tax on all $CHEDDAR claimed // uint256 public constant GP_CLAIM_TAX_PERCENTAGE = 20; // amount of $CHEDDAR earned so far uint256 public totalCHEDDAREarned; // the last time $CHEDDAR was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow un-staking without any checks but without $CHEDDAR bool public rescueEnabled = false; /** */ constructor() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { } function setContracts(address _cnmNFT, address _cheddar, address _cnmGame, address _houseGame, address _rand, address _houseNFT) external onlyOwner { } /** STAKING */ /** * adds Cats and Mouse * @param account the address of the staker * @param tokenIds the IDs of the Cats and Mouse to stake */ function addManyToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds Houses * @param account the address of the staker * @param tokenIds the IDs of the House token to stake */ function addManyHouseToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds a single Cat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single CrazyCat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCrazyCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single Mouse to the habitat * @param account the address of the staker * @param tokenId the ID of the Mouse to add to the Staking Pool */ function _addMouseToStakingPool(address account, uint256 tokenId) internal { } /** * adds a single House to the Habitat * @param account the address of the staker * @param tokenId the ID of the Shack to add to the Staking Pool */ function _addHouseToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** CLAIMING / UNSTAKING */ /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat / Yield * to unstake a Mouse it will require it has 2 days worth of $CHEDDAR unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromHabitatAndYield(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { require(tx.origin == _msgSender() || _msgSender() == address(cnmGame), "Only EOA"); require(<FILL_ME>) uint256 owed = 0; for (uint i = 0; i < tokenIds.length; i++) { if (cnmNFT.isCat(tokenIds[i])) { if (cnmNFT.isCrazyCatLady(tokenIds[i])) { owed += _claimCrazyCatFromYield(tokenIds[i], unstake); } else { owed += _claimCatFromYield(tokenIds[i], unstake); } } else { owed += _claimMouseFromHabitat(tokenIds[i], unstake); } } cheddarToken.updateOriginAccess(); if (owed == 0) { return; } cheddarToken.mint(_msgSender(), owed); } /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyHouseFromHabitat(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings for a single Mouse and optionally unstake it * if not unstaking, lose x% chance * y% percent of accumulated $CHEDDAR to the staked Cats based on it's roll * if unstaking, there is a % chanc of losing Mouse NFT * @param tokenId the ID of the Mouse to claim earnings from * @param unstake whether or not to unstake the Mouse * @return owed - the amount of $CHEDDAR earned */ function _claimMouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Cat */ function _claimCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a Crazy Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Crazy Cat */ function _claimCrazyCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Shack and optionally unstake it * @param tokenId the ID of the Shack to claim earnings from * @param unstake whether or not to unstake the Shack * @return owed - the amount of $CHEDDAR earned */ function _claimHouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { } /** * emergency unstake House tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescueHouse(uint256[] calldata tokenIds) external nonReentrant { } /** ACCOUNTING */ /** * add $CHEDDAR to claimable pot for the Yield * @param amount $CHEDDAR to add to the pot */ function _payCatTax(uint256 amount) internal { } /** * add $CHEDDAR to claimable pot for the Crazy Yield * @param amount $CHEDDAR to add to the pot */ function _payCrazyCatTax(uint256 amount) internal { } /** * tracks $CHEDDAR earnings to ensure it stops once 6,000,000,000‌ is eclipsed */ modifier _updateEarnings() { } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { } function isOwner(uint256 tokenId, address owner) external view override returns (bool) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } /** READ ONLY */ function getOwedForCnM(uint256 tokenId) public view returns (uint256) { } function getOwedForHouse(uint256 tokenId) public view returns (uint256) { } /** * chooses a random Cat thief when a newly minted token is stolen * @param seed a random value to choose a Cat from * @return the owner of the randomly selected Dragon thief */ function randomCatOwner(uint256 seed) external view override returns (address) { } /** * chooses a random Crazy Cat thief when a newly minted token is stolen * @param seed a random value to choose a Dragon from * @return the owner of the randomly selected Dragon thief */ function randomCrazyCatOwner(uint256 seed) external view override returns (address) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } function updateMinimumExit(uint256 _minimum) external onlyOwner { } function updatePeriod(uint256 _period) external onlyOwner { } }
cnmNFT.isClaimable(),"Not all genesis tokens are minted"
306,661
cnmNFT.isClaimable()
"You can't unstake mice until they have 20k $CHEDDAR."
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/ICnMGame.sol"; import "./interfaces/ICnM.sol"; import "./interfaces/ICHEDDAR.sol"; import "./interfaces/IHabitat.sol"; import "./interfaces/IRandomizer.sol"; import "./interfaces/IHouse.sol"; import "./interfaces/IHouseGame.sol"; contract Habitat is IHabitat, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Cat/Mouse uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } // number of Mice stacked uint256 private numMiceStaked; // number of Cat stacked uint256 private numCatStaked; // number of CrazyCat stacked uint256 private numCrazyCatStaked; // number of Shack stacked uint256 private numShackStaked; // number of Ranch stacked uint256 private numRanchStaked; // number of Mansion stacked uint256 private numMansionStaked; uint256 public PERIOD = 1 days; event TokenStaked(address indexed owner, uint256 indexed tokenId, uint8 tokenType, uint256 value); event CatClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event CrazyCatLadyClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event MouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event HouseClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the CnM NFT contract ICnM public cnmNFT; // reference to the House NFT contract IHouse public houseNFT; // reference to the CnM game contract ICnMGame public cnmGame; // reference to the CnM game contract IHouseGame public houseGame; // reference to the $CHEDDAR contract for minting $CHEDDAR earnings ICHEDDAR public cheddarToken; // reference to Randomizer IRandomizer public randomizer; // maps Mouse tokenId to stake mapping(uint256 => Stake) private habitat; // maps House tokenId to stake mapping(uint256 => Stake) private houseYield; // maps Cat tokenId to stake mapping(uint256 => Stake) private yield; // array of Cat token ids; uint256[] private yieldIds; // maps Crazy Lady Cat tokenId to stake mapping(uint256 => Stake) private crazyYield; // array of CrazyCat token ids; uint256[] private crazyYieldIds; // maps houseTokenId to stake // any rewards distributed when no Cats are staked uint256 private unaccountedRewards = 0; // any rewards distributed from House NFTs when no Crazy Cats are staked uint256 private unaccountedCrazyRewards = 0; // amount of $CHEDDAR due for each cat staked uint256 private cheddarPerCat = 0; // amount of $CHEDDAR due for each crazy cat staked uint256 private cheddarPerCrazy = 0; // Mice earn 10,000 $CHEDDAR per day uint256 public constant DAILY_CHEDDAR_RATE = 10000 ether; // Shack: 17,850 Tokens Per Day uint256 public constant DAILY_SHACK_CHEDDAR_RATE = 17850 ether; // Ranch: 30,000 Tokens Per Day uint256 public constant DAILY_RANCH_CHEDDAR_RATE = 30000 ether; // Mansion: 100,000 Tokens Per Day uint256 public constant DAILY_MANSION_CHEDDAR_RATE = 100000 ether; // Mice must have 2 days worth of $CHEDDAR to un-stake or else they're still remaining the habitat uint256 public MINIMUM = 200000 ether; // there will only ever 6,000,000,000 $CHEDDAR earned through staking uint256 public constant MAXIMUM_GLOBAL_CHEDDAR = 6000000000 ether; // // Cats take a 20% tax on all $CHEDDAR claimed // uint256 public constant GP_CLAIM_TAX_PERCENTAGE = 20; // amount of $CHEDDAR earned so far uint256 public totalCHEDDAREarned; // the last time $CHEDDAR was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow un-staking without any checks but without $CHEDDAR bool public rescueEnabled = false; /** */ constructor() { } /** CRITICAL TO SETUP */ modifier requireContractsSet() { } function setContracts(address _cnmNFT, address _cheddar, address _cnmGame, address _houseGame, address _rand, address _houseNFT) external onlyOwner { } /** STAKING */ /** * adds Cats and Mouse * @param account the address of the staker * @param tokenIds the IDs of the Cats and Mouse to stake */ function addManyToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds Houses * @param account the address of the staker * @param tokenIds the IDs of the House token to stake */ function addManyHouseToStakingPool(address account, uint16[] calldata tokenIds) external override nonReentrant { } /** * adds a single Cat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single CrazyCat to the Habitat * @param account the address of the staker * @param tokenId the ID of the Cat/CrazyCat to add to the Staking Pool */ function _addCrazyCatToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** * adds a single Mouse to the habitat * @param account the address of the staker * @param tokenId the ID of the Mouse to add to the Staking Pool */ function _addMouseToStakingPool(address account, uint256 tokenId) internal { } /** * adds a single House to the Habitat * @param account the address of the staker * @param tokenId the ID of the Shack to add to the Staking Pool */ function _addHouseToStakingPool(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { } /** CLAIMING / UNSTAKING */ /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat / Yield * to unstake a Mouse it will require it has 2 days worth of $CHEDDAR unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromHabitatAndYield(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings and optionally unstake tokens from the Habitat * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyHouseFromHabitat(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { } /** * realize $CHEDDAR earnings for a single Mouse and optionally unstake it * if not unstaking, lose x% chance * y% percent of accumulated $CHEDDAR to the staked Cats based on it's roll * if unstaking, there is a % chanc of losing Mouse NFT * @param tokenId the ID of the Mouse to claim earnings from * @param unstake whether or not to unstake the Mouse * @return owed - the amount of $CHEDDAR earned */ function _claimMouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { Stake memory stake = habitat[tokenId]; require(stake.owner == _msgSender(), "Don't own the given token"); owed = getOwedForCnM(tokenId); require(<FILL_ME>) uint256 seed = randomizer.random(); uint256 seedChance = seed >> 16; uint8 mouseRoll = cnmNFT.getTokenRoll(tokenId); if (unstake) { // Chance to lose mouse: // Trashcan: 30% // Cupboard: 20% // Pantry: 10% // Vault: 5% if (mouseRoll == 0) { if ((seed & 0xFFFF) % 100 < 30) { cnmNFT.burn(tokenId); } else { // lose accumulated tokens 50% chance and 60 percent of all token if ((seedChance & 0xFFFF) % 100 < 50) { _payCatTax(owed * 60 / 100); owed = owed * 40 / 100; } } } else if (mouseRoll == 1) { if ((seed & 0xFFFF) % 100 < 20) { cnmNFT.burn(tokenId); } else { // lose accumulated tokens 80% chance and 25 percent of all token if ((seedChance & 0xFFFF) % 100 < 80) { _payCatTax(owed * 25 / 100); owed = owed * 75 / 100; } } } else if (mouseRoll == 2) { if ((seed & 0xFFFF) % 100 < 10) { cnmNFT.burn(tokenId); } else { // lose accumulated tokens 25% chance and 40 percent of all token if ((seedChance & 0xFFFF) % 100 < 25) { _payCatTax(owed * 40 / 100); owed = owed * 60 / 100; } } } else if (mouseRoll == 3) { if ((seed & 0xFFFF) % 100 < 5) { cnmNFT.burn(tokenId); } else { // lose accumulated tokens 20% chance and 25 percent of all token if ((seedChance & 0xFFFF) % 100 < 20) { _payCatTax(owed * 25 / 100); owed = owed * 75 / 100; } } } delete habitat[tokenId]; numMiceStaked -= 1; // reset mouse to trash cnmNFT.setRoll(tokenId, 0); // Always transfer last to guard against reentrance cnmNFT.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // send back Mouse cnmNFT.emitMouseUnStakedEvent(_msgSender(), tokenId); } else {// Claiming if (mouseRoll == 0) { // lose accumulated tokens 50% chance and 60 percent of all token if ((seedChance & 0xFFFF) % 100 < 50) { _payCatTax(owed * 60 / 100); owed = owed * 40 / 100; } } else if (mouseRoll == 1) { // lose accumulated tokens 80% chance and 25 percent of all token if ((seedChance & 0xFFFF) % 100 < 80) { _payCatTax(owed * 25 / 100); owed = owed * 75 / 100; } } else if (mouseRoll == 2) { // lose accumulated tokens 25% chance and 40 percent of all token if ((seedChance & 0xFFFF) % 100 < 25) { _payCatTax(owed * 40 / 100); owed = owed * 60 / 100; } } else if (mouseRoll == 3) { // lose accumulated tokens 20% chance and 25 percent of all token if ((seedChance & 0xFFFF) % 100 < 20) { _payCatTax(owed * 25 / 100); owed = owed * 75 / 100; } } habitat[tokenId] = Stake({ owner : _msgSender(), tokenId : uint16(tokenId), value : uint80(block.timestamp) }); // reset stake } emit MouseClaimed(tokenId, unstake, owed); } /** * realize $CHEDDAR earnings for a single Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Cat */ function _claimCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a Crazy Cat and optionally unstake it * Cats earn $CHEDDAR * @param tokenId the ID of the Cat to claim earnings from * @param unstake whether or not to unstake the Crazy Cat */ function _claimCrazyCatFromYield(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * realize $CHEDDAR earnings for a single Shack and optionally unstake it * @param tokenId the ID of the Shack to claim earnings from * @param unstake whether or not to unstake the Shack * @return owed - the amount of $CHEDDAR earned */ function _claimHouseFromHabitat(uint256 tokenId, bool unstake) internal returns (uint256 owed) { } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { } /** * emergency unstake House tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescueHouse(uint256[] calldata tokenIds) external nonReentrant { } /** ACCOUNTING */ /** * add $CHEDDAR to claimable pot for the Yield * @param amount $CHEDDAR to add to the pot */ function _payCatTax(uint256 amount) internal { } /** * add $CHEDDAR to claimable pot for the Crazy Yield * @param amount $CHEDDAR to add to the pot */ function _payCrazyCatTax(uint256 amount) internal { } /** * tracks $CHEDDAR earnings to ensure it stops once 6,000,000,000‌ is eclipsed */ modifier _updateEarnings() { } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { } function isOwner(uint256 tokenId, address owner) external view override returns (bool) { } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { } /** READ ONLY */ function getOwedForCnM(uint256 tokenId) public view returns (uint256) { } function getOwedForHouse(uint256 tokenId) public view returns (uint256) { } /** * chooses a random Cat thief when a newly minted token is stolen * @param seed a random value to choose a Cat from * @return the owner of the randomly selected Dragon thief */ function randomCatOwner(uint256 seed) external view override returns (address) { } /** * chooses a random Crazy Cat thief when a newly minted token is stolen * @param seed a random value to choose a Dragon from * @return the owner of the randomly selected Dragon thief */ function randomCrazyCatOwner(uint256 seed) external view override returns (address) { } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { } function updateMinimumExit(uint256 _minimum) external onlyOwner { } function updatePeriod(uint256 _period) external onlyOwner { } }
!(unstake&&owed<MINIMUM),"You can't unstake mice until they have 20k $CHEDDAR."
306,661
!(unstake&&owed<MINIMUM)
'payment currency must be the native token'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './ChainlinkConversionPath.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; /** * @title EthConversionProxy * @notice This contract converts from chainlink then swaps ETH (or native token) * before paying a request thanks to a conversion payment proxy. * The inheritance from ReentrancyGuard is required to perform * "transferExactEthWithReferenceAndFee" on the eth-fee-proxy contract */ contract EthConversionProxy is ReentrancyGuard { address public paymentProxy; ChainlinkConversionPath public chainlinkConversionPath; address public nativeTokenHash; constructor( address _paymentProxyAddress, address _chainlinkConversionPathAddress, address _nativeTokenHash ) { } // Event to declare a conversion with a reference event TransferWithConversionAndReference( uint256 amount, address currency, bytes indexed paymentReference, uint256 feeAmount, uint256 maxRateTimespan ); // Event to declare a transfer with a reference // This event is emitted by this contract from a delegate call of the payment-proxy event TransferWithReferenceAndFee( address to, uint256 amount, bytes indexed paymentReference, uint256 feeAmount, address feeAddress ); /** * @notice Performs an ETH transfer with a reference computing the payment amount based on the request amount * @param _to Transfer recipient of the payement * @param _requestAmount Request amount * @param _path Conversion path * @param _paymentReference Reference of the payment related * @param _feeAmount The amount of the payment fee * @param _feeAddress The fee recipient * @param _maxRateTimespan Max time span with the oldestrate, ignored if zero */ function transferWithReferenceAndFee( address _to, uint256 _requestAmount, address[] calldata _path, bytes calldata _paymentReference, uint256 _feeAmount, address _feeAddress, uint256 _maxRateTimespan ) external payable { require(<FILL_ME>) (uint256 amountToPay, uint256 amountToPayInFees) = getConversions( _path, _requestAmount, _feeAmount, _maxRateTimespan ); // Pay the request and fees (bool status, ) = paymentProxy.delegatecall( abi.encodeWithSignature( 'transferExactEthWithReferenceAndFee(address,uint256,bytes,uint256,address)', _to, amountToPay, _paymentReference, amountToPayInFees, _feeAddress ) ); require(status, 'paymentProxy transferExactEthWithReferenceAndFee failed'); // Event to declare a transfer with a reference emit TransferWithConversionAndReference( _requestAmount, // request currency _path[0], _paymentReference, _feeAmount, _maxRateTimespan ); } function getConversions( address[] memory _path, uint256 _requestAmount, uint256 _feeAmount, uint256 _maxRateTimespan ) internal view returns (uint256 amountToPay, uint256 amountToPayInFees) { } }
_path[_path.length-1]==nativeTokenHash,'payment currency must be the native token'
306,843
_path[_path.length-1]==nativeTokenHash
"_account is not blacklisted"
pragma solidity 0.5.13; contract CompliantDepositTokenWithHook is ReclaimerToken, RegistryClone, BurnableTokenWithBounds, GasRefundToken { bytes32 constant IS_REGISTERED_CONTRACT = "isRegisteredContract"; bytes32 constant IS_DEPOSIT_ADDRESS = "isDepositAddress"; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; bytes32 constant IS_BLACKLISTED = "isBlacklisted"; function canBurn() internal pure returns (bytes32); /** * @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 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) { } function _burnFromAllowanceAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _burnFromAllArgs(address _from, address _to, uint256 _value) internal { } function _transferFromAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _transferAllArgs(address _from, address _to, uint256 _value) internal { } function mint(address _to, uint256 _value) public onlyOwner { } event WipeBlacklistedAccount(address indexed account, uint256 balance); event SetRegistry(address indexed registry); /** * @dev Point to the registry that contains all compliance related data @param _registry The address of the registry instance */ function setRegistry(Registry _registry) public onlyOwner { } modifier onlyRegistry { } function syncAttributeValue(address _who, bytes32 _attribute, uint256 _value) public onlyRegistry { } function _burnAllArgs(address _from, uint256 _value) internal { } // Destroy the tokens owned by a blacklisted account function wipeBlacklistedAccount(address _account) public onlyOwner { require(<FILL_ME>) uint256 oldValue = _getBalance(_account); _setBalance(_account, 0); totalSupply_ = totalSupply_.sub(oldValue); emit WipeBlacklistedAccount(_account, oldValue); emit Transfer(_account, address(0), oldValue); } function _isBlacklisted(address _account) internal view returns (bool blacklisted) { } function _requireCanTransfer(address _from, address _to) internal view returns (address, bool) { } function _requireCanTransferFrom(address _spender, address _from, address _to) internal view returns (address, bool) { } function _requireCanMint(address _to) internal view returns (address, bool) { } function _requireOnlyCanBurn(address _from) internal view { } function _requireCanBurn(address _from) internal view { } function paused() public pure returns (bool) { } }
_isBlacklisted(_account),"_account is not blacklisted"
306,889
_isBlacklisted(_account)
"blacklisted"
pragma solidity 0.5.13; contract CompliantDepositTokenWithHook is ReclaimerToken, RegistryClone, BurnableTokenWithBounds, GasRefundToken { bytes32 constant IS_REGISTERED_CONTRACT = "isRegisteredContract"; bytes32 constant IS_DEPOSIT_ADDRESS = "isDepositAddress"; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; bytes32 constant IS_BLACKLISTED = "isBlacklisted"; function canBurn() internal pure returns (bytes32); /** * @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 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) { } function _burnFromAllowanceAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _burnFromAllArgs(address _from, address _to, uint256 _value) internal { } function _transferFromAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _transferAllArgs(address _from, address _to, uint256 _value) internal { } function mint(address _to, uint256 _value) public onlyOwner { } event WipeBlacklistedAccount(address indexed account, uint256 balance); event SetRegistry(address indexed registry); /** * @dev Point to the registry that contains all compliance related data @param _registry The address of the registry instance */ function setRegistry(Registry _registry) public onlyOwner { } modifier onlyRegistry { } function syncAttributeValue(address _who, bytes32 _attribute, uint256 _value) public onlyRegistry { } function _burnAllArgs(address _from, uint256 _value) internal { } // Destroy the tokens owned by a blacklisted account function wipeBlacklistedAccount(address _account) public onlyOwner { } function _isBlacklisted(address _account) internal view returns (bool blacklisted) { } function _requireCanTransfer(address _from, address _to) internal view returns (address, bool) { uint256 depositAddressValue = attributes[IS_DEPOSIT_ADDRESS][address(uint256(_to) >> 20)]; if (depositAddressValue != 0) { _to = address(depositAddressValue); } require(<FILL_ME>) require (attributes[IS_BLACKLISTED][_from] == 0, "blacklisted"); return (_to, attributes[IS_REGISTERED_CONTRACT][_to] != 0); } function _requireCanTransferFrom(address _spender, address _from, address _to) internal view returns (address, bool) { } function _requireCanMint(address _to) internal view returns (address, bool) { } function _requireOnlyCanBurn(address _from) internal view { } function _requireCanBurn(address _from) internal view { } function paused() public pure returns (bool) { } }
attributes[IS_BLACKLISTED][_to]==0,"blacklisted"
306,889
attributes[IS_BLACKLISTED][_to]==0
"blacklisted"
pragma solidity 0.5.13; contract CompliantDepositTokenWithHook is ReclaimerToken, RegistryClone, BurnableTokenWithBounds, GasRefundToken { bytes32 constant IS_REGISTERED_CONTRACT = "isRegisteredContract"; bytes32 constant IS_DEPOSIT_ADDRESS = "isDepositAddress"; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; bytes32 constant IS_BLACKLISTED = "isBlacklisted"; function canBurn() internal pure returns (bytes32); /** * @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 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) { } function _burnFromAllowanceAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _burnFromAllArgs(address _from, address _to, uint256 _value) internal { } function _transferFromAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _transferAllArgs(address _from, address _to, uint256 _value) internal { } function mint(address _to, uint256 _value) public onlyOwner { } event WipeBlacklistedAccount(address indexed account, uint256 balance); event SetRegistry(address indexed registry); /** * @dev Point to the registry that contains all compliance related data @param _registry The address of the registry instance */ function setRegistry(Registry _registry) public onlyOwner { } modifier onlyRegistry { } function syncAttributeValue(address _who, bytes32 _attribute, uint256 _value) public onlyRegistry { } function _burnAllArgs(address _from, uint256 _value) internal { } // Destroy the tokens owned by a blacklisted account function wipeBlacklistedAccount(address _account) public onlyOwner { } function _isBlacklisted(address _account) internal view returns (bool blacklisted) { } function _requireCanTransfer(address _from, address _to) internal view returns (address, bool) { uint256 depositAddressValue = attributes[IS_DEPOSIT_ADDRESS][address(uint256(_to) >> 20)]; if (depositAddressValue != 0) { _to = address(depositAddressValue); } require (attributes[IS_BLACKLISTED][_to] == 0, "blacklisted"); require(<FILL_ME>) return (_to, attributes[IS_REGISTERED_CONTRACT][_to] != 0); } function _requireCanTransferFrom(address _spender, address _from, address _to) internal view returns (address, bool) { } function _requireCanMint(address _to) internal view returns (address, bool) { } function _requireOnlyCanBurn(address _from) internal view { } function _requireCanBurn(address _from) internal view { } function paused() public pure returns (bool) { } }
attributes[IS_BLACKLISTED][_from]==0,"blacklisted"
306,889
attributes[IS_BLACKLISTED][_from]==0
"blacklisted"
pragma solidity 0.5.13; contract CompliantDepositTokenWithHook is ReclaimerToken, RegistryClone, BurnableTokenWithBounds, GasRefundToken { bytes32 constant IS_REGISTERED_CONTRACT = "isRegisteredContract"; bytes32 constant IS_DEPOSIT_ADDRESS = "isDepositAddress"; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; bytes32 constant IS_BLACKLISTED = "isBlacklisted"; function canBurn() internal pure returns (bytes32); /** * @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 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) { } function _burnFromAllowanceAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _burnFromAllArgs(address _from, address _to, uint256 _value) internal { } function _transferFromAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _transferAllArgs(address _from, address _to, uint256 _value) internal { } function mint(address _to, uint256 _value) public onlyOwner { } event WipeBlacklistedAccount(address indexed account, uint256 balance); event SetRegistry(address indexed registry); /** * @dev Point to the registry that contains all compliance related data @param _registry The address of the registry instance */ function setRegistry(Registry _registry) public onlyOwner { } modifier onlyRegistry { } function syncAttributeValue(address _who, bytes32 _attribute, uint256 _value) public onlyRegistry { } function _burnAllArgs(address _from, uint256 _value) internal { } // Destroy the tokens owned by a blacklisted account function wipeBlacklistedAccount(address _account) public onlyOwner { } function _isBlacklisted(address _account) internal view returns (bool blacklisted) { } function _requireCanTransfer(address _from, address _to) internal view returns (address, bool) { } function _requireCanTransferFrom(address _spender, address _from, address _to) internal view returns (address, bool) { require(<FILL_ME>) uint256 depositAddressValue = attributes[IS_DEPOSIT_ADDRESS][address(uint256(_to) >> 20)]; if (depositAddressValue != 0) { _to = address(depositAddressValue); } require (attributes[IS_BLACKLISTED][_to] == 0, "blacklisted"); require (attributes[IS_BLACKLISTED][_from] == 0, "blacklisted"); return (_to, attributes[IS_REGISTERED_CONTRACT][_to] != 0); } function _requireCanMint(address _to) internal view returns (address, bool) { } function _requireOnlyCanBurn(address _from) internal view { } function _requireCanBurn(address _from) internal view { } function paused() public pure returns (bool) { } }
attributes[IS_BLACKLISTED][_spender]==0,"blacklisted"
306,889
attributes[IS_BLACKLISTED][_spender]==0
"cannot burn from this address"
pragma solidity 0.5.13; contract CompliantDepositTokenWithHook is ReclaimerToken, RegistryClone, BurnableTokenWithBounds, GasRefundToken { bytes32 constant IS_REGISTERED_CONTRACT = "isRegisteredContract"; bytes32 constant IS_DEPOSIT_ADDRESS = "isDepositAddress"; uint256 constant REDEMPTION_ADDRESS_COUNT = 0x100000; bytes32 constant IS_BLACKLISTED = "isBlacklisted"; function canBurn() internal pure returns (bytes32); /** * @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 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) { } function _burnFromAllowanceAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _burnFromAllArgs(address _from, address _to, uint256 _value) internal { } function _transferFromAllArgs(address _from, address _to, uint256 _value, address _spender) internal { } function _transferAllArgs(address _from, address _to, uint256 _value) internal { } function mint(address _to, uint256 _value) public onlyOwner { } event WipeBlacklistedAccount(address indexed account, uint256 balance); event SetRegistry(address indexed registry); /** * @dev Point to the registry that contains all compliance related data @param _registry The address of the registry instance */ function setRegistry(Registry _registry) public onlyOwner { } modifier onlyRegistry { } function syncAttributeValue(address _who, bytes32 _attribute, uint256 _value) public onlyRegistry { } function _burnAllArgs(address _from, uint256 _value) internal { } // Destroy the tokens owned by a blacklisted account function wipeBlacklistedAccount(address _account) public onlyOwner { } function _isBlacklisted(address _account) internal view returns (bool blacklisted) { } function _requireCanTransfer(address _from, address _to) internal view returns (address, bool) { } function _requireCanTransferFrom(address _spender, address _from, address _to) internal view returns (address, bool) { } function _requireCanMint(address _to) internal view returns (address, bool) { } function _requireOnlyCanBurn(address _from) internal view { require(<FILL_ME>) } function _requireCanBurn(address _from) internal view { } function paused() public pure returns (bool) { } }
attributes[canBurn()][_from]!=0,"cannot burn from this address"
306,889
attributes[canBurn()][_from]!=0
"the sender is not approved"
// SPDX-License-Identifier: OSL-3.0 pragma solidity 0.8.11; /* __ __ __ __ ______ ______ __ __ __ ______ /\ \/\ \ /\ \/ / /\ == \ /\ __ \ /\ \ /\ "-.\ \ /\ ___\ \ \ \_\ \ \ \ _"-. \ \ __< \ \ __ \ \ \ \ \ \ \-. \ \ \ __\ \ \_____\ \ \_\ \_\ \ \_\ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_____\ \/_____/ \/_/\/_/ \/_/ /_/ \/_/\/_/ \/_/ \/_/ \/_/ \/_____/ |########################################################################| |########################################################################| |########################################################################| |########################################################################| |########################################################################| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| Pussy Riot, Trippy Labs, PleasrDAO, CXIP */ contract UkraineDAO_NFT { address private _owner; string private _name = "UKRAINE"; string private _symbol = unicode"🇺🇦"; string private _domain = "UkraineDAO.love"; address private _tokenOwner; address private _tokenApproval; string private _flag = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"800\">" "<rect width=\"1200\" height=\"800\" fill=\"#005BBB\"/>" "<rect width=\"1200\" height=\"400\" y=\"400\" fill=\"#FFD500\"/>" "</svg>"; string private _flagSafe = "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"1200\\\" height=\\\"800\\\">" "<rect width=\\\"1200\\\" height=\\\"800\\\" fill=\\\"#005BBB\\\"/>" "<rect width=\\\"1200\\\" height=\\\"400\\\" y=\\\"400\\\" fill=\\\"#FFD500\\\"/>" "</svg>"; mapping(address => mapping(address => bool)) private _operatorApprovals; event Approval (address indexed wallet, address indexed operator, uint256 indexed tokenId); event ApprovalForAll (address indexed wallet, address indexed operator, bool approved); event Transfer (address indexed from, address indexed to, uint256 indexed tokenId); event OwnershipTransferred (address indexed previousOwner, address indexed newOwner); /* * @dev Only one NFT is ever created. */ constructor(address contractOwner) { } /* * @dev Left empty to not block any smart contract transfers from running out of gas. */ receive() external payable {} /* * @dev Left empty to not allow any other functions to be called. */ fallback() external {} /* * @dev Allows to limit certain function calls to only the contract owner. */ modifier onlyOwner() { } /* * @dev Can transfer smart contract ownership to another wallet/smart contract. */ function changeOwner (address newOwner) public onlyOwner { } /* * @dev Provisional functionality to allow the removal of any spammy NFTs. */ function withdrawERC1155 (address token, uint256 tokenId, uint256 amount) public onlyOwner { } /* * @dev Provisional functionality to allow the withdrawal of accidentally received ERC20 tokens. */ function withdrawERC20 (address token, uint256 amount) public onlyOwner { } /* * @dev Provisional functionality to allow the removal of any spammy NFTs. */ function withdrawERC721 (address token, uint256 tokenId) public onlyOwner { } /* * @dev Provisional functionality to allow the withdrawal of accidentally received ETH. */ function withdrawETH () public onlyOwner { } /* * @dev Approve a third-party wallet/contract to manage the token on behalf of a token owner. */ function approve (address operator, uint256 tokenId) public { require(operator != _tokenOwner, "one cannot approve one self"); require(<FILL_ME>) _tokenApproval = operator; emit Approval(_tokenOwner, operator, tokenId); } /* * @dev Safely transfer a token to another wallet/contract. */ function safeTransferFrom (address from, address to, uint256 tokenId) public payable { } /* * @dev Safely transfer a token to another wallet/contract. */ function safeTransferFrom (address from, address to, uint256 tokenId, bytes memory data) public payable { } /* * @dev Approve a third-party wallet/contract to manage all tokens on behalf of a token owner. */ function setApprovalForAll (address operator, bool approved) public { } /* * @dev Transfer a token to anther wallet/contract. */ function transfer (address to, uint256 tokenId) public payable { } /* * @dev Transfer a token to another wallet/contract. */ function transferFrom (address from, address to, uint256 tokenId) public payable { } /* * @dev Transfer a token to another wallet/contract. */ function transferFrom (address from, address to, uint256 tokenId, bytes memory) public payable { } /* * @dev Gets the token balance of a wallet/contract. */ function balanceOf (address wallet) public view returns (uint256) { } /* * @dev Gets the base64 encoded JSON data stream of contract descriptors. */ function contractURI () public view returns (string memory) { } /* * @dev Check if a token exists. */ function exists (uint256 tokenId) public pure returns (bool) { } /* * @dev Check if an approved wallet/address was added for a particular token. */ function getApproved (uint256) public view returns (address) { } /* * @dev Check if an operator was approved for a particular wallet/contract. */ function isApprovedForAll (address wallet, address operator) public view returns (bool) { } /* * @dev Check if current wallet/caller is the owner of the smart contract. */ function isOwner () public view returns (bool) { } /* * @dev Get the name of the collection. */ function name () public view returns (string memory) { } /* * @dev Get the owner of the smart contract. */ function owner () public view returns (address) { } /* * @dev Get the owner of a particular token. */ function ownerOf (uint256 tokenId) public view returns (address) { } /* * @dev Check if the smart contract supports a particular interface. */ function supportsInterface (bytes4 interfaceId) public pure returns (bool) { } /* * @dev Get the collection's symbol. */ function symbol () public view returns (string memory) { } /* * @dev Get token by index. */ function tokenByIndex (uint256 index) public pure returns (uint256) { } /* * @dev Get wallet/contract token by index. */ function tokenOfOwnerByIndex (address wallet, uint256 index) public view returns (uint256) { } /* * @dev Gets the base64 encoded data stream of token. */ function tokenURI (uint256 tokenId) public view returns (string memory) { } /* * @dev Get list of all tokens of an owner. */ function tokensOfOwner (address wallet) public view returns (uint256[] memory tokens) { } /* * @dev Get the total supply of tokens in the collection. */ function totalSupply () public pure returns (uint256) { } /* * @dev Signal to sending contract that a token was received. */ function onERC721Received (address operator, address, uint256 tokenId, bytes calldata) public returns (bytes4) { } function _clearApproval () internal { } function _mint (address to, uint256 tokenId) internal { } function _transferFrom (address from, address to, uint256 tokenId) internal { } function _exists (uint256 tokenId) internal pure returns (bool) { } function _isApproved (address spender, uint256 tokenId) internal view returns (bool) { } function isContract (address account) internal view returns (bool) { } } interface ERCTransferable { // ERC155 function safeTransferFrom (address from, address to, uint256 tokenid, uint256 amount, bytes calldata data) external; // ERC20 function transfer (address recipient, uint256 amount) external returns (bool); // ERC721 function safeTransferFrom (address from, address to, uint256 tokenId) external payable; // ERC721 function onERC721Received (address operator, address from, uint256 tokenId, bytes calldata data) external view returns (bytes4); // ERC721 function supportsInterface (bytes4 interfaceId) external view returns (bool); } library Base64 { function encode (string memory _str) internal pure returns (string memory) { } function encode (bytes memory data) internal pure returns (string memory) { } }
_isApproved(msg.sender,tokenId),"the sender is not approved"
307,036
_isApproved(msg.sender,tokenId)
"onERC721Received has failed"
// SPDX-License-Identifier: OSL-3.0 pragma solidity 0.8.11; /* __ __ __ __ ______ ______ __ __ __ ______ /\ \/\ \ /\ \/ / /\ == \ /\ __ \ /\ \ /\ "-.\ \ /\ ___\ \ \ \_\ \ \ \ _"-. \ \ __< \ \ __ \ \ \ \ \ \ \-. \ \ \ __\ \ \_____\ \ \_\ \_\ \ \_\ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_____\ \/_____/ \/_/\/_/ \/_/ /_/ \/_/\/_/ \/_/ \/_/ \/_/ \/_____/ |########################################################################| |########################################################################| |########################################################################| |########################################################################| |########################################################################| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| |::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| Pussy Riot, Trippy Labs, PleasrDAO, CXIP */ contract UkraineDAO_NFT { address private _owner; string private _name = "UKRAINE"; string private _symbol = unicode"🇺🇦"; string private _domain = "UkraineDAO.love"; address private _tokenOwner; address private _tokenApproval; string private _flag = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"800\">" "<rect width=\"1200\" height=\"800\" fill=\"#005BBB\"/>" "<rect width=\"1200\" height=\"400\" y=\"400\" fill=\"#FFD500\"/>" "</svg>"; string private _flagSafe = "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"1200\\\" height=\\\"800\\\">" "<rect width=\\\"1200\\\" height=\\\"800\\\" fill=\\\"#005BBB\\\"/>" "<rect width=\\\"1200\\\" height=\\\"400\\\" y=\\\"400\\\" fill=\\\"#FFD500\\\"/>" "</svg>"; mapping(address => mapping(address => bool)) private _operatorApprovals; event Approval (address indexed wallet, address indexed operator, uint256 indexed tokenId); event ApprovalForAll (address indexed wallet, address indexed operator, bool approved); event Transfer (address indexed from, address indexed to, uint256 indexed tokenId); event OwnershipTransferred (address indexed previousOwner, address indexed newOwner); /* * @dev Only one NFT is ever created. */ constructor(address contractOwner) { } /* * @dev Left empty to not block any smart contract transfers from running out of gas. */ receive() external payable {} /* * @dev Left empty to not allow any other functions to be called. */ fallback() external {} /* * @dev Allows to limit certain function calls to only the contract owner. */ modifier onlyOwner() { } /* * @dev Can transfer smart contract ownership to another wallet/smart contract. */ function changeOwner (address newOwner) public onlyOwner { } /* * @dev Provisional functionality to allow the removal of any spammy NFTs. */ function withdrawERC1155 (address token, uint256 tokenId, uint256 amount) public onlyOwner { } /* * @dev Provisional functionality to allow the withdrawal of accidentally received ERC20 tokens. */ function withdrawERC20 (address token, uint256 amount) public onlyOwner { } /* * @dev Provisional functionality to allow the removal of any spammy NFTs. */ function withdrawERC721 (address token, uint256 tokenId) public onlyOwner { } /* * @dev Provisional functionality to allow the withdrawal of accidentally received ETH. */ function withdrawETH () public onlyOwner { } /* * @dev Approve a third-party wallet/contract to manage the token on behalf of a token owner. */ function approve (address operator, uint256 tokenId) public { } /* * @dev Safely transfer a token to another wallet/contract. */ function safeTransferFrom (address from, address to, uint256 tokenId) public payable { } /* * @dev Safely transfer a token to another wallet/contract. */ function safeTransferFrom (address from, address to, uint256 tokenId, bytes memory data) public payable { require(_isApproved(msg.sender, tokenId), "sender is not approved"); _transferFrom(from, to, tokenId); if (isContract(to) && ERCTransferable(to).supportsInterface(0x150b7a02)) { require(<FILL_ME>) } } /* * @dev Approve a third-party wallet/contract to manage all tokens on behalf of a token owner. */ function setApprovalForAll (address operator, bool approved) public { } /* * @dev Transfer a token to anther wallet/contract. */ function transfer (address to, uint256 tokenId) public payable { } /* * @dev Transfer a token to another wallet/contract. */ function transferFrom (address from, address to, uint256 tokenId) public payable { } /* * @dev Transfer a token to another wallet/contract. */ function transferFrom (address from, address to, uint256 tokenId, bytes memory) public payable { } /* * @dev Gets the token balance of a wallet/contract. */ function balanceOf (address wallet) public view returns (uint256) { } /* * @dev Gets the base64 encoded JSON data stream of contract descriptors. */ function contractURI () public view returns (string memory) { } /* * @dev Check if a token exists. */ function exists (uint256 tokenId) public pure returns (bool) { } /* * @dev Check if an approved wallet/address was added for a particular token. */ function getApproved (uint256) public view returns (address) { } /* * @dev Check if an operator was approved for a particular wallet/contract. */ function isApprovedForAll (address wallet, address operator) public view returns (bool) { } /* * @dev Check if current wallet/caller is the owner of the smart contract. */ function isOwner () public view returns (bool) { } /* * @dev Get the name of the collection. */ function name () public view returns (string memory) { } /* * @dev Get the owner of the smart contract. */ function owner () public view returns (address) { } /* * @dev Get the owner of a particular token. */ function ownerOf (uint256 tokenId) public view returns (address) { } /* * @dev Check if the smart contract supports a particular interface. */ function supportsInterface (bytes4 interfaceId) public pure returns (bool) { } /* * @dev Get the collection's symbol. */ function symbol () public view returns (string memory) { } /* * @dev Get token by index. */ function tokenByIndex (uint256 index) public pure returns (uint256) { } /* * @dev Get wallet/contract token by index. */ function tokenOfOwnerByIndex (address wallet, uint256 index) public view returns (uint256) { } /* * @dev Gets the base64 encoded data stream of token. */ function tokenURI (uint256 tokenId) public view returns (string memory) { } /* * @dev Get list of all tokens of an owner. */ function tokensOfOwner (address wallet) public view returns (uint256[] memory tokens) { } /* * @dev Get the total supply of tokens in the collection. */ function totalSupply () public pure returns (uint256) { } /* * @dev Signal to sending contract that a token was received. */ function onERC721Received (address operator, address, uint256 tokenId, bytes calldata) public returns (bytes4) { } function _clearApproval () internal { } function _mint (address to, uint256 tokenId) internal { } function _transferFrom (address from, address to, uint256 tokenId) internal { } function _exists (uint256 tokenId) internal pure returns (bool) { } function _isApproved (address spender, uint256 tokenId) internal view returns (bool) { } function isContract (address account) internal view returns (bool) { } } interface ERCTransferable { // ERC155 function safeTransferFrom (address from, address to, uint256 tokenid, uint256 amount, bytes calldata data) external; // ERC20 function transfer (address recipient, uint256 amount) external returns (bool); // ERC721 function safeTransferFrom (address from, address to, uint256 tokenId) external payable; // ERC721 function onERC721Received (address operator, address from, uint256 tokenId, bytes calldata data) external view returns (bytes4); // ERC721 function supportsInterface (bytes4 interfaceId) external view returns (bool); } library Base64 { function encode (string memory _str) internal pure returns (string memory) { } function encode (bytes memory data) internal pure returns (string memory) { } }
ERCTransferable(to).onERC721Received(address(this),from,tokenId,data)==0x150b7a02,"onERC721Received has failed"
307,036
ERCTransferable(to).onERC721Received(address(this),from,tokenId,data)==0x150b7a02
null
pragma solidity ^0.8.0; contract SmallPotato is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; string public baseURI; uint256 public price = 0.08 ether; uint256 public maxSupply = 111; uint256 public maxMintAmount = 12; bool private paused = false; address public creator1 = 0x52Ed5486a5848683dCE9b9403eDE9Ec3b56BE1b7; address public creator2 = 0x43Bd2A1735fFc5a08d385c9c424B1850D4c31D9D; constructor(string memory _initBaseURI) ERC721("Small Potato NFT", "TATO") { } function _baseURI() internal view virtual override returns (string memory) { } function harvestPotato(address _to, uint256 _mintAmount) public payable { } function tokensOwnedByAddress(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function changeC1Addr(address _newAddr) public onlyOwner { } function changeC2Addr(address _newAddr) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMaxSupply(uint256 newMaxSupply) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { uint256 balance = address(this).balance; require(balance > 0); require(<FILL_ME>) require(payable(creator1).send(address(this).balance)); } }
payable(creator2).send(balance.mul(30).div(100))
307,057
payable(creator2).send(balance.mul(30).div(100))
null
pragma solidity ^0.8.0; contract SmallPotato is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; string public baseURI; uint256 public price = 0.08 ether; uint256 public maxSupply = 111; uint256 public maxMintAmount = 12; bool private paused = false; address public creator1 = 0x52Ed5486a5848683dCE9b9403eDE9Ec3b56BE1b7; address public creator2 = 0x43Bd2A1735fFc5a08d385c9c424B1850D4c31D9D; constructor(string memory _initBaseURI) ERC721("Small Potato NFT", "TATO") { } function _baseURI() internal view virtual override returns (string memory) { } function harvestPotato(address _to, uint256 _mintAmount) public payable { } function tokensOwnedByAddress(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function changeC1Addr(address _newAddr) public onlyOwner { } function changeC2Addr(address _newAddr) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMaxSupply(uint256 newMaxSupply) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { uint256 balance = address(this).balance; require(balance > 0); require(payable(creator2).send(balance.mul(30).div(100))); require(<FILL_ME>) } }
payable(creator1).send(address(this).balance)
307,057
payable(creator1).send(address(this).balance)
"sender is not an admin"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { require(<FILL_ME>) _; } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
_isOwner(msg.sender)||isAdmin(msg.sender),"sender is not an admin"
307,121
_isOwner(msg.sender)||isAdmin(msg.sender)
"controller is stopped"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { require(<FILL_ME>) _; } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
!isStopped(),"controller is stopped"
307,121
!isStopped()
"provided account is already an admin"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { require(<FILL_ME>) require(!_isController[_account], "provided account is already a controller"); require(!_isOwner(_account), "provided account is already the owner"); require(_account != address(0), "provided account is the zero address"); _isAdmin[_account] = true; _adminCount++; emit AddedAdmin(msg.sender, _account); } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
!_isAdmin[_account],"provided account is already an admin"
307,121
!_isAdmin[_account]
"provided account is already a controller"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { require(!_isAdmin[_account], "provided account is already an admin"); require(<FILL_ME>) require(!_isOwner(_account), "provided account is already the owner"); require(_account != address(0), "provided account is the zero address"); _isAdmin[_account] = true; _adminCount++; emit AddedAdmin(msg.sender, _account); } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
!_isController[_account],"provided account is already a controller"
307,121
!_isController[_account]
"provided account is already the owner"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { require(!_isAdmin[_account], "provided account is already an admin"); require(!_isController[_account], "provided account is already a controller"); require(<FILL_ME>) require(_account != address(0), "provided account is the zero address"); _isAdmin[_account] = true; _adminCount++; emit AddedAdmin(msg.sender, _account); } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
!_isOwner(_account),"provided account is already the owner"
307,121
!_isOwner(_account)
"provided account is not an admin"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { require(<FILL_ME>) _isAdmin[_account] = false; _adminCount--; emit RemovedAdmin(msg.sender, _account); } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
_isAdmin[_account],"provided account is not an admin"
307,121
_isAdmin[_account]
"provided account is not a controller"
/** * Controller - The Consumer Contract Wallet * Copyright (C) 2019 The Contract Wallet Company Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ pragma solidity ^0.5.10; /// @title The IController interface provides access to the isController and isAdmin checks. interface IController { function isController(address) external view returns (bool); function isAdmin(address) external view returns (bool); } /// @title Controller stores a list of controller addresses that can be used for authentication in other contracts. /// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers. /// @dev Owner can change the Admins /// @dev Admins and can the Controllers /// @dev Controllers are used by the application. contract Controller is IController, Ownable, Transferrable { event AddedController(address _sender, address _controller); event RemovedController(address _sender, address _controller); event AddedAdmin(address _sender, address _admin); event RemovedAdmin(address _sender, address _admin); event Claimed(address _to, address _asset, uint _amount); event Stopped(address _sender); event Started(address _sender); mapping (address => bool) private _isAdmin; uint private _adminCount; mapping (address => bool) private _isController; uint private _controllerCount; bool private _stopped; /// @notice Constructor initializes the owner with the provided address. /// @param _ownerAddress_ address of the owner. constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {} /// @notice Checks if message sender is an admin. modifier onlyAdmin() { } /// @notice Check if Owner or Admin modifier onlyAdminOrOwner() { } /// @notice Check if controller is stopped modifier notStopped() { } /// @notice Add a new admin to the list of admins. /// @param _account address to add to the list of admins. function addAdmin(address _account) external onlyOwner notStopped { } /// @notice Remove a admin from the list of admins. /// @param _account address to remove from the list of admins. function removeAdmin(address _account) external onlyOwner { } /// @return the current number of admins. function adminCount() external view returns (uint) { } /// @notice Add a new controller to the list of controllers. /// @param _account address to add to the list of controllers. function addController(address _account) external onlyAdminOrOwner notStopped { } /// @notice Remove a controller from the list of controllers. /// @param _account address to remove from the list of controllers. function removeController(address _account) external onlyAdminOrOwner { } /// @notice count the Controllers /// @return the current number of controllers. function controllerCount() external view returns (uint) { } /// @notice is an address an Admin? /// @return true if the provided account is an admin. function isAdmin(address _account) public view notStopped returns (bool) { } /// @notice is an address a Controller? /// @return true if the provided account is a controller. function isController(address _account) public view notStopped returns (bool) { } /// @notice this function can be used to see if the controller has been stopped /// @return true is the Controller has been stopped function isStopped() public view returns (bool) { } /// @notice Internal-only function that adds a new admin. function _addAdmin(address _account) private { } /// @notice Internal-only function that removes an existing admin. function _removeAdmin(address _account) private { } /// @notice Internal-only function that adds a new controller. function _addController(address _account) private { } /// @notice Internal-only function that removes an existing controller. function _removeController(address _account) private { require(<FILL_ME>) _isController[_account] = false; _controllerCount--; emit RemovedController(msg.sender, _account); } /// @notice stop our controllers and admins from being useable function stop() external onlyAdminOrOwner { } /// @notice start our controller again function start() external onlyOwner { } //// @notice Withdraw tokens from the smart contract to the specified account. function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped { } }
_isController[_account],"provided account is not a controller"
307,121
_isController[_account]
"MONO: cap exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Snapshot.sol"; import "hardhat/console.sol"; contract MonoToken is ERC20, Ownable, AccessControl, ERC20Snapshot { using SafeMath for uint256; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 public cap; address public childChainManagerProxy; constructor ( string memory _name, string memory _symbol, uint256 _cap ) ERC20(_name, _symbol) { } function setMinter(address _minter) public onlyOwner { } function mint(address _to, uint256 _amount) public { require(hasRole(MINTER_ROLE, msg.sender), "MONO: caller is not a minter"); require(<FILL_ME>) _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); } // being proxified smart contract, most probably childChainManagerProxy contract's address // is not going to change ever, but still, lets keep it function updateChildChainManager(address newChildChainManagerProxy) external onlyOwner { } function deposit(address user, bytes calldata depositData) external { } function withdraw(uint256 amount) external { } function snapshot() external onlyOwner returns (uint256 currentId) { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Snapshot) { } // @notice A record of each accounts delegate mapping (address => address) internal _delegates; // @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint256 votes; } // @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; // @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; // @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); // @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); // @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; // @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */ function delegates(address delegator) external view returns (address) { } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) external { } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint256) { } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { } function _delegate(address delegator, address delegatee) internal { } function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { } function _writeCheckpoint( address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes ) internal { } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { } function getChainId() internal pure returns (uint) { } }
_amount.add(totalSupply())<=cap,"MONO: cap exceeded"
307,173
_amount.add(totalSupply())<=cap
null
contract ProxyData { address internal proxied; } contract Proxy is ProxyData { constructor(address _proxied) public { } function () external payable { } } contract UniswapFactoryInterface { // Public Variables address public exchangeTemplate; uint256 public tokenCount; // Create Exchange function createExchange(address token) external returns (address exchange); // Get Exchange and Token Info function getExchange(address token) external view returns (address exchange); function getToken(address exchange) external view returns (address token); function getTokenWithId(uint256 tokenId) external view returns (address token); // Never use function initializeFactory(address template) external; } contract FundHeader { address constant internal cEth = address(0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5); UniswapFactoryInterface constant internal uniswapFactory = UniswapFactoryInterface(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95); } contract FundDataInternal is ProxyData, FundHeader { address internal collateralOwner; address internal interestWithdrawer; // cTokenAddress -> sum deposits denominated in underlying mapping(address => uint) internal initialDepositCollateral; // cTokenAddresses address[] internal markets; } contract CERC20NoBorrowInterface { function mint(uint mintAmount) external returns (uint); address public underlying; } interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract FundProxy is Proxy, FundDataInternal { constructor( address proxied, address _collateralOwner, address _interestWithdrawer, address[] memory _markets ) public Proxy(proxied) { for (uint i=0; i < _markets.length; i++) { markets.push(_markets[i]); if (_markets[i] == cEth) { continue; } address underlying = CERC20NoBorrowInterface(_markets[i]).underlying(); require(<FILL_ME>) require(IERC20(underlying).approve(uniswapFactory.getExchange(underlying), uint(-1))); } collateralOwner = _collateralOwner; interestWithdrawer = _interestWithdrawer; } } contract FundFactory { address private implementation; event NewFundCreated(address indexed collateralOwner, address proxyAddress); constructor(address _implementation) public { } function createFund(address _interestWithdrawer, address[] calldata _markets) external { } }
IERC20(underlying).approve(_markets[i],uint(-1))
307,189
IERC20(underlying).approve(_markets[i],uint(-1))