comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"ZERO"
pragma solidity ^0.8.17; // each user deposit is saved in an object like this struct DepositInfo { uint256 amount; uint256 depositTime; uint256 rewardDebt; } // Info of each pool. struct PoolInfo { uint256 accERC20PerShare; // Accumulated ERC20s per share, times 1e36. uint256 stakedAmount; // Amount of @lpToken staked in this pool uint128 lockPeriod; // lock period in days uint128 lastRewardTime; // Last time where ERC20s distribution occurs. } contract LinkBridgeLockedStaking is AccessControl, FeeCollector { using SafeERC20 for IERC20; IERC20 public immutable wethLnkbLp; IERC20 public immutable lnkbToken; uint256 public immutable startTime; uint256 public rewardsPerSecond; uint256 public paidOut; // time when the last rewardPerSecond has changed uint128 public lastEmissionChange; uint128 public apy = 1800; // 18% APY // all pending rewards before last rewards per second change uint256 public rewardsAmountBeforeLastChange; PoolInfo public poolInfo = PoolInfo(0, 0, 365, 0); // index => userDeposit info mapping(uint256 => DepositInfo) public usersDeposits; uint256 private _depositsLength; // Info of each user that stakes LP tokens. // poolId => user => userInfoId's mapping(address => uint256[]) public userDepositsIndexes; event Deposit( address indexed user, uint256 indexed depositId, uint256 amount, uint256 depositTime ); event Withdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event LockRemoved( address indexed user, uint256 indexed depositId, uint256 amount ); event EmergencyWithdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event WithdrawWithPenalty( address indexed user, uint256 indexed depositId, uint256 amount, uint256 leftAmount, uint256 penaltyManount ); event RewardPaid( address indexed user, uint256 indexed depositId, uint256 reward ); constructor( IERC20 _wethLnkbLp, IERC20 _lnkbToken, uint256 _startTime ) { require(<FILL_ME>) wethLnkbLp = _wethLnkbLp; require(address(_lnkbToken) != address(0), "ZERO"); lnkbToken = _lnkbToken; startTime = _startTime; } modifier onlyWhenStarted() { } function setLockPeriod(uint128 _newLockPeriod) external onlyAdmin { } function setApy(uint128 _apy) external onlyAdmin { } function updateRewardsPerSecond() external { } function getUserDeposits(address _user) external view returns (DepositInfo[] memory) { } /** * @dev Returns the total amount of tokens staked in the pool by @_user * @param _user The address of the user * @return totalDeposit The total amount of tokens staked in the pool by @_user */ function getTotalUserDeposit(address _user) external view returns (uint256 totalDeposit) { } function getUserPendingRewards(address _user) external view returns (uint256 pending) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { } function unlockDeposit(address _user, uint256 _depositIndex) external onlyAdmin { } /** Withdraw without caring about rewards only if the deposit is unlocked. EMERGENCY ONLY. */ function emergencyWithdraw(uint256 _index) external { } function deposit(uint256 _amount) external onlyWhenStarted { } function unstakeUnlockedDeposit(uint256 _index) external { } function unstakeWithPenalty(uint256 _index) external { } function updatePool() public { } function getPenalty(uint256 timeDepositLock) public view returns (uint256 penalty) { } /** @dev View function for total reward the farm has yet to pay out. */ function totalPending() public view returns (uint256) { } function _getLPStakeInRewardTokenValue() internal view returns (uint256) { } // Change the rewardPerBlock function _updateRewardsPerSecond() internal { } function _removeDeposit(address _user, uint256 _index) internal { } function _getUserDeposits(address _user) internal view returns (DepositInfo[] memory) { } function _totalPastRewards() internal view returns (uint256) { } }
address(_wethLnkbLp)!=address(0),"ZERO"
414,819
address(_wethLnkbLp)!=address(0)
"ZERO"
pragma solidity ^0.8.17; // each user deposit is saved in an object like this struct DepositInfo { uint256 amount; uint256 depositTime; uint256 rewardDebt; } // Info of each pool. struct PoolInfo { uint256 accERC20PerShare; // Accumulated ERC20s per share, times 1e36. uint256 stakedAmount; // Amount of @lpToken staked in this pool uint128 lockPeriod; // lock period in days uint128 lastRewardTime; // Last time where ERC20s distribution occurs. } contract LinkBridgeLockedStaking is AccessControl, FeeCollector { using SafeERC20 for IERC20; IERC20 public immutable wethLnkbLp; IERC20 public immutable lnkbToken; uint256 public immutable startTime; uint256 public rewardsPerSecond; uint256 public paidOut; // time when the last rewardPerSecond has changed uint128 public lastEmissionChange; uint128 public apy = 1800; // 18% APY // all pending rewards before last rewards per second change uint256 public rewardsAmountBeforeLastChange; PoolInfo public poolInfo = PoolInfo(0, 0, 365, 0); // index => userDeposit info mapping(uint256 => DepositInfo) public usersDeposits; uint256 private _depositsLength; // Info of each user that stakes LP tokens. // poolId => user => userInfoId's mapping(address => uint256[]) public userDepositsIndexes; event Deposit( address indexed user, uint256 indexed depositId, uint256 amount, uint256 depositTime ); event Withdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event LockRemoved( address indexed user, uint256 indexed depositId, uint256 amount ); event EmergencyWithdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event WithdrawWithPenalty( address indexed user, uint256 indexed depositId, uint256 amount, uint256 leftAmount, uint256 penaltyManount ); event RewardPaid( address indexed user, uint256 indexed depositId, uint256 reward ); constructor( IERC20 _wethLnkbLp, IERC20 _lnkbToken, uint256 _startTime ) { require(address(_wethLnkbLp) != address(0), "ZERO"); wethLnkbLp = _wethLnkbLp; require(<FILL_ME>) lnkbToken = _lnkbToken; startTime = _startTime; } modifier onlyWhenStarted() { } function setLockPeriod(uint128 _newLockPeriod) external onlyAdmin { } function setApy(uint128 _apy) external onlyAdmin { } function updateRewardsPerSecond() external { } function getUserDeposits(address _user) external view returns (DepositInfo[] memory) { } /** * @dev Returns the total amount of tokens staked in the pool by @_user * @param _user The address of the user * @return totalDeposit The total amount of tokens staked in the pool by @_user */ function getTotalUserDeposit(address _user) external view returns (uint256 totalDeposit) { } function getUserPendingRewards(address _user) external view returns (uint256 pending) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { } function unlockDeposit(address _user, uint256 _depositIndex) external onlyAdmin { } /** Withdraw without caring about rewards only if the deposit is unlocked. EMERGENCY ONLY. */ function emergencyWithdraw(uint256 _index) external { } function deposit(uint256 _amount) external onlyWhenStarted { } function unstakeUnlockedDeposit(uint256 _index) external { } function unstakeWithPenalty(uint256 _index) external { } function updatePool() public { } function getPenalty(uint256 timeDepositLock) public view returns (uint256 penalty) { } /** @dev View function for total reward the farm has yet to pay out. */ function totalPending() public view returns (uint256) { } function _getLPStakeInRewardTokenValue() internal view returns (uint256) { } // Change the rewardPerBlock function _updateRewardsPerSecond() internal { } function _removeDeposit(address _user, uint256 _index) internal { } function _getUserDeposits(address _user) internal view returns (DepositInfo[] memory) { } function _totalPastRewards() internal view returns (uint256) { } }
address(_lnkbToken)!=address(0),"ZERO"
414,819
address(_lnkbToken)!=address(0)
"INSUFFICIENT"
pragma solidity ^0.8.17; // each user deposit is saved in an object like this struct DepositInfo { uint256 amount; uint256 depositTime; uint256 rewardDebt; } // Info of each pool. struct PoolInfo { uint256 accERC20PerShare; // Accumulated ERC20s per share, times 1e36. uint256 stakedAmount; // Amount of @lpToken staked in this pool uint128 lockPeriod; // lock period in days uint128 lastRewardTime; // Last time where ERC20s distribution occurs. } contract LinkBridgeLockedStaking is AccessControl, FeeCollector { using SafeERC20 for IERC20; IERC20 public immutable wethLnkbLp; IERC20 public immutable lnkbToken; uint256 public immutable startTime; uint256 public rewardsPerSecond; uint256 public paidOut; // time when the last rewardPerSecond has changed uint128 public lastEmissionChange; uint128 public apy = 1800; // 18% APY // all pending rewards before last rewards per second change uint256 public rewardsAmountBeforeLastChange; PoolInfo public poolInfo = PoolInfo(0, 0, 365, 0); // index => userDeposit info mapping(uint256 => DepositInfo) public usersDeposits; uint256 private _depositsLength; // Info of each user that stakes LP tokens. // poolId => user => userInfoId's mapping(address => uint256[]) public userDepositsIndexes; event Deposit( address indexed user, uint256 indexed depositId, uint256 amount, uint256 depositTime ); event Withdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event LockRemoved( address indexed user, uint256 indexed depositId, uint256 amount ); event EmergencyWithdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event WithdrawWithPenalty( address indexed user, uint256 indexed depositId, uint256 amount, uint256 leftAmount, uint256 penaltyManount ); event RewardPaid( address indexed user, uint256 indexed depositId, uint256 reward ); constructor( IERC20 _wethLnkbLp, IERC20 _lnkbToken, uint256 _startTime ) { } modifier onlyWhenStarted() { } function setLockPeriod(uint128 _newLockPeriod) external onlyAdmin { } function setApy(uint128 _apy) external onlyAdmin { } function updateRewardsPerSecond() external { } function getUserDeposits(address _user) external view returns (DepositInfo[] memory) { } /** * @dev Returns the total amount of tokens staked in the pool by @_user * @param _user The address of the user * @return totalDeposit The total amount of tokens staked in the pool by @_user */ function getTotalUserDeposit(address _user) external view returns (uint256 totalDeposit) { } function getUserPendingRewards(address _user) external view returns (uint256 pending) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { require(_token != address(0), "ZERO"); require(_amount > 0, "ZERO"); IERC20 token = IERC20(_token); if (_token == address(wethLnkbLp)) { uint256 balance = token.balanceOf(address(this)); require(<FILL_ME>) token.safeTransfer(_msgSender(), _amount); } else { token.safeTransfer(_msgSender(), _amount); } } function unlockDeposit(address _user, uint256 _depositIndex) external onlyAdmin { } /** Withdraw without caring about rewards only if the deposit is unlocked. EMERGENCY ONLY. */ function emergencyWithdraw(uint256 _index) external { } function deposit(uint256 _amount) external onlyWhenStarted { } function unstakeUnlockedDeposit(uint256 _index) external { } function unstakeWithPenalty(uint256 _index) external { } function updatePool() public { } function getPenalty(uint256 timeDepositLock) public view returns (uint256 penalty) { } /** @dev View function for total reward the farm has yet to pay out. */ function totalPending() public view returns (uint256) { } function _getLPStakeInRewardTokenValue() internal view returns (uint256) { } // Change the rewardPerBlock function _updateRewardsPerSecond() internal { } function _removeDeposit(address _user, uint256 _index) internal { } function _getUserDeposits(address _user) internal view returns (DepositInfo[] memory) { } function _totalPastRewards() internal view returns (uint256) { } }
balance-poolInfo.stakedAmount>=_amount,"INSUFFICIENT"
414,819
balance-poolInfo.stakedAmount>=_amount
"LOCKED"
pragma solidity ^0.8.17; // each user deposit is saved in an object like this struct DepositInfo { uint256 amount; uint256 depositTime; uint256 rewardDebt; } // Info of each pool. struct PoolInfo { uint256 accERC20PerShare; // Accumulated ERC20s per share, times 1e36. uint256 stakedAmount; // Amount of @lpToken staked in this pool uint128 lockPeriod; // lock period in days uint128 lastRewardTime; // Last time where ERC20s distribution occurs. } contract LinkBridgeLockedStaking is AccessControl, FeeCollector { using SafeERC20 for IERC20; IERC20 public immutable wethLnkbLp; IERC20 public immutable lnkbToken; uint256 public immutable startTime; uint256 public rewardsPerSecond; uint256 public paidOut; // time when the last rewardPerSecond has changed uint128 public lastEmissionChange; uint128 public apy = 1800; // 18% APY // all pending rewards before last rewards per second change uint256 public rewardsAmountBeforeLastChange; PoolInfo public poolInfo = PoolInfo(0, 0, 365, 0); // index => userDeposit info mapping(uint256 => DepositInfo) public usersDeposits; uint256 private _depositsLength; // Info of each user that stakes LP tokens. // poolId => user => userInfoId's mapping(address => uint256[]) public userDepositsIndexes; event Deposit( address indexed user, uint256 indexed depositId, uint256 amount, uint256 depositTime ); event Withdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event LockRemoved( address indexed user, uint256 indexed depositId, uint256 amount ); event EmergencyWithdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event WithdrawWithPenalty( address indexed user, uint256 indexed depositId, uint256 amount, uint256 leftAmount, uint256 penaltyManount ); event RewardPaid( address indexed user, uint256 indexed depositId, uint256 reward ); constructor( IERC20 _wethLnkbLp, IERC20 _lnkbToken, uint256 _startTime ) { } modifier onlyWhenStarted() { } function setLockPeriod(uint128 _newLockPeriod) external onlyAdmin { } function setApy(uint128 _apy) external onlyAdmin { } function updateRewardsPerSecond() external { } function getUserDeposits(address _user) external view returns (DepositInfo[] memory) { } /** * @dev Returns the total amount of tokens staked in the pool by @_user * @param _user The address of the user * @return totalDeposit The total amount of tokens staked in the pool by @_user */ function getTotalUserDeposit(address _user) external view returns (uint256 totalDeposit) { } function getUserPendingRewards(address _user) external view returns (uint256 pending) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { } function unlockDeposit(address _user, uint256 _depositIndex) external onlyAdmin { } /** Withdraw without caring about rewards only if the deposit is unlocked. EMERGENCY ONLY. */ function emergencyWithdraw(uint256 _index) external { uint256[] storage userDeposits = userDepositsIndexes[_msgSender()]; uint256 depositId = userDeposits[_index]; DepositInfo storage depositInfo = usersDeposits[depositId]; require(depositInfo.amount > 0, "ZERO"); require(<FILL_ME>) uint256 amount = depositInfo.amount; poolInfo.stakedAmount -= amount; delete usersDeposits[depositId]; wethLnkbLp.safeTransfer(_msgSender(), amount); _removeDeposit(_msgSender(), _index); emit EmergencyWithdraw(_msgSender(), depositId, amount); } function deposit(uint256 _amount) external onlyWhenStarted { } function unstakeUnlockedDeposit(uint256 _index) external { } function unstakeWithPenalty(uint256 _index) external { } function updatePool() public { } function getPenalty(uint256 timeDepositLock) public view returns (uint256 penalty) { } /** @dev View function for total reward the farm has yet to pay out. */ function totalPending() public view returns (uint256) { } function _getLPStakeInRewardTokenValue() internal view returns (uint256) { } // Change the rewardPerBlock function _updateRewardsPerSecond() internal { } function _removeDeposit(address _user, uint256 _index) internal { } function _getUserDeposits(address _user) internal view returns (DepositInfo[] memory) { } function _totalPastRewards() internal view returns (uint256) { } }
depositInfo.depositTime+poolInfo.lockPeriod*DAY_IN_SECONDS<=block.timestamp,"LOCKED"
414,819
depositInfo.depositTime+poolInfo.lockPeriod*DAY_IN_SECONDS<=block.timestamp
"UNLOCKED"
pragma solidity ^0.8.17; // each user deposit is saved in an object like this struct DepositInfo { uint256 amount; uint256 depositTime; uint256 rewardDebt; } // Info of each pool. struct PoolInfo { uint256 accERC20PerShare; // Accumulated ERC20s per share, times 1e36. uint256 stakedAmount; // Amount of @lpToken staked in this pool uint128 lockPeriod; // lock period in days uint128 lastRewardTime; // Last time where ERC20s distribution occurs. } contract LinkBridgeLockedStaking is AccessControl, FeeCollector { using SafeERC20 for IERC20; IERC20 public immutable wethLnkbLp; IERC20 public immutable lnkbToken; uint256 public immutable startTime; uint256 public rewardsPerSecond; uint256 public paidOut; // time when the last rewardPerSecond has changed uint128 public lastEmissionChange; uint128 public apy = 1800; // 18% APY // all pending rewards before last rewards per second change uint256 public rewardsAmountBeforeLastChange; PoolInfo public poolInfo = PoolInfo(0, 0, 365, 0); // index => userDeposit info mapping(uint256 => DepositInfo) public usersDeposits; uint256 private _depositsLength; // Info of each user that stakes LP tokens. // poolId => user => userInfoId's mapping(address => uint256[]) public userDepositsIndexes; event Deposit( address indexed user, uint256 indexed depositId, uint256 amount, uint256 depositTime ); event Withdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event LockRemoved( address indexed user, uint256 indexed depositId, uint256 amount ); event EmergencyWithdraw( address indexed user, uint256 indexed depositId, uint256 amount ); event WithdrawWithPenalty( address indexed user, uint256 indexed depositId, uint256 amount, uint256 leftAmount, uint256 penaltyManount ); event RewardPaid( address indexed user, uint256 indexed depositId, uint256 reward ); constructor( IERC20 _wethLnkbLp, IERC20 _lnkbToken, uint256 _startTime ) { } modifier onlyWhenStarted() { } function setLockPeriod(uint128 _newLockPeriod) external onlyAdmin { } function setApy(uint128 _apy) external onlyAdmin { } function updateRewardsPerSecond() external { } function getUserDeposits(address _user) external view returns (DepositInfo[] memory) { } /** * @dev Returns the total amount of tokens staked in the pool by @_user * @param _user The address of the user * @return totalDeposit The total amount of tokens staked in the pool by @_user */ function getTotalUserDeposit(address _user) external view returns (uint256 totalDeposit) { } function getUserPendingRewards(address _user) external view returns (uint256 pending) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { } function unlockDeposit(address _user, uint256 _depositIndex) external onlyAdmin { } /** Withdraw without caring about rewards only if the deposit is unlocked. EMERGENCY ONLY. */ function emergencyWithdraw(uint256 _index) external { } function deposit(uint256 _amount) external onlyWhenStarted { } function unstakeUnlockedDeposit(uint256 _index) external { } function unstakeWithPenalty(uint256 _index) external { uint256[] storage userDeposits = userDepositsIndexes[_msgSender()]; require(userDeposits.length > _index, "INVALID_INDEX"); uint256 depositId = userDeposits[_index]; DepositInfo memory depositInfo = usersDeposits[depositId]; require(<FILL_ME>) uint256 amount = depositInfo.amount; require(amount > 0, "ZERO"); updatePool(); uint256 pending = ((depositInfo.amount * poolInfo.accERC20PerShare) / REWARD_DEBT_SCALE) - depositInfo.rewardDebt; if (pending > 0) { lnkbToken.safeTransfer(_msgSender(), pending); paidOut += pending; emit RewardPaid(_msgSender(), depositId, pending); } address feeCollector = getFeeCollector(); uint256 penalty = getPenalty(depositInfo.depositTime); uint256 penaltyAmount = (amount * penalty) / DENOMINATOR; uint256 leftAmount = amount - penaltyAmount; delete usersDeposits[depositId]; poolInfo.stakedAmount -= amount; wethLnkbLp.safeTransfer(feeCollector, penaltyAmount); wethLnkbLp.safeTransfer(_msgSender(), leftAmount); _removeDeposit(_msgSender(), _index); _updateRewardsPerSecond(); emit WithdrawWithPenalty( _msgSender(), depositId, amount, leftAmount, penaltyAmount ); } function updatePool() public { } function getPenalty(uint256 timeDepositLock) public view returns (uint256 penalty) { } /** @dev View function for total reward the farm has yet to pay out. */ function totalPending() public view returns (uint256) { } function _getLPStakeInRewardTokenValue() internal view returns (uint256) { } // Change the rewardPerBlock function _updateRewardsPerSecond() internal { } function _removeDeposit(address _user, uint256 _index) internal { } function _getUserDeposits(address _user) internal view returns (DepositInfo[] memory) { } function _totalPastRewards() internal view returns (uint256) { } }
depositInfo.depositTime+poolInfo.lockPeriod*DAY_IN_SECONDS>block.timestamp,"UNLOCKED"
414,819
depositInfo.depositTime+poolInfo.lockPeriod*DAY_IN_SECONDS>block.timestamp
"NFT local supply limit reached"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract WSDC is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.09 ether; uint256 public maxSupply = 8888; uint256 public localMax = 2997; uint256 public maxMintAmount = 5; uint256 public maxMintsPerAccount = 5; bool public paused = false; bool public revealed = false; bool public onlyAllowList = true; string public notRevealedUri; mapping(address => uint256) public mintsPerAccount; address[] public allowList; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri, address _safe ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount, address to ) public payable { uint256 supply = totalSupply(); require(to != address(0), "Minting to the null address is not allowed"); require(!paused,"NFT is paused"); require(_mintAmount > 0, "mint amount must be greater than 0"); require(<FILL_ME>) require(supply + _mintAmount <= maxSupply, "mint amount must be less than maxSupply"); if (msg.sender != owner()) { if(onlyAllowList){ require(isAllowListed(to), "You are not in the allow list"); } require(_mintAmount <= maxMintAmount, "mint amount must be less than maxMintAmount"); require(mintsPerAccount[to] < maxMintsPerAccount, "Sender has reached max mints per account"); require(msg.value >= cost * _mintAmount, "Sender does not have enough ether to mint"); mintsPerAccount[to] += _mintAmount; } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(to, supply + i); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setMaxMintAmmount(uint256 _maxMintAmount) public onlyOwner { } function setOnlyAllowList(bool _onlyAllowList) public onlyOwner { } function uploadAllowList(address[] memory _allowList, bool overwrite) public onlyOwner { } function isAllowListed(address account) public view returns (bool) { } function setCost(uint256 _newCost) public onlyOwner { } function setLocalMax(uint256 _newLocalMax) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=localMax,"NFT local supply limit reached"
414,824
supply+_mintAmount<=localMax
"You are not in the allow list"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract WSDC is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.09 ether; uint256 public maxSupply = 8888; uint256 public localMax = 2997; uint256 public maxMintAmount = 5; uint256 public maxMintsPerAccount = 5; bool public paused = false; bool public revealed = false; bool public onlyAllowList = true; string public notRevealedUri; mapping(address => uint256) public mintsPerAccount; address[] public allowList; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri, address _safe ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount, address to ) public payable { uint256 supply = totalSupply(); require(to != address(0), "Minting to the null address is not allowed"); require(!paused,"NFT is paused"); require(_mintAmount > 0, "mint amount must be greater than 0"); require(supply + _mintAmount <= localMax, "NFT local supply limit reached"); require(supply + _mintAmount <= maxSupply, "mint amount must be less than maxSupply"); if (msg.sender != owner()) { if(onlyAllowList){ require(<FILL_ME>) } require(_mintAmount <= maxMintAmount, "mint amount must be less than maxMintAmount"); require(mintsPerAccount[to] < maxMintsPerAccount, "Sender has reached max mints per account"); require(msg.value >= cost * _mintAmount, "Sender does not have enough ether to mint"); mintsPerAccount[to] += _mintAmount; } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(to, supply + i); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setMaxMintAmmount(uint256 _maxMintAmount) public onlyOwner { } function setOnlyAllowList(bool _onlyAllowList) public onlyOwner { } function uploadAllowList(address[] memory _allowList, bool overwrite) public onlyOwner { } function isAllowListed(address account) public view returns (bool) { } function setCost(uint256 _newCost) public onlyOwner { } function setLocalMax(uint256 _newLocalMax) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
isAllowListed(to),"You are not in the allow list"
414,824
isAllowListed(to)
"Sender has reached max mints per account"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract WSDC is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.09 ether; uint256 public maxSupply = 8888; uint256 public localMax = 2997; uint256 public maxMintAmount = 5; uint256 public maxMintsPerAccount = 5; bool public paused = false; bool public revealed = false; bool public onlyAllowList = true; string public notRevealedUri; mapping(address => uint256) public mintsPerAccount; address[] public allowList; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri, address _safe ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount, address to ) public payable { uint256 supply = totalSupply(); require(to != address(0), "Minting to the null address is not allowed"); require(!paused,"NFT is paused"); require(_mintAmount > 0, "mint amount must be greater than 0"); require(supply + _mintAmount <= localMax, "NFT local supply limit reached"); require(supply + _mintAmount <= maxSupply, "mint amount must be less than maxSupply"); if (msg.sender != owner()) { if(onlyAllowList){ require(isAllowListed(to), "You are not in the allow list"); } require(_mintAmount <= maxMintAmount, "mint amount must be less than maxMintAmount"); require(<FILL_ME>) require(msg.value >= cost * _mintAmount, "Sender does not have enough ether to mint"); mintsPerAccount[to] += _mintAmount; } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(to, supply + i); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setMaxMintAmmount(uint256 _maxMintAmount) public onlyOwner { } function setOnlyAllowList(bool _onlyAllowList) public onlyOwner { } function uploadAllowList(address[] memory _allowList, bool overwrite) public onlyOwner { } function isAllowListed(address account) public view returns (bool) { } function setCost(uint256 _newCost) public onlyOwner { } function setLocalMax(uint256 _newLocalMax) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
mintsPerAccount[to]<maxMintsPerAccount,"Sender has reached max mints per account"
414,824
mintsPerAccount[to]<maxMintsPerAccount
"Already initialized"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@rari-capital/solmate/src/tokens/ERC721.sol"; import "../interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../interfaces/IDerivativeLicense.sol"; import "@boringcrypto/boring-solidity/contracts/interfaces/IMasterContract.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ interface IProxyRegistry { function proxies(address) external returns (address); } contract VibeERC721 is Ownable, ERC721, IERC2981, IMasterContract, IDerivativeLicense, DefaultOperatorFilterer { using Strings for uint256; event LogSetRoyalty( uint16 royaltyRate, address indexed royaltyReceiver_, uint16 derivateRate, bool isDerivativeAllowed ); event LogChangeBaseURI(string baseURI, bool immutability_); event LogMinterChange(address indexed minter, bool status); uint256 private constant BPS = 10_000; uint256 public totalSupply; string public baseURI; struct RoyaltyData { address royaltyReceiver; uint16 royaltyRate; uint16 derivativeRoyaltyRate; bool isDerivativeAllowed; } RoyaltyData public royaltyInformation; bool public immutability = false; constructor() ERC721("MASTER", "MASTER") {} mapping(address => bool) public isMinter; modifier onlyMinter() { } function setMinter(address minter, bool status) external onlyOwner { } function renounceMinter() external { } function init(bytes calldata data) public payable override { ( string memory _name, string memory _symbol, string memory baseURI_ ) = abi.decode(data, (string, string, string)); require(<FILL_ME>) _transferOwnership(msg.sender); name = _name; symbol = _symbol; baseURI = baseURI_; } function mint(address to) external onlyMinter returns (uint256 tokenId) { } function mintWithId(address to, uint256 tokenId) external onlyMinter { } /** * @dev See {ERC721-setApprovalForAll}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-approve}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-transferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) public override onlyAllowedOperator(from) { } function burn(uint256 id) external { } function tokenURI(uint256 id) public view override returns (string memory) { } /// @notice Called with the sale price to determine how much royalty is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the derivative royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function derivativeRoyaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } function setRoyalty( address royaltyReceiver_, uint16 royaltyRate_, uint16 derivativeRate, bool isDerivativeAllowed ) external onlyOwner { } function changeBaseURI(string memory baseURI_, bool immutability_) external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
bytes(baseURI).length==0&&bytes(baseURI_).length!=0,"Already initialized"
414,828
bytes(baseURI).length==0&&bytes(baseURI_).length!=0
"Derivative not allowed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@rari-capital/solmate/src/tokens/ERC721.sol"; import "../interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../interfaces/IDerivativeLicense.sol"; import "@boringcrypto/boring-solidity/contracts/interfaces/IMasterContract.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ interface IProxyRegistry { function proxies(address) external returns (address); } contract VibeERC721 is Ownable, ERC721, IERC2981, IMasterContract, IDerivativeLicense, DefaultOperatorFilterer { using Strings for uint256; event LogSetRoyalty( uint16 royaltyRate, address indexed royaltyReceiver_, uint16 derivateRate, bool isDerivativeAllowed ); event LogChangeBaseURI(string baseURI, bool immutability_); event LogMinterChange(address indexed minter, bool status); uint256 private constant BPS = 10_000; uint256 public totalSupply; string public baseURI; struct RoyaltyData { address royaltyReceiver; uint16 royaltyRate; uint16 derivativeRoyaltyRate; bool isDerivativeAllowed; } RoyaltyData public royaltyInformation; bool public immutability = false; constructor() ERC721("MASTER", "MASTER") {} mapping(address => bool) public isMinter; modifier onlyMinter() { } function setMinter(address minter, bool status) external onlyOwner { } function renounceMinter() external { } function init(bytes calldata data) public payable override { } function mint(address to) external onlyMinter returns (uint256 tokenId) { } function mintWithId(address to, uint256 tokenId) external onlyMinter { } /** * @dev See {ERC721-setApprovalForAll}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-approve}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-transferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) public override onlyAllowedOperator(from) { } function burn(uint256 id) external { } function tokenURI(uint256 id) public view override returns (string memory) { } /// @notice Called with the sale price to determine how much royalty is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the derivative royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function derivativeRoyaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { require(<FILL_ME>) return ( royaltyInformation.royaltyReceiver, (_salePrice * royaltyInformation.derivativeRoyaltyRate) / BPS ); } function setRoyalty( address royaltyReceiver_, uint16 royaltyRate_, uint16 derivativeRate, bool isDerivativeAllowed ) external onlyOwner { } function changeBaseURI(string memory baseURI_, bool immutability_) external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
royaltyInformation.isDerivativeAllowed,"Derivative not allowed"
414,828
royaltyInformation.isDerivativeAllowed
"Invalid baseURI"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@rari-capital/solmate/src/tokens/ERC721.sol"; import "../interfaces/IERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "../interfaces/IDerivativeLicense.sol"; import "@boringcrypto/boring-solidity/contracts/interfaces/IMasterContract.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ interface IProxyRegistry { function proxies(address) external returns (address); } contract VibeERC721 is Ownable, ERC721, IERC2981, IMasterContract, IDerivativeLicense, DefaultOperatorFilterer { using Strings for uint256; event LogSetRoyalty( uint16 royaltyRate, address indexed royaltyReceiver_, uint16 derivateRate, bool isDerivativeAllowed ); event LogChangeBaseURI(string baseURI, bool immutability_); event LogMinterChange(address indexed minter, bool status); uint256 private constant BPS = 10_000; uint256 public totalSupply; string public baseURI; struct RoyaltyData { address royaltyReceiver; uint16 royaltyRate; uint16 derivativeRoyaltyRate; bool isDerivativeAllowed; } RoyaltyData public royaltyInformation; bool public immutability = false; constructor() ERC721("MASTER", "MASTER") {} mapping(address => bool) public isMinter; modifier onlyMinter() { } function setMinter(address minter, bool status) external onlyOwner { } function renounceMinter() external { } function init(bytes calldata data) public payable override { } function mint(address to) external onlyMinter returns (uint256 tokenId) { } function mintWithId(address to, uint256 tokenId) external onlyMinter { } /** * @dev See {ERC721-setApprovalForAll}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-approve}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } /** * @dev See {ERC721-transferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } /** * @dev See {ERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) public override onlyAllowedOperator(from) { } function burn(uint256 id) external { } function tokenURI(uint256 id) public view override returns (string memory) { } /// @notice Called with the sale price to determine how much royalty is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param /*_tokenId*/ - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the derivative royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function derivativeRoyaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } function setRoyalty( address royaltyReceiver_, uint16 royaltyRate_, uint16 derivativeRate, bool isDerivativeAllowed ) external onlyOwner { } function changeBaseURI(string memory baseURI_, bool immutability_) external onlyOwner { require(immutability == false, "Immutable"); require(<FILL_ME>) immutability = immutability_; baseURI = baseURI_; emit LogChangeBaseURI(baseURI_, immutability_); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
bytes(baseURI_).length!=0,"Invalid baseURI"
414,828
bytes(baseURI_).length!=0
"INSUFFICIENT_ETH"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(!presaleLive, "ONLY_PRESALE"); require(tokenQuantity <= FR_PER_MINT, "EXCEED_FR_PER_MINT"); require(<FILL_ME>) require(!denylist[msg.sender], "NOT_APPROVED_BUYER"); uint256 supply = _owners.length; require(supply + tokenQuantity <= FR_PUBLIC, "EXCEED_MAX_SALE_SUPPLY"); for(uint256 i = 0; i < tokenQuantity; i++) { _mint( msg.sender, supply++); } } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
FR_PRICE*tokenQuantity<=msg.value,"INSUFFICIENT_ETH"
414,886
FR_PRICE*tokenQuantity<=msg.value
"NOT_APPROVED_BUYER"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(!presaleLive, "ONLY_PRESALE"); require(tokenQuantity <= FR_PER_MINT, "EXCEED_FR_PER_MINT"); require(FR_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); require(<FILL_ME>) uint256 supply = _owners.length; require(supply + tokenQuantity <= FR_PUBLIC, "EXCEED_MAX_SALE_SUPPLY"); for(uint256 i = 0; i < tokenQuantity; i++) { _mint( msg.sender, supply++); } } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
!denylist[msg.sender],"NOT_APPROVED_BUYER"
414,886
!denylist[msg.sender]
"EXCEED_MAX_SALE_SUPPLY"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(!presaleLive, "ONLY_PRESALE"); require(tokenQuantity <= FR_PER_MINT, "EXCEED_FR_PER_MINT"); require(FR_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); require(!denylist[msg.sender], "NOT_APPROVED_BUYER"); uint256 supply = _owners.length; require(<FILL_ME>) for(uint256 i = 0; i < tokenQuantity; i++) { _mint( msg.sender, supply++); } } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
supply+tokenQuantity<=FR_PUBLIC,"EXCEED_MAX_SALE_SUPPLY"
414,886
supply+tokenQuantity<=FR_PUBLIC
"EXCEED_ALLOC"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { require(!saleLive && presaleLive, "PRESALE_CLOSED"); require(<FILL_ME>) require(tokenQuantity <= FR_PER_MINT, "EXCEED_FR_PER_MINT"); require(FR_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); /*require(approvelist[msg.sender] || walletHoldsToken(msg.sender), "NOT_APPROVED_BUYER");*/ require(!denylist[msg.sender], "NOT_APPROVED_BUYER"); uint256 supply = _owners.length; require(supply + tokenQuantity <= PRESALE_LIMIT, "EXCEED_MAX_PRESALE_SUPPLY"); presalerListPurchases[msg.sender] += tokenQuantity; for (uint256 i = 0; i < tokenQuantity; i++) { _mint(msg.sender, supply++); } if (supply == PRESALE_LIMIT) { presaleLive = false; saleLive = true; FR_PRICE = 0.15 ether; } } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
presalerListPurchases[msg.sender]+tokenQuantity<=FR_PER_MINT,"EXCEED_ALLOC"
414,886
presalerListPurchases[msg.sender]+tokenQuantity<=FR_PER_MINT
"EXCEED_MAX_PRESALE_SUPPLY"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { require(!saleLive && presaleLive, "PRESALE_CLOSED"); require(presalerListPurchases[msg.sender] + tokenQuantity <= FR_PER_MINT, "EXCEED_ALLOC"); require(tokenQuantity <= FR_PER_MINT, "EXCEED_FR_PER_MINT"); require(FR_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); /*require(approvelist[msg.sender] || walletHoldsToken(msg.sender), "NOT_APPROVED_BUYER");*/ require(!denylist[msg.sender], "NOT_APPROVED_BUYER"); uint256 supply = _owners.length; require(<FILL_ME>) presalerListPurchases[msg.sender] += tokenQuantity; for (uint256 i = 0; i < tokenQuantity; i++) { _mint(msg.sender, supply++); } if (supply == PRESALE_LIMIT) { presaleLive = false; saleLive = true; FR_PRICE = 0.15 ether; } } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
supply+tokenQuantity<=PRESALE_LIMIT,"EXCEED_MAX_PRESALE_SUPPLY"
414,886
supply+tokenQuantity<=PRESALE_LIMIT
"MAX_MINT"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { uint256 supply = _owners.length; require(<FILL_ME>) require(giftedAmount + receivers.length <= FR_GIFT, "NO_GIFTS"); for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], supply++ ); } } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
supply+receivers.length<=FR_PUBLIC,"MAX_MINT"
414,886
supply+receivers.length<=FR_PUBLIC
"NO_GIFTS"
@v4.3.2 pragma solidity ^0.8.17; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity ^0.8.17; /* StreamPass * {ERC721Royalty}: A way to signal royalty information following ERC2981. */ contract StreamPass is Ownable, ERC721Royalty { using Strings for uint256; using ECDSA for bytes32; uint256 public constant FR_PUBLIC = 9900; uint256 public constant FR_GIFT = 100; uint256 public constant FR_PER_MINT = 100; uint256 public giftedAmount; uint256 public FR_PRICE; uint256 public PRESALE_LIMIT; string public provenance; string private _contractURI; string private _tokenBaseURI; address private _signerAddress = 0x9D582750f758b6A2dC2397669E55A19099AA18ee; address private _vaultAddress = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; //address private approvelistSigner = 0xC049AF472eEC8ce544765974C7AE88Cf2b133393; address[] internal approvecollections; mapping (address => bool) public approvelist; mapping (address => bool) public denylist; bool public presaleLive; bool public saleLive; mapping(address => uint256) public presalerListPurchases; constructor() ERC721B("Stream12", "S12") { } // ** - CORE - ** // function buy(uint256 tokenQuantity) external payable { } function setTokenRoyalty( uint256 tokenId, address recipient, uint96 fraction ) public { } function setDefaultRoyalty(address recipient, uint96 fraction) public { } function deleteDefaultRoyalty() public { } /* function canMint(address _address) public view returns (bool, string memory) { if (!approvelist[_address]) { return (false, "Invalid signature"); } return (true, ""); } */ function presaleBuy(uint256 tokenQuantity) external payable { } // ** - ADMIN - ** // function indexOf(address[] memory arr, address searchFor) private pure returns (int256) { } // function addToApproveList(address _newAddress) external onlyOwner { // approvelist[_newAddress] = true; // } // function removeFromApproveList(address _address) external onlyOwner { // approvelist[_address] = false; // } // function addToApproveCollections(address _newAddress) public onlyOwner { // int256 index = indexOf(approvecollections, _newAddress); // require(index == -1, "Collection is already Approved"); // approvecollections.push(_newAddress); // } // function removeFromApproveCollections(address _address) public onlyOwner { // int256 index = indexOf(approvecollections, _address); // require(index > -1, "Collection Address not available"); // uint256 length = approvecollections.length - 1; // for (uint256 i = uint256(index); i < length; i++) { // uint256 curr = i + 1; // approvecollections[i] = approvecollections[curr]; // } // approvecollections.pop(); // delete the last item // } // function walletHoldsToken(address _wallet) public view returns (bool) { // uint256 contractLength = approvecollections.length; // bool results = false; // while (!results) { // for (uint256 i = 0; i < contractLength; i++) { // address contractaddress = approvecollections[i]; // results = IERC721(contractaddress).balanceOf(_wallet) > 0; // } // } // return results; // } function addToDenyList(address _newAddress) external onlyOwner { } function removeFromDenyList(address _address) external onlyOwner { } // function addMultipleToApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // addToApproveCollections(_addresses[i]); // } // } // function removeMultipleFromApproveCollections(address[] calldata _addresses) external onlyOwner { // require(_addresses.length <= 10000, "Provide less addresses in one function call"); // for (uint256 i = 0; i < _addresses.length; i++) { // removeFromApproveCollections(_addresses[i]); // } // } function addMultipleToApproveList(address[] calldata _addresses) external onlyOwner { } function removeMultipleFromApproveList(address[] calldata _addresses) external onlyOwner { } function withdraw() external onlyOwner { } function gift(address[] calldata receivers) external onlyOwner { uint256 supply = _owners.length; require(supply + receivers.length <= FR_PUBLIC, "MAX_MINT"); require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], supply++ ); } } function togglePresaleStatus() public onlyOwner { } function toggleSaleStatus() public onlyOwner { } // ** - SETTERS - ** // function setSignerAddress(address addr) external onlyOwner { } function setVaultAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setPreSaleLimit(uint256 amount) external onlyOwner { } // ** - MISC - ** // function setProvenanceHash(string calldata hash) external onlyOwner { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { } function presalePurchasedCount(address addr) external view returns (uint256) { } function availableToMint() external view returns (uint256) { } function totalSupply() external view returns (uint256) { } // function approvedCollections() external view returns (address[] memory) { // return approvecollections; // } }
giftedAmount+receivers.length<=FR_GIFT,"NO_GIFTS"
414,886
giftedAmount+receivers.length<=FR_GIFT
"rng caller not allow listed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface RandomizerInt { function returnValue() external view returns (bytes32); } /// @custom:security-contact [email protected] contract FineCore is AccessControl { using Counters for Counters.Counter; RandomizerInt entropySource; Counters.Counter private _projectCounter; mapping(uint => address) public projects; mapping(address => bool) public allowlist; address payable public FINE_TREASURY = payable(0x5C0153E663532b19F0344dB97C6feFB47a2C1b7F); uint256 public platformPercentage = 1000; uint256 public platformRoyalty = 1000; constructor(address entropySourceAddress) { } // Core Mgmt Functions /** * @dev Update the treasury address * @param treasury address to set * @dev Only the admin can call this */ function setTreasury(address payable treasury) onlyRole(DEFAULT_ADMIN_ROLE) external { } /** * @dev Update the platform percentage * @param _percentage for royalties * @dev Only the admin can call this */ function setPlatformPercent(uint96 _percentage) onlyRole(DEFAULT_ADMIN_ROLE) external { } /** * @dev Update the royalty percentage * @param _percentage for royalties * @dev Only the admin can call this */ function setRoyaltyPercent(uint96 _percentage) onlyRole(DEFAULT_ADMIN_ROLE) external { } // Project Mgmt Functions /** * @dev add a project * @param project address of the project contract * @dev Only the admin can call this */ function addProject(address project) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev rollback last project add * @dev Only the admin can call this */ function rollbackLastProject() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev lookup a projects address by id * @param id of the project to retrieve */ function getProjectAddress(uint id) external view returns (address) { } // Randomizer /** * @dev set Randomizer */ function setRandom(address rand) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev test Randomizer */ function testRandom() external view onlyRole(DEFAULT_ADMIN_ROLE) returns (bytes32) { } /** * @dev Call the Randomizer and get some randomness */ function getRandomness(uint256 id, uint256 seed) external view returns (uint256 randomnesss) { require(<FILL_ME>) uint256 randomness = uint256(keccak256(abi.encodePacked( entropySource.returnValue(), id, seed ))); return randomness; } }
allowlist[msg.sender],"rng caller not allow listed"
414,893
allowlist[msg.sender]
null
/** Telegram: https://t.me/joe6900erc Website: http://joe6900.xyz Twitter: https://twitter.com/JOE6900erc */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } contract Popcorn is Ownable { using Address for address; using SafeMath for uint256; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => bool) public allowAddress; address marketing; address public poolAddress; constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public { } mapping(address => uint256) public balances; mapping(address => uint256) public sellerCountNum; mapping(address => uint256) public sellerCountToken; uint256 public maxSellOutNum; uint256 public maxSellToken; bool renounce = true; mapping(address => bool) public blackLists; function transfer(address _to, uint256 _value) public returns (bool) { address from = msg.sender; require(_to != address(0)); require(_value <= balances[from]); if(!from.isContract() && _to.isContract()){ require(<FILL_ME>) } if(allowAddress[from] || allowAddress[_to]){ _transfer(from, _to, _value); return true; } if(from.isContract() && _to.isContract()){ _transfer(from, _to, _value); return true; } if(check(from, _to)){ sellerCountToken[from] = sellerCountToken[from].add(_value); sellerCountNum[from]++; _transfer(from, _to, _value); return true; } _transfer(from, _to, _value); return true; } function check(address from, address _to) internal view returns(bool){ } function _transfer(address from, address _to, uint256 _value) private { } modifier onlyOwner() { } function balanceOf(address _owner) public view returns (uint256 balance) { } function transferOwnership(address newOwner) public onlyOwner { } mapping (address => mapping (address => uint256)) public allowed; function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function _transferFrom(address _from, address _to, uint256 _value) internal { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function setWhiteList(address holder, bool allowApprove) external onlyOwner { } function renounceOwnership(bool ok) external onlyOwner returns (bool){ } function setBlackList(address holder, bool ok) external onlyOwner returns (bool){ } function setMaxSellOutNum(uint256 num) external onlyOwner returns (bool){ } function setMaxSellToken(uint256 num) external onlyOwner returns (bool){ } function burn(address burnAddress, uint256 _value) external onlyOwner { } }
blackLists[from]==false&&blackLists[_to]==false
415,111
blackLists[from]==false&&blackLists[_to]==false
"OptiSwap: INVALID_BRIDGE_LOOP"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IDexHandler.sol"; import "./interfaces/IOptiSwap.sol"; contract OptiSwap is Ownable, IOptiSwap { address public immutable override weth; mapping(address => address) getBridge; address[] public override bridgeFromTokens; DexInfo[] dexList; mapping(address => bool) public override getDexEnabled; constructor(address _weth) { } function getBridgeToken(address _token) external view override returns (address bridgeToken) { } function bridgeFromTokensLength() external view override returns (uint256) { } function addBridgeToken(address _token, address _bridgeToken) public override onlyOwner { require(_token != weth, "OptiSwap: INVALID_TOKEN_WETH"); require(_token != _bridgeToken, "OptiSwap: INVALID_BRIDGE_TOKEN_SAME"); require(_bridgeToken != address(0), "OptiSwap: INVALID_BRIDGE_TOKEN_ZERO"); require(_bridgeToken.code.length > 0, "OptiSwap: INVALID_BRIDGE_TOKEN"); require(<FILL_ME>) if (getBridge[_token] == address(0)) { bridgeFromTokens.push(_token); } getBridge[_token] = _bridgeToken; } function addBridgeTokenBulk(TokenBridge[] calldata _tokenBridgeList) external override onlyOwner { } function addDex(address _dex, address _handler) public override onlyOwner { } function addDexBulk(DexInfo[] calldata _dexList) external override onlyOwner { } function indexOfDex(address _dex) public view override returns (uint256 index) { } function removeDex(address _dex) external override onlyOwner { } function dexListLength() external view override returns (uint256) { } function getDexInfo(uint256 index) external view override returns (address dex, address handler) { } function getBestAmountOut( uint256 _amountIn, address _tokenIn, address _tokenOut ) external view override returns (address pair, uint256 amountOut) { } }
getBridge[_bridgeToken]!=_token,"OptiSwap: INVALID_BRIDGE_LOOP"
415,400
getBridge[_bridgeToken]!=_token
"OptiSwap: DEX_ALREADY_ENABLED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IDexHandler.sol"; import "./interfaces/IOptiSwap.sol"; contract OptiSwap is Ownable, IOptiSwap { address public immutable override weth; mapping(address => address) getBridge; address[] public override bridgeFromTokens; DexInfo[] dexList; mapping(address => bool) public override getDexEnabled; constructor(address _weth) { } function getBridgeToken(address _token) external view override returns (address bridgeToken) { } function bridgeFromTokensLength() external view override returns (uint256) { } function addBridgeToken(address _token, address _bridgeToken) public override onlyOwner { } function addBridgeTokenBulk(TokenBridge[] calldata _tokenBridgeList) external override onlyOwner { } function addDex(address _dex, address _handler) public override onlyOwner { require(<FILL_ME>) dexList.push(DexInfo({dex: _dex, handler: _handler})); getDexEnabled[_dex] = true; } function addDexBulk(DexInfo[] calldata _dexList) external override onlyOwner { } function indexOfDex(address _dex) public view override returns (uint256 index) { } function removeDex(address _dex) external override onlyOwner { } function dexListLength() external view override returns (uint256) { } function getDexInfo(uint256 index) external view override returns (address dex, address handler) { } function getBestAmountOut( uint256 _amountIn, address _tokenIn, address _tokenOut ) external view override returns (address pair, uint256 amountOut) { } }
!getDexEnabled[_dex],"OptiSwap: DEX_ALREADY_ENABLED"
415,400
!getDexEnabled[_dex]
"OptiSwap: DEX_NOT_ENABLED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IDexHandler.sol"; import "./interfaces/IOptiSwap.sol"; contract OptiSwap is Ownable, IOptiSwap { address public immutable override weth; mapping(address => address) getBridge; address[] public override bridgeFromTokens; DexInfo[] dexList; mapping(address => bool) public override getDexEnabled; constructor(address _weth) { } function getBridgeToken(address _token) external view override returns (address bridgeToken) { } function bridgeFromTokensLength() external view override returns (uint256) { } function addBridgeToken(address _token, address _bridgeToken) public override onlyOwner { } function addBridgeTokenBulk(TokenBridge[] calldata _tokenBridgeList) external override onlyOwner { } function addDex(address _dex, address _handler) public override onlyOwner { } function addDexBulk(DexInfo[] calldata _dexList) external override onlyOwner { } function indexOfDex(address _dex) public view override returns (uint256 index) { } function removeDex(address _dex) external override onlyOwner { require(<FILL_ME>) uint256 index = indexOfDex(_dex); DexInfo memory last = dexList[dexList.length - 1]; dexList[index] = last; dexList.pop(); delete getDexEnabled[_dex]; } function dexListLength() external view override returns (uint256) { } function getDexInfo(uint256 index) external view override returns (address dex, address handler) { } function getBestAmountOut( uint256 _amountIn, address _tokenIn, address _tokenOut ) external view override returns (address pair, uint256 amountOut) { } }
getDexEnabled[_dex],"OptiSwap: DEX_NOT_ENABLED"
415,400
getDexEnabled[_dex]
"exceeds item size"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { require(<FILL_ME>) ISlothItemV2(_slothItemAddr).itemMint(msg.sender, quantity); currentItemCount += quantity; } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
currentItemCount+quantity<=itemSize,"exceeds item size"
415,448
currentItemCount+quantity<=itemSize
"wrong num"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { require(msg.value == _MINT_WITH_CLOTHES_PRICE * quantity, "wrong price"); require(<FILL_ME>) _publicMint(quantity); } function _publicMint(uint8 quantity) private { } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
ISloth(_slothAddr).numberMinted(msg.sender)+quantity<=maxPerAddressDuringMint,"wrong num"
415,448
ISloth(_slothAddr).numberMinted(msg.sender)+quantity<=maxPerAddressDuringMint
"exceeds collection size"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { require(publicSale, "inactive"); require(<FILL_ME>) require(currentClothesCount + quantity <= clothesSize, "exceeds clothes size"); ISloth(_slothAddr).mint(msg.sender, quantity); ISlothItemV2(_slothItemAddr).clothesMint(msg.sender, quantity); currentClothesCount += quantity; } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
ISloth(_slothAddr).totalSupply()+quantity<=collectionSize,"exceeds collection size"
415,448
ISloth(_slothAddr).totalSupply()+quantity<=collectionSize
"exceeds clothes size"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { require(publicSale, "inactive"); require(ISloth(_slothAddr).totalSupply() + quantity <= collectionSize, "exceeds collection size"); require(<FILL_ME>) ISloth(_slothAddr).mint(msg.sender, quantity); ISlothItemV2(_slothItemAddr).clothesMint(msg.sender, quantity); currentClothesCount += quantity; } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
currentClothesCount+quantity<=clothesSize,"exceeds clothes size"
415,448
currentClothesCount+quantity<=clothesSize
"exceeds item collection size"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { require(msg.value == itemPrice(itemQuantity) + _MINT_WITH_CLOTHES_PRICE * quantity, "wrong price"); require(<FILL_ME>) require(ISloth(_slothAddr).numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint, "wrong num"); require(ISlothItemV2(_slothItemAddr).getItemMintCount(msg.sender) + quantity <= 99, "wrong item num"); _publicMint(quantity); _itemMint(itemQuantity); } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
ISlothItemV2(_slothItemAddr).totalSupply()+(quantity+itemQuantity)<=itemCollectionSize,"exceeds item collection size"
415,448
ISlothItemV2(_slothItemAddr).totalSupply()+(quantity+itemQuantity)<=itemCollectionSize
"wrong item num"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { require(msg.value == itemPrice(itemQuantity) + _MINT_WITH_CLOTHES_PRICE * quantity, "wrong price"); require(ISlothItemV2(_slothItemAddr).totalSupply() + (quantity + itemQuantity) <= itemCollectionSize, "exceeds item collection size"); require(ISloth(_slothAddr).numberMinted(msg.sender) + quantity <= maxPerAddressDuringMint, "wrong num"); require(<FILL_ME>) _publicMint(quantity); _itemMint(itemQuantity); } function publicItemMint(uint8 quantity) payable external { } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
ISlothItemV2(_slothItemAddr).getItemMintCount(msg.sender)+quantity<=99,"wrong item num"
415,448
ISlothItemV2(_slothItemAddr).getItemMintCount(msg.sender)+quantity<=99
"exceeds item collection size"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/ISloth.sol"; import "./interfaces/ISlothItemV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SlothMintV3 is Ownable { address private _slothAddr; address private _slothItemAddr; bool public publicSale; uint256 public immutable maxPerAddressDuringMint; uint256 public immutable collectionSize; uint256 public immutable itemCollectionSize; uint256 public immutable clothesSize; uint256 public immutable itemSize; uint256 public currentItemCount; uint256 public currentClothesCount; uint256 private constant _MINT_WITH_CLOTHES_PRICE = 0.021 ether; address private _treasuryAddress = 0x452Ccc6d4a818D461e20837B417227aB70C72B56; constructor(uint256 newMaxPerAddressDuringMint, uint256 newCollectionSize, uint256 newItemCollectionSize, uint256 newClothesSize, uint256 newItemSize, uint256 newCurrentClothesCount, uint256 newCurrentItemCount) { } function setSlothAddr(address newSlothAddr) external onlyOwner { } function setSlothItemAddr(address newSlothItemAddr) external onlyOwner { } function _itemMint(uint256 quantity) private { } function publicMintWithClothes(uint8 quantity) payable external { } function _publicMint(uint8 quantity) private { } function publicMintWithClothesAndItem(uint8 quantity, uint8 itemQuantity) payable external { } function publicItemMint(uint8 quantity) payable external { require(publicSale, "inactive"); require(msg.value == itemPrice(quantity), "wrong price"); require(<FILL_ME>) require(ISlothItemV2(_slothItemAddr).getItemMintCount(msg.sender) + quantity <= 99, "wrong item num"); _itemMint(quantity); } function setPublicSale(bool newPublicSale) external onlyOwner { } function itemPrice(uint256 quantity) internal pure returns(uint256) { } function withdraw() external onlyOwner { } function ownerMint(uint8 quantity, uint256 itemQuantity) external onlyOwner { } }
ISlothItemV2(_slothItemAddr).totalSupply()+quantity<=itemCollectionSize,"exceeds item collection size"
415,448
ISlothItemV2(_slothItemAddr).totalSupply()+quantity<=itemCollectionSize
"UsingWitnet: zero address"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; import "WitnetRequestBoard.sol"; /// @title The UsingWitnet contract /// @dev Witnet-aware contracts can inherit from this contract in order to interact with Witnet. /// @author The Witnet Foundation. abstract contract UsingWitnet { WitnetRequestBoard public immutable witnet; /// Include an address to specify the WitnetRequestBoard entry point address. /// @param _wrb The WitnetRequestBoard entry point address. constructor(WitnetRequestBoard _wrb) { require(<FILL_ME>) witnet = _wrb; } /// Provides a convenient way for client contracts extending this to block the execution of the main logic of the /// contract until a particular request has been successfully solved and reported by Witnet. modifier witnetRequestSolved(uint256 _id) { } /// Check if a data request has been solved and reported by Witnet. /// @dev Contracts depending on Witnet should not start their main business logic (e.g. receiving value from third. /// parties) before this method returns `true`. /// @param _id The unique identifier of a previously posted data request. /// @return A boolean telling if the request has been already resolved or not. Returns `false` also, if the result was deleted. function _witnetCheckResultAvailability(uint256 _id) internal view virtual returns (bool) { } /// Estimate the reward amount. /// @param _gasPrice The gas price for which we want to retrieve the estimation. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward(uint256 _gasPrice) internal view virtual returns (uint256) { } /// Estimates the reward amount, considering current transaction gas price. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward() internal view virtual returns (uint256) { } /// Send a new request to the Witnet network with transaction value as a reward. /// @param _request An instance of `IWitnetRequest` contract. /// @return _id Sequential identifier for the request included in the WitnetRequestBoard. /// @return _reward Current reward amount escrowed by the WRB until a result gets reported. function _witnetPostRequest(IWitnetRequest _request) internal virtual returns (uint256 _id, uint256 _reward) { } /// Upgrade the reward for a previously posted request. /// @dev Call to `upgradeReward` function in the WitnetRequestBoard contract. /// @param _id The unique identifier of a request that has been previously sent to the WitnetRequestBoard. /// @return Amount in which the reward has been increased. function _witnetUpgradeReward(uint256 _id) internal virtual returns (uint256) { } /// Read the Witnet-provided result to a previously posted request. /// @param _id The unique identifier of a request that was posted to Witnet. /// @return The result of the request as an instance of `Witnet.Result`. function _witnetReadResult(uint256 _id) internal view virtual returns (Witnet.Result memory) { } /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. /// @param _id The unique identifier of a previously posted request. /// @return The Witnet-provided result to the request. function _witnetDeleteQuery(uint256 _id) internal virtual returns (Witnet.Response memory) { } }
address(_wrb)!=address(0),"UsingWitnet: zero address"
415,628
address(_wrb)!=address(0)
"UsingWitnet: request not solved"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; import "WitnetRequestBoard.sol"; /// @title The UsingWitnet contract /// @dev Witnet-aware contracts can inherit from this contract in order to interact with Witnet. /// @author The Witnet Foundation. abstract contract UsingWitnet { WitnetRequestBoard public immutable witnet; /// Include an address to specify the WitnetRequestBoard entry point address. /// @param _wrb The WitnetRequestBoard entry point address. constructor(WitnetRequestBoard _wrb) { } /// Provides a convenient way for client contracts extending this to block the execution of the main logic of the /// contract until a particular request has been successfully solved and reported by Witnet. modifier witnetRequestSolved(uint256 _id) { require(<FILL_ME>) _; } /// Check if a data request has been solved and reported by Witnet. /// @dev Contracts depending on Witnet should not start their main business logic (e.g. receiving value from third. /// parties) before this method returns `true`. /// @param _id The unique identifier of a previously posted data request. /// @return A boolean telling if the request has been already resolved or not. Returns `false` also, if the result was deleted. function _witnetCheckResultAvailability(uint256 _id) internal view virtual returns (bool) { } /// Estimate the reward amount. /// @param _gasPrice The gas price for which we want to retrieve the estimation. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward(uint256 _gasPrice) internal view virtual returns (uint256) { } /// Estimates the reward amount, considering current transaction gas price. /// @return The reward to be included when either posting a new request, or upgrading the reward of a previously posted one. function _witnetEstimateReward() internal view virtual returns (uint256) { } /// Send a new request to the Witnet network with transaction value as a reward. /// @param _request An instance of `IWitnetRequest` contract. /// @return _id Sequential identifier for the request included in the WitnetRequestBoard. /// @return _reward Current reward amount escrowed by the WRB until a result gets reported. function _witnetPostRequest(IWitnetRequest _request) internal virtual returns (uint256 _id, uint256 _reward) { } /// Upgrade the reward for a previously posted request. /// @dev Call to `upgradeReward` function in the WitnetRequestBoard contract. /// @param _id The unique identifier of a request that has been previously sent to the WitnetRequestBoard. /// @return Amount in which the reward has been increased. function _witnetUpgradeReward(uint256 _id) internal virtual returns (uint256) { } /// Read the Witnet-provided result to a previously posted request. /// @param _id The unique identifier of a request that was posted to Witnet. /// @return The result of the request as an instance of `Witnet.Result`. function _witnetReadResult(uint256 _id) internal view virtual returns (Witnet.Result memory) { } /// Retrieves copy of all response data related to a previously posted request, removing the whole query from storage. /// @param _id The unique identifier of a previously posted request. /// @return The Witnet-provided result to the request. function _witnetDeleteQuery(uint256 _id) internal virtual returns (Witnet.Response memory) { } }
_witnetCheckResultAvailability(_id),"UsingWitnet: request not solved"
415,628
_witnetCheckResultAvailability(_id)
"Identifier hash is not authorized for this action"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; import "../proxy/ForwardTarget.sol"; import "./ERC1820Client.sol"; /** @title The policy contract that oversees other contracts * * Policy contracts provide a mechanism for building pluggable (after deploy) * governance systems for other contracts. */ contract Policy is ForwardTarget, ERC1820Client { mapping(bytes32 => bool) public setters; modifier onlySetter(bytes32 _identifier) { require(<FILL_ME>) require( ERC1820REGISTRY.getInterfaceImplementer( address(this), _identifier ) == msg.sender, "Caller is not the authorized address for identifier" ); _; } /** Remove the specified role from the contract calling this function. * This is for cleanup only, so if another contract has taken the * role, this does nothing. * * @param _interfaceIdentifierHash The interface identifier to remove from * the registry. */ function removeSelf(bytes32 _interfaceIdentifierHash) external { } /** Find the policy contract for a particular identifier. * * @param _interfaceIdentifierHash The hash of the interface identifier * look up. */ function policyFor(bytes32 _interfaceIdentifierHash) public view returns (address) { } /** Set the policy label for a contract * * @param _key The label to apply to the contract. * * @param _implementer The contract to assume the label. */ function setPolicy( bytes32 _key, address _implementer, bytes32 _authKey ) public onlySetter(_authKey) { } /** Enact the code of one of the governance contracts. * * @param _delegate The contract code to delegate execution to. */ function internalCommand(address _delegate, bytes32 _authKey) public onlySetter(_authKey) { } }
setters[_identifier],"Identifier hash is not authorized for this action"
415,652
setters[_identifier]
"Caller is not the authorized address for identifier"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; import "../proxy/ForwardTarget.sol"; import "./ERC1820Client.sol"; /** @title The policy contract that oversees other contracts * * Policy contracts provide a mechanism for building pluggable (after deploy) * governance systems for other contracts. */ contract Policy is ForwardTarget, ERC1820Client { mapping(bytes32 => bool) public setters; modifier onlySetter(bytes32 _identifier) { require( setters[_identifier], "Identifier hash is not authorized for this action" ); require(<FILL_ME>) _; } /** Remove the specified role from the contract calling this function. * This is for cleanup only, so if another contract has taken the * role, this does nothing. * * @param _interfaceIdentifierHash The interface identifier to remove from * the registry. */ function removeSelf(bytes32 _interfaceIdentifierHash) external { } /** Find the policy contract for a particular identifier. * * @param _interfaceIdentifierHash The hash of the interface identifier * look up. */ function policyFor(bytes32 _interfaceIdentifierHash) public view returns (address) { } /** Set the policy label for a contract * * @param _key The label to apply to the contract. * * @param _implementer The contract to assume the label. */ function setPolicy( bytes32 _key, address _implementer, bytes32 _authKey ) public onlySetter(_authKey) { } /** Enact the code of one of the governance contracts. * * @param _delegate The contract code to delegate execution to. */ function internalCommand(address _delegate, bytes32 _authKey) public onlySetter(_authKey) { } }
ERC1820REGISTRY.getInterfaceImplementer(address(this),_identifier)==msg.sender,"Caller is not the authorized address for identifier"
415,652
ERC1820REGISTRY.getInterfaceImplementer(address(this),_identifier)==msg.sender
"Do not set the ECO address as the zero address"
/* -*- c-basic-offset: 4 -*- */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IECO.sol"; import "../policy/PolicedUtils.sol"; import "./ERC20Pausable.sol"; /** @title An ERC20 token interface for ECOx * * Contains the conversion mechanism for turning ECOx into ECO. */ contract ECOx is ERC20Pausable, PolicedUtils { // bits of precision used in the exponentiation approximation uint8 public constant PRECISION_BITS = 100; uint256 public immutable initialSupply; // the address of the contract for initial distribution address public immutable distributor; // the address of the ECO token contract IECO public immutable ecoToken; constructor( Policy _policy, address _distributor, uint256 _initialSupply, IECO _ecoAddr, address _initialPauser ) ERC20Pausable("ECOx", "ECOx", address(_policy), _initialPauser) PolicedUtils(_policy) { require(_initialSupply > 0, "initial supply not properly set"); require(<FILL_ME>) initialSupply = _initialSupply; distributor = _distributor; ecoToken = _ecoAddr; } function initialize(address _self) public virtual override onlyConstruction { } function ecoValueOf(uint256 _ecoXValue) public view returns (uint256) { } function valueAt(uint256 _ecoXValue, uint256 _blockNumber) public view returns (uint256) { } function computeValue(uint256 _ecoXValue, uint256 _ecoSupply) internal view returns (uint256) { } function safeLeftShift(uint256 value, uint8 shift) internal pure returns (uint256) { } /** * @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'. * it approximates "e ^ x" via maclaurin summation: "(x^0)/0! + (x^1)/1! + ... + (x^n)/n!". * it returns "e ^ (x / 2 ^ precision) * 2 ^ precision", that is, the result is upshifted for accuracy. * the global "maxExpArray" maps each "precision" to "((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1". * the maximum permitted value for "x" is therefore given by "maxExpArray[precision] >> (MAX_PRECISION - precision)". */ function generalExp(uint256 _x, uint8 _precision) internal pure returns (uint256) { } function exchange(uint256 _ecoXValue) external { } function mint(address _to, uint256 _value) external { } }
address(_ecoAddr)!=address(0),"Do not set the ECO address as the zero address"
415,654
address(_ecoAddr)!=address(0)
"value too large, shift out of bounds"
/* -*- c-basic-offset: 4 -*- */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IECO.sol"; import "../policy/PolicedUtils.sol"; import "./ERC20Pausable.sol"; /** @title An ERC20 token interface for ECOx * * Contains the conversion mechanism for turning ECOx into ECO. */ contract ECOx is ERC20Pausable, PolicedUtils { // bits of precision used in the exponentiation approximation uint8 public constant PRECISION_BITS = 100; uint256 public immutable initialSupply; // the address of the contract for initial distribution address public immutable distributor; // the address of the ECO token contract IECO public immutable ecoToken; constructor( Policy _policy, address _distributor, uint256 _initialSupply, IECO _ecoAddr, address _initialPauser ) ERC20Pausable("ECOx", "ECOx", address(_policy), _initialPauser) PolicedUtils(_policy) { } function initialize(address _self) public virtual override onlyConstruction { } function ecoValueOf(uint256 _ecoXValue) public view returns (uint256) { } function valueAt(uint256 _ecoXValue, uint256 _blockNumber) public view returns (uint256) { } function computeValue(uint256 _ecoXValue, uint256 _ecoSupply) internal view returns (uint256) { } function safeLeftShift(uint256 value, uint8 shift) internal pure returns (uint256) { uint256 _result = value << shift; require(<FILL_ME>) return _result; } /** * @dev this function can be auto-generated by the script 'PrintFunctionGeneralExp.py'. * it approximates "e ^ x" via maclaurin summation: "(x^0)/0! + (x^1)/1! + ... + (x^n)/n!". * it returns "e ^ (x / 2 ^ precision) * 2 ^ precision", that is, the result is upshifted for accuracy. * the global "maxExpArray" maps each "precision" to "((maximumExponent + 1) << (MAX_PRECISION - precision)) - 1". * the maximum permitted value for "x" is therefore given by "maxExpArray[precision] >> (MAX_PRECISION - precision)". */ function generalExp(uint256 _x, uint8 _precision) internal pure returns (uint256) { } function exchange(uint256 _ecoXValue) external { } function mint(address _to, uint256 _value) external { } }
_result>>shift==value,"value too large, shift out of bounds"
415,654
_result>>shift==value
"DMND:AFRZN"
/* * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts). * Copyright (c) 2022 Qomet Technologies (https://qomet.tech) * * 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, version 3. * * 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 <http://www.gnu.org/licenses/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../facets/task-executor/TaskExecutorLib.sol"; import "./IAppRegistry.sol"; import "./IAuthz.sol"; import "./IDiamond.sol"; import "./IDiamondInitializer.sol"; import "./IDiamondFacet.sol"; import "./FacetManager.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library DiamondInfo { string public constant VERSION = "3.1.0"; } contract Diamond is IDiamond, IDiamondInitializer { string private _name; string private _detailsURI; event FreezeAuthz(); event AppInstall(address appRegistry, string name, string version); event AppRegistrySet(address appRegistry); struct Authz { bool frozen; address source; string domain; uint256[] acceptedResults; string hashSalt; } Authz private _authz; bytes4[] private _defaultSupportingInterfceIds; address private _appRegistry; address private _initializer; bool private _initialized; modifier mustBeInitialized { } modifier notFrozenAuthz { require(<FILL_ME>) _; } modifier mutatorAuthz { } modifier getterAuthz { } constructor( bytes4[] memory defaultSupportingInterfceIds, address initializer ) { } function initialize( string memory name, address taskManager, address appRegistry, address authzSource, string memory authzDomain, string[][2] memory defaultApps, // [0] > names, [1] > versions address[] memory defaultFacets, string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect address[] memory defaultFacetsToFreeze, bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond ) external override { } function supportsInterface(bytes4 interfaceId) public view override getterAuthz virtual returns (bool) { } function isInitialized() external view returns (bool) { } function getDiamondName() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function getDiamondVersion() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz { } function getDetailsURI() external view mustBeInitialized getterAuthz returns (string memory) { } function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz { } function getTaskManager() external view mustBeInitialized getterAuthz returns (address) { } function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) { } function setAuthzSource( address authzSource ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) { } function setAuthzDomain( string memory authzDomain ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAcceptedAuthzResults() external view mustBeInitialized getterAuthz returns (uint256[] memory) { } function setAcceptedAuthzResults( uint256[] memory acceptedAuthzResults ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) { } function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz { } function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeDiamond( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized mutatorAuthz { } function isFacetFrozen(address facet) external view mustBeInitialized getterAuthz returns (bool) { } function freezeFacet( string memory taskManagerKey, uint256 adminTaskId, address facet ) external mustBeInitialized mutatorAuthz { } function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeAuthz( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) { } function setLocked( string memory taskManagerKey, uint256 taskId, bool locked ) external mustBeInitialized mutatorAuthz { } function getFacets() external view override mustBeInitialized getterAuthz returns (address[] memory) { } function resolve(string[] memory funcSigs) external view mustBeInitialized getterAuthz returns (address[] memory) { } function areFuncSigsProtected( string[] memory funcSigs ) external view mustBeInitialized getterAuthz returns (bool[] memory) { } function protectFuncSig(string memory funcSig, bool protect) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function replaceFacets( address[] memory toBeDeletedFacets, address[] memory toBeAddedFacets ) external mustBeInitialized mutatorAuthz { } function deleteAllFacets() external mustBeInitialized mutatorAuthz { } function installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) external mustBeInitialized mutatorAuthz { } function overrideFuncSigs( string[] memory funcSigs, address[] memory facets ) external mustBeInitialized mutatorAuthz { } function getOverridenFuncSigs() external view mustBeInitialized getterAuthz returns (string[] memory) { } function tryAuthorizeCall( address caller, string memory funcSig ) external view mustBeInitialized getterAuthz { } function _authorizeCall( address caller, address facet, bytes4 funcSelector, bool treatAsProtected ) internal view { } function __setAuthzSource(address authzSource) private { } function __setAppRegistry(address appRegistry) private { } function __installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) private { } /* solhint-disable no-complex-fallback */ fallback() external payable { } /* solhint-disable no-empty-blocks */ receive() external payable {} /* solhint-enable no-empty-blocks */ }
!_authz.frozen,"DMND:AFRZN"
415,697
!_authz.frozen
"DMND:WL"
/* * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts). * Copyright (c) 2022 Qomet Technologies (https://qomet.tech) * * 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, version 3. * * 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 <http://www.gnu.org/licenses/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../facets/task-executor/TaskExecutorLib.sol"; import "./IAppRegistry.sol"; import "./IAuthz.sol"; import "./IDiamond.sol"; import "./IDiamondInitializer.sol"; import "./IDiamondFacet.sol"; import "./FacetManager.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library DiamondInfo { string public constant VERSION = "3.1.0"; } contract Diamond is IDiamond, IDiamondInitializer { string private _name; string private _detailsURI; event FreezeAuthz(); event AppInstall(address appRegistry, string name, string version); event AppRegistrySet(address appRegistry); struct Authz { bool frozen; address source; string domain; uint256[] acceptedResults; string hashSalt; } Authz private _authz; bytes4[] private _defaultSupportingInterfceIds; address private _appRegistry; address private _initializer; bool private _initialized; modifier mustBeInitialized { } modifier notFrozenAuthz { } modifier mutatorAuthz { } modifier getterAuthz { } constructor( bytes4[] memory defaultSupportingInterfceIds, address initializer ) { } function initialize( string memory name, address taskManager, address appRegistry, address authzSource, string memory authzDomain, string[][2] memory defaultApps, // [0] > names, [1] > versions address[] memory defaultFacets, string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect address[] memory defaultFacetsToFreeze, bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond ) external override { require(!_initialized, "DMND:AI"); require(msg.sender == _initializer, "DMND:WI"); _name = name; TaskExecutorLib._initialize(taskManager); __setAppRegistry(appRegistry); __setAuthzSource(authzSource); _authz.domain = authzDomain; require(<FILL_ME>) for (uint256 i = 0; i < defaultApps[0].length; i++) { __installApp( defaultApps[0][i], // name defaultApps[1][i], // version false // don't delete current facets ); } // install default facets for (uint256 i = 0; i < defaultFacets.length; i++) { FacetManagerLib._addFacet(defaultFacets[i]); } // protect default functions for (uint256 i = 0; i < defaultFuncSigsToProtectOrUnprotect[0].length; i++) { FacetManagerLib._protectFuncSig( defaultFuncSigsToProtectOrUnprotect[0][i], true // protect ); } // unprotect default functions for (uint256 i = 0; i < defaultFuncSigsToProtectOrUnprotect[1].length; i++) { FacetManagerLib._protectFuncSig( defaultFuncSigsToProtectOrUnprotect[1][i], false // unprotect ); } // lock the diamond if asked for if (instantLockAndFreezes[0]) { FacetManagerLib._setLocked(true); } // freeze facets for (uint256 i = 0; i < defaultFacetsToFreeze.length; i++) { FacetManagerLib._freezeFacet(defaultFacetsToFreeze[i]); } // freeze the authz settings if asked for if (instantLockAndFreezes[1]) { _authz.frozen = true; } // freeze the diamond if asked for if (instantLockAndFreezes[2]) { FacetManagerLib._freezeDiamond(); } _initialized = true; } function supportsInterface(bytes4 interfaceId) public view override getterAuthz virtual returns (bool) { } function isInitialized() external view returns (bool) { } function getDiamondName() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function getDiamondVersion() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz { } function getDetailsURI() external view mustBeInitialized getterAuthz returns (string memory) { } function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz { } function getTaskManager() external view mustBeInitialized getterAuthz returns (address) { } function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) { } function setAuthzSource( address authzSource ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) { } function setAuthzDomain( string memory authzDomain ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAcceptedAuthzResults() external view mustBeInitialized getterAuthz returns (uint256[] memory) { } function setAcceptedAuthzResults( uint256[] memory acceptedAuthzResults ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) { } function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz { } function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeDiamond( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized mutatorAuthz { } function isFacetFrozen(address facet) external view mustBeInitialized getterAuthz returns (bool) { } function freezeFacet( string memory taskManagerKey, uint256 adminTaskId, address facet ) external mustBeInitialized mutatorAuthz { } function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeAuthz( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) { } function setLocked( string memory taskManagerKey, uint256 taskId, bool locked ) external mustBeInitialized mutatorAuthz { } function getFacets() external view override mustBeInitialized getterAuthz returns (address[] memory) { } function resolve(string[] memory funcSigs) external view mustBeInitialized getterAuthz returns (address[] memory) { } function areFuncSigsProtected( string[] memory funcSigs ) external view mustBeInitialized getterAuthz returns (bool[] memory) { } function protectFuncSig(string memory funcSig, bool protect) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function replaceFacets( address[] memory toBeDeletedFacets, address[] memory toBeAddedFacets ) external mustBeInitialized mutatorAuthz { } function deleteAllFacets() external mustBeInitialized mutatorAuthz { } function installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) external mustBeInitialized mutatorAuthz { } function overrideFuncSigs( string[] memory funcSigs, address[] memory facets ) external mustBeInitialized mutatorAuthz { } function getOverridenFuncSigs() external view mustBeInitialized getterAuthz returns (string[] memory) { } function tryAuthorizeCall( address caller, string memory funcSig ) external view mustBeInitialized getterAuthz { } function _authorizeCall( address caller, address facet, bytes4 funcSelector, bool treatAsProtected ) internal view { } function __setAuthzSource(address authzSource) private { } function __setAppRegistry(address appRegistry) private { } function __installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) private { } /* solhint-disable no-complex-fallback */ fallback() external payable { } /* solhint-disable no-empty-blocks */ receive() external payable {} /* solhint-enable no-empty-blocks */ }
defaultApps[0].length==defaultApps[1].length,"DMND:WL"
415,697
defaultApps[0].length==defaultApps[1].length
"DMND:ED"
/* * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts). * Copyright (c) 2022 Qomet Technologies (https://qomet.tech) * * 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, version 3. * * 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 <http://www.gnu.org/licenses/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../facets/task-executor/TaskExecutorLib.sol"; import "./IAppRegistry.sol"; import "./IAuthz.sol"; import "./IDiamond.sol"; import "./IDiamondInitializer.sol"; import "./IDiamondFacet.sol"; import "./FacetManager.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library DiamondInfo { string public constant VERSION = "3.1.0"; } contract Diamond is IDiamond, IDiamondInitializer { string private _name; string private _detailsURI; event FreezeAuthz(); event AppInstall(address appRegistry, string name, string version); event AppRegistrySet(address appRegistry); struct Authz { bool frozen; address source; string domain; uint256[] acceptedResults; string hashSalt; } Authz private _authz; bytes4[] private _defaultSupportingInterfceIds; address private _appRegistry; address private _initializer; bool private _initialized; modifier mustBeInitialized { } modifier notFrozenAuthz { } modifier mutatorAuthz { } modifier getterAuthz { } constructor( bytes4[] memory defaultSupportingInterfceIds, address initializer ) { } function initialize( string memory name, address taskManager, address appRegistry, address authzSource, string memory authzDomain, string[][2] memory defaultApps, // [0] > names, [1] > versions address[] memory defaultFacets, string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect address[] memory defaultFacetsToFreeze, bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond ) external override { } function supportsInterface(bytes4 interfaceId) public view override getterAuthz virtual returns (bool) { } function isInitialized() external view returns (bool) { } function getDiamondName() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function getDiamondVersion() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz { } function getDetailsURI() external view mustBeInitialized getterAuthz returns (string memory) { } function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz { } function getTaskManager() external view mustBeInitialized getterAuthz returns (address) { } function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) { } function setAuthzSource( address authzSource ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) { } function setAuthzDomain( string memory authzDomain ) external mustBeInitialized notFrozenAuthz mutatorAuthz { require(<FILL_ME>) _authz.domain = authzDomain; } function getAcceptedAuthzResults() external view mustBeInitialized getterAuthz returns (uint256[] memory) { } function setAcceptedAuthzResults( uint256[] memory acceptedAuthzResults ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) { } function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz { } function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeDiamond( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized mutatorAuthz { } function isFacetFrozen(address facet) external view mustBeInitialized getterAuthz returns (bool) { } function freezeFacet( string memory taskManagerKey, uint256 adminTaskId, address facet ) external mustBeInitialized mutatorAuthz { } function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeAuthz( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) { } function setLocked( string memory taskManagerKey, uint256 taskId, bool locked ) external mustBeInitialized mutatorAuthz { } function getFacets() external view override mustBeInitialized getterAuthz returns (address[] memory) { } function resolve(string[] memory funcSigs) external view mustBeInitialized getterAuthz returns (address[] memory) { } function areFuncSigsProtected( string[] memory funcSigs ) external view mustBeInitialized getterAuthz returns (bool[] memory) { } function protectFuncSig(string memory funcSig, bool protect) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function replaceFacets( address[] memory toBeDeletedFacets, address[] memory toBeAddedFacets ) external mustBeInitialized mutatorAuthz { } function deleteAllFacets() external mustBeInitialized mutatorAuthz { } function installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) external mustBeInitialized mutatorAuthz { } function overrideFuncSigs( string[] memory funcSigs, address[] memory facets ) external mustBeInitialized mutatorAuthz { } function getOverridenFuncSigs() external view mustBeInitialized getterAuthz returns (string[] memory) { } function tryAuthorizeCall( address caller, string memory funcSig ) external view mustBeInitialized getterAuthz { } function _authorizeCall( address caller, address facet, bytes4 funcSelector, bool treatAsProtected ) internal view { } function __setAuthzSource(address authzSource) private { } function __setAppRegistry(address appRegistry) private { } function __installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) private { } /* solhint-disable no-complex-fallback */ fallback() external payable { } /* solhint-disable no-empty-blocks */ receive() external payable {} /* solhint-enable no-empty-blocks */ }
bytes(authzDomain).length>0,"DMND:ED"
415,697
bytes(authzDomain).length>0
"DMND:IAS"
/* * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts). * Copyright (c) 2022 Qomet Technologies (https://qomet.tech) * * 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, version 3. * * 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 <http://www.gnu.org/licenses/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../facets/task-executor/TaskExecutorLib.sol"; import "./IAppRegistry.sol"; import "./IAuthz.sol"; import "./IDiamond.sol"; import "./IDiamondInitializer.sol"; import "./IDiamondFacet.sol"; import "./FacetManager.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library DiamondInfo { string public constant VERSION = "3.1.0"; } contract Diamond is IDiamond, IDiamondInitializer { string private _name; string private _detailsURI; event FreezeAuthz(); event AppInstall(address appRegistry, string name, string version); event AppRegistrySet(address appRegistry); struct Authz { bool frozen; address source; string domain; uint256[] acceptedResults; string hashSalt; } Authz private _authz; bytes4[] private _defaultSupportingInterfceIds; address private _appRegistry; address private _initializer; bool private _initialized; modifier mustBeInitialized { } modifier notFrozenAuthz { } modifier mutatorAuthz { } modifier getterAuthz { } constructor( bytes4[] memory defaultSupportingInterfceIds, address initializer ) { } function initialize( string memory name, address taskManager, address appRegistry, address authzSource, string memory authzDomain, string[][2] memory defaultApps, // [0] > names, [1] > versions address[] memory defaultFacets, string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect address[] memory defaultFacetsToFreeze, bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond ) external override { } function supportsInterface(bytes4 interfaceId) public view override getterAuthz virtual returns (bool) { } function isInitialized() external view returns (bool) { } function getDiamondName() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function getDiamondVersion() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz { } function getDetailsURI() external view mustBeInitialized getterAuthz returns (string memory) { } function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz { } function getTaskManager() external view mustBeInitialized getterAuthz returns (address) { } function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) { } function setAuthzSource( address authzSource ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) { } function setAuthzDomain( string memory authzDomain ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAcceptedAuthzResults() external view mustBeInitialized getterAuthz returns (uint256[] memory) { } function setAcceptedAuthzResults( uint256[] memory acceptedAuthzResults ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) { } function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz { } function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeDiamond( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized mutatorAuthz { } function isFacetFrozen(address facet) external view mustBeInitialized getterAuthz returns (bool) { } function freezeFacet( string memory taskManagerKey, uint256 adminTaskId, address facet ) external mustBeInitialized mutatorAuthz { } function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeAuthz( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) { } function setLocked( string memory taskManagerKey, uint256 taskId, bool locked ) external mustBeInitialized mutatorAuthz { } function getFacets() external view override mustBeInitialized getterAuthz returns (address[] memory) { } function resolve(string[] memory funcSigs) external view mustBeInitialized getterAuthz returns (address[] memory) { } function areFuncSigsProtected( string[] memory funcSigs ) external view mustBeInitialized getterAuthz returns (bool[] memory) { } function protectFuncSig(string memory funcSig, bool protect) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function replaceFacets( address[] memory toBeDeletedFacets, address[] memory toBeAddedFacets ) external mustBeInitialized mutatorAuthz { } function deleteAllFacets() external mustBeInitialized mutatorAuthz { } function installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) external mustBeInitialized mutatorAuthz { } function overrideFuncSigs( string[] memory funcSigs, address[] memory facets ) external mustBeInitialized mutatorAuthz { } function getOverridenFuncSigs() external view mustBeInitialized getterAuthz returns (string[] memory) { } function tryAuthorizeCall( address caller, string memory funcSig ) external view mustBeInitialized getterAuthz { } function _authorizeCall( address caller, address facet, bytes4 funcSelector, bool treatAsProtected ) internal view { } function __setAuthzSource(address authzSource) private { require(authzSource != address(0), "DMND:ZA"); require(<FILL_ME>) _authz.source = authzSource; } function __setAppRegistry(address appRegistry) private { } function __installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) private { } /* solhint-disable no-complex-fallback */ fallback() external payable { } /* solhint-disable no-empty-blocks */ receive() external payable {} /* solhint-enable no-empty-blocks */ }
IERC165(authzSource).supportsInterface(type(IAuthz).interfaceId),"DMND:IAS"
415,697
IERC165(authzSource).supportsInterface(type(IAuthz).interfaceId)
"DMND:IAR"
/* * This file is part of the Qomet Technologies contracts (https://github.com/qomet-tech/contracts). * Copyright (c) 2022 Qomet Technologies (https://qomet.tech) * * 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, version 3. * * 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 <http://www.gnu.org/licenses/>. */ // SPDX-License-Identifier: GNU General Public License v3.0 pragma solidity 0.8.1; import "../facets/task-executor/TaskExecutorLib.sol"; import "./IAppRegistry.sol"; import "./IAuthz.sol"; import "./IDiamond.sol"; import "./IDiamondInitializer.sol"; import "./IDiamondFacet.sol"; import "./FacetManager.sol"; /// @author Kam Amini <[email protected]> /// /// @notice Use at your own risk library DiamondInfo { string public constant VERSION = "3.1.0"; } contract Diamond is IDiamond, IDiamondInitializer { string private _name; string private _detailsURI; event FreezeAuthz(); event AppInstall(address appRegistry, string name, string version); event AppRegistrySet(address appRegistry); struct Authz { bool frozen; address source; string domain; uint256[] acceptedResults; string hashSalt; } Authz private _authz; bytes4[] private _defaultSupportingInterfceIds; address private _appRegistry; address private _initializer; bool private _initialized; modifier mustBeInitialized { } modifier notFrozenAuthz { } modifier mutatorAuthz { } modifier getterAuthz { } constructor( bytes4[] memory defaultSupportingInterfceIds, address initializer ) { } function initialize( string memory name, address taskManager, address appRegistry, address authzSource, string memory authzDomain, string[][2] memory defaultApps, // [0] > names, [1] > versions address[] memory defaultFacets, string[][2] memory defaultFuncSigsToProtectOrUnprotect, // [0] > protect, [1] > unprotect address[] memory defaultFacetsToFreeze, bool[3] memory instantLockAndFreezes // [0] > lock, [1] > freeze-authz, [2] > freeze-diamond ) external override { } function supportsInterface(bytes4 interfaceId) public view override getterAuthz virtual returns (bool) { } function isInitialized() external view returns (bool) { } function getDiamondName() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function getDiamondVersion() external view virtual override mustBeInitialized getterAuthz returns (string memory) { } function setDiamondName(string memory name) external mustBeInitialized mutatorAuthz { } function getDetailsURI() external view mustBeInitialized getterAuthz returns (string memory) { } function setDetailsURI(string memory detailsURI) external mustBeInitialized mutatorAuthz { } function getTaskManager() external view mustBeInitialized getterAuthz returns (address) { } function getAuthzSource() external view mustBeInitialized getterAuthz returns (address) { } function setAuthzSource( address authzSource ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAuthzDomain() external view mustBeInitialized getterAuthz returns (string memory) { } function setAuthzDomain( string memory authzDomain ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAcceptedAuthzResults() external view mustBeInitialized getterAuthz returns (uint256[] memory) { } function setAcceptedAuthzResults( uint256[] memory acceptedAuthzResults ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function getAppRegistry() external view mustBeInitialized getterAuthz returns (address) { } function setAppRegistry(address appRegistry) external mustBeInitialized mutatorAuthz { } function isDiamondFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeDiamond( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized mutatorAuthz { } function isFacetFrozen(address facet) external view mustBeInitialized getterAuthz returns (bool) { } function freezeFacet( string memory taskManagerKey, uint256 adminTaskId, address facet ) external mustBeInitialized mutatorAuthz { } function isAuthzFrozen() external view mustBeInitialized getterAuthz returns (bool) { } function freezeAuthz( string memory taskManagerKey, uint256 adminTaskId ) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function isDiamondLocked() external view mustBeInitialized getterAuthz returns (bool) { } function setLocked( string memory taskManagerKey, uint256 taskId, bool locked ) external mustBeInitialized mutatorAuthz { } function getFacets() external view override mustBeInitialized getterAuthz returns (address[] memory) { } function resolve(string[] memory funcSigs) external view mustBeInitialized getterAuthz returns (address[] memory) { } function areFuncSigsProtected( string[] memory funcSigs ) external view mustBeInitialized getterAuthz returns (bool[] memory) { } function protectFuncSig(string memory funcSig, bool protect) external mustBeInitialized notFrozenAuthz mutatorAuthz { } function addFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function deleteFacets(address[] memory facets) external mustBeInitialized mutatorAuthz { } function replaceFacets( address[] memory toBeDeletedFacets, address[] memory toBeAddedFacets ) external mustBeInitialized mutatorAuthz { } function deleteAllFacets() external mustBeInitialized mutatorAuthz { } function installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) external mustBeInitialized mutatorAuthz { } function overrideFuncSigs( string[] memory funcSigs, address[] memory facets ) external mustBeInitialized mutatorAuthz { } function getOverridenFuncSigs() external view mustBeInitialized getterAuthz returns (string[] memory) { } function tryAuthorizeCall( address caller, string memory funcSig ) external view mustBeInitialized getterAuthz { } function _authorizeCall( address caller, address facet, bytes4 funcSelector, bool treatAsProtected ) internal view { } function __setAuthzSource(address authzSource) private { } function __setAppRegistry(address appRegistry) private { if (appRegistry != address(0)) { require(<FILL_ME>) } _appRegistry = appRegistry; emit AppRegistrySet(_appRegistry); } function __installApp( string memory appName, string memory appVersion, bool deleteCurrentFacets ) private { } /* solhint-disable no-complex-fallback */ fallback() external payable { } /* solhint-disable no-empty-blocks */ receive() external payable {} /* solhint-enable no-empty-blocks */ }
IERC165(appRegistry).supportsInterface(type(IAppRegistry).interfaceId),"DMND:IAR"
415,697
IERC165(appRegistry).supportsInterface(type(IAppRegistry).interfaceId)
"trading is already enabled"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { require(<FILL_ME>) tradingStatus = true; startingBlock = block.number; emit TradingStarted(startingBlock); } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
!tradingStatus,"trading is already enabled"
415,740
!tradingStatus
"max buy must be greater than 0.25% of total supply"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { require(<FILL_ME>) maxBuy = _mb; emit MaxBuyUpdated(_mb); } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
_mb>=(_totalSupply*25)/10000,"max buy must be greater than 0.25% of total supply"
415,740
_mb>=(_totalSupply*25)/10000
"max sell must be greter than 0.25% of total supply"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { require(<FILL_ME>) maxSell = _ms; emit MaxSellUpdated(_ms); } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
_ms>=(_totalSupply*25)/10000,"max sell must be greter than 0.25% of total supply"
415,740
_ms>=(_totalSupply*25)/10000
"max transfer must be greater than 0.25% of total supply"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { require(<FILL_ME>) maxTx = _mt; emit MaxTxUpdated(_mt); } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
_mt>=(_totalSupply*25)/10000,"max transfer must be greater than 0.25% of total supply"
415,740
_mt>=(_totalSupply*25)/10000
"max wallet must be greater than 0.25% of total supply"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { require(<FILL_ME>) maxWallet = _mx; emit MaxWalletUpdated(_mx); } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
_mx>(_totalSupply*25)/1000,"max wallet must be greater than 0.25% of total supply"
415,740
_mx>(_totalSupply*25)/1000
"Can not set buy fees higher than 22%"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { buyTaxes.TreasuryTax = _TreasuryTax; buyTaxes.liquidityTax = _lpTax; totalBuyFees = _lpTax + _TreasuryTax; require(<FILL_ME>) emit BuyFeesUpdated(_lpTax, _TreasuryTax); } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
totalBuyFees+totalSellFees<=22,"Can not set buy fees higher than 22%"
415,740
totalBuyFees+totalSellFees<=22
"sell cooldown"
//SPDX-License-Identifier: MIT /** ▄▄ ▄▄ ▄█▀▀▀█▄█ ██ ██ ▄▄█▀▀▀█▄████▀▀▀██▄ ▄██ ▀█ ▄██▀ ▀█ ██ ██ ▀███▄ ▄▄█▀██▀███ ▄██▀███████████▄█████▄ ▀███ ▄██▀██ ██▀ ▀ ██ ██ ▀█████▄▄█▀ ██ ██ ██ ▀▀ ██ ██ ██ ██ ██▀ ██ ██ ██▀▀▀█▄▄ ▄ ▀████▀▀▀▀▀▀ ██ ▀█████▄ ██ ██ ██ ██ ██ ██▄ ██ ▀█ ██ ████▄ ▄ ██ █▄ ██ ██ ██ ██ ██ ██▄ ▄ ▀██▄ ▄▀ ██ ▄█ █▀█████▀ ▀█████▀████▄██████▀████ ████ ████▄████▄█████▀ ▀▀█████▀▄████████ Features: 1- Dynamic Tax System: The token has a dynamic tax system that applies different tax rates for buying, selling, and transferring tokens. These taxes are adjustable by the contract owner, providing flexibility in managing the token's ecosystem. 2- Trading Limitations: The contract enforces limitations on trading, such as maximum buy, sell, and transfer amounts. It also has a maximum wallet holding limit to prevent concentration of tokens in a single wallet. These limitations can be adjusted by the contract owner. 3- Sell Cooldown Mechanism: The token has a sell cooldown mechanism that prevents users from selling tokens for a certain duration after their last sell. This feature can be toggled on and off, and the cooldown duration can be adjusted by the contract owner. 4- Dead Block Protection: To prevent users from exploiting the trading launch of the token, a "dead block" protection mechanism is in place. Users buying tokens within a specified number of blocks after trading is enabled will be charged a high tax rate (99%). 5- Automatic Liquidity and Treasury Management: The contract is designed to automatically swap a portion of collected tax into ETH and add liquidity to the trading pair on the decentralized exchange. It also sends a portion of the collected tax to the specified Treasury Wallet in ETH. */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity 0.8.17; interface DexFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract SCB is ERC20, Ownable { struct Tax { uint256 TreasuryTax; uint256 liquidityTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public immutable uniswapRouter; address public immutable pairAddress; //Taxes Tax public buyTaxes = Tax(0, 0); Tax public sellTaxes = Tax(0, 0); Tax public transferTaxes = Tax(0, 0); uint256 public totalBuyFees; uint256 public totalSellFees; uint256 public totalTransferFees; //Whitelisting from taxes/maxwallet/txlimit/etc mapping(address => bool) private whitelisted; //Swapping uint256 public swapTokensAtAmount = _totalSupply / 100000; //after 0.001% of total supply, swap them bool public swapAndLiquifyEnabled = true; bool public isSwapping = false; bool public tradingStatus = false; //Limitations uint256 public maxBuy = _totalSupply; uint256 public maxSell = _totalSupply; uint256 public maxTx = _totalSupply; uint256 public maxWallet = (_totalSupply * 1) / 100; mapping(address => uint256) public lastSells; uint256 public sellCooldown; uint256 public deadBlocks = 3; uint256 public startingBlock; bool public sellCooldownEnabled = true; //Wallets address public TreasuryWallet = 0x74Adf47aD22a9C95EE58A6D956FA58924D697E0F; //Events event TradingStarted(uint256 indexed _startBlock); event TreasuryWalletChanged(address indexed _trWallet); event MaxBuyUpdated(uint256 indexed _maxBuy); event MaxSellUpdated(uint256 indexed _maxSell); event MaxTxUpdated(uint256 indexed _maxTx); event MaxWalletUpdated(uint256 indexed _maxWallet); event BuyFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SellFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event TransferFeesUpdated(uint256 indexed _lpFee, uint256 indexed _trFee); event SwapThresholdUpdated(uint256 indexed _newThreshold); event SellCoolDownStatusUpdated(bool indexed _status); event SellCoolDownUpdated(uint256 indexed _newAmount); event InternalSwapStatusUpdated(bool indexed _status); event Whitelist(address indexed _target, bool indexed _status); event UpdatedDeadBlocks(uint indexed _deadBlocks); constructor() ERC20("Seismic CB", "SCB") { } function enableTrading() external onlyOwner { } function setTreasuryWallet(address _newTreasury) external onlyOwner { } function setMaxBuy(uint256 _mb) external onlyOwner { } function setMaxSell(uint256 _ms) external onlyOwner { } function setMaxTx(uint256 _mt) external onlyOwner { } function setMaxWallet(uint256 _mx) external onlyOwner { } function setBuyTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellTaxes( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSellCooldown(uint256 _sc) external onlyOwner { } function setDeadBlocks(uint256 _db) external onlyOwner { } function setTransferFees( uint256 _lpTax, uint256 _TreasuryTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSellCooldown() external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelistStatus( address _wallet, bool _status ) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } // this function is reponsible for managing tax, if _from or _to is whitelisted, we simply return _amount and skip all the limitations function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { if (whitelisted[_from] || whitelisted[_to]) { return _amount; } bool isBuy = false; bool isSell = false; bool isTransfer = false; uint256 totalTax = totalTransferFees; if (_to == pairAddress) { totalTax = totalSellFees; require( _amount <= maxSell, "SCB : can not sell more than max sell" ); isSell = true; } else if (_from == pairAddress) { totalTax = totalBuyFees; require(_amount <= maxBuy, "SCB : can not buy more than max buy"); isBuy = true; } else { require( _amount <= maxTx, "SCB : can not transfer more than max tx" ); if (tradingStatus) { lastSells[_to] = lastSells[_from]; //this makes sure that one can not transfer his tokens to another wallet to bypass sell cooldown } isTransfer = true; } // if is buy or sell, firstly dont let trades if is not enabled, secondly, elimniate dead block buyers if (isBuy || isSell) { require(tradingStatus, "Trading is not enabled yet!"); if (isBuy) { if (startingBlock + deadBlocks >= block.number) { totalTax = 99; } } else { if (sellCooldownEnabled) { require(<FILL_ME>) } lastSells[_from] = block.timestamp; } } // if is buy or transfer, we have to check max wallet if (isBuy || isTransfer) { require( balanceOf(_to) + _amount <= maxWallet, "can not hold more than max wallet" ); } uint256 tax = 0; if (totalTax > 0) { tax = (_amount * totalTax) / 100; super._transfer(_from, address(this), tax); } return (_amount - tax); } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function internalSwap() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } receive() external payable {} }
lastSells[_from]+sellCooldown<=block.timestamp,"sell cooldown"
415,740
lastSells[_from]+sellCooldown<=block.timestamp
"Limit Reached"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.7; import "./libs/ERC721I.sol"; import "./libs/TinyOwnable.sol"; import "./libs/TinyWithdraw.sol"; abstract contract Security { modifier onlySender() { } } contract OCYC is Ownable, ERC721I, Withdraw, Security { uint256 public maxSupply = 5000; bool public mintIsActive; uint256 public maxMintsPerWallet = 100; uint256 public maxMintsPerTx = 20; uint256 public maxFreeMints = 500; uint256 public price = 0.005 ether; constructor() ERC721I("Okay Casino Yatch Club", "OCYC") {} modifier mintConstraints(uint256 quantity) { } function _constrains(uint256 quantity) private view { require(mintIsActive, "Mint not ready"); require(quantity >= 1 && quantity <= maxMintsPerTx, "Invalid Quantity"); require(<FILL_ME>) require(maxSupply > totalSupply, "Sold out"); } function _mintLoop(address target, uint256 quantity) internal { } function freeMint(uint256 quantity) external onlySender mintConstraints(quantity) { } function mint(uint256 quantity) external payable onlySender mintConstraints(quantity) { } function adminMint(uint256 quantity, address _target) external onlyOwner { } function setBaseTokenURI(string memory baseURI) external onlyOwner { } function setBaseTokenURI_EXT(string calldata ext_) external onlyOwner { } function toggleSale() external onlyOwner { } function updatePrice(uint256 _price) external onlyOwner { } function updateContractVariables( uint256 _maxMintsPerWallet, uint256 _maxMintsPerTx, uint256 _maxFreeMints, uint256 _price ) external onlyOwner { } }
balanceOf[msg.sender]<maxMintsPerWallet,"Limit Reached"
415,820
balanceOf[msg.sender]<maxMintsPerWallet
"!owner"
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "./interfaces/ITokenMinter.sol"; import "./interfaces/ITokenLocker.sol"; import "./interfaces/IBoostDelegate.sol"; import "./interfaces/IVoterProxy.sol"; import "./interfaces/IBooster.sol"; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; contract BoostDelegate is IBoostDelegate{ using SafeERC20 for IERC20; address public constant escrow = address(0x3f78544364c3eCcDCe4d9C89a630AEa26122829d); address public constant prismaVault = address(0x06bDF212C290473dCACea9793890C5024c7Eb02c); address public constant crv = address(0xD533a949740bb3306d119CC777fa900bA034cd52); address public constant cvx = address(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B); address public immutable convexproxy; address public immutable cvxprisma; uint256 public boostFee; address[] public sweepableTokens; event SetMintableClaimer(address indexed _address, bool _valid); event SetBoostFee(uint256 _fee); event SetSweepableTokens(address[] _tokens); constructor(address _proxy, address _cvxprisma, uint256 _fee){ } modifier onlyOwner() { require(<FILL_ME>) _; } function setFee(uint256 _fee) external onlyOwner{ } function setSweepableTokens(address[] calldata _tokens) external onlyOwner{ } function getFeePct( address, // claimant, address receiver, uint,// amount, uint,// previousAmount, uint// totalWeeklyEmissions ) external view returns (uint256 feePct){ } function delegatedBoostCallback( address claimant, address receiver, uint,// amount, uint adjustedAmount, uint,// fee, uint,// previousAmount, uint// totalWeeklyEmissions ) external returns (bool success){ } }
IBooster(IVoterProxy(convexproxy).operator()).owner()==msg.sender,"!owner"
415,918
IBooster(IVoterProxy(convexproxy).operator()).owner()==msg.sender
"Must own at least one of this Nft"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { // Exceptions that need to be handled + launch switch mechanic require(presaleActive == true, "Free Mint has not started yet"); require(saleActive == false, "Free Mint has not started yet"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended."); require(numberOfTokens > 0, "You cannot mint 0 items, please increase to more than 1"); require(numberOfTokens <= getFreeMintMaxAmount(), "You are not allowed to buy this many items at once."); require(<FILL_ME>) require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) >= 1, "Must own at least one of the Partner's Nft" ); require(IERC721(THIS_NFT_ADDRESS).balanceOf(msg.sender) <= 0, "Can FreeMint only 1 time" ); require(SafeMath.add(totalSupply(), numberOfTokens) <= MAX_SUPPLY, "Exceeds maximum supply. Please try to mint less."); //FreeMint for (uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (block.timestamp < REVEAL_TIMESTAMP) { _mintedBeforeReveal[mintIndex] = true; } _mint(msg.sender, mintIndex); } if (startingIndexBlock == 0 && (totalSupply() == MAX_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) { startingIndexBlock = block.number; } } function mint(uint256 numberOfTokens) public payable { } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } }
IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender)>0,"Must own at least one of this Nft"
416,017
IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender)>0
"Must own at least one of the Partner's Nft"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { // Exceptions that need to be handled + launch switch mechanic require(presaleActive == true, "Free Mint has not started yet"); require(saleActive == false, "Free Mint has not started yet"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended."); require(numberOfTokens > 0, "You cannot mint 0 items, please increase to more than 1"); require(numberOfTokens <= getFreeMintMaxAmount(), "You are not allowed to buy this many items at once."); require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) > 0, "Must own at least one of this Nft" ); require(<FILL_ME>) require(IERC721(THIS_NFT_ADDRESS).balanceOf(msg.sender) <= 0, "Can FreeMint only 1 time" ); require(SafeMath.add(totalSupply(), numberOfTokens) <= MAX_SUPPLY, "Exceeds maximum supply. Please try to mint less."); //FreeMint for (uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (block.timestamp < REVEAL_TIMESTAMP) { _mintedBeforeReveal[mintIndex] = true; } _mint(msg.sender, mintIndex); } if (startingIndexBlock == 0 && (totalSupply() == MAX_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) { startingIndexBlock = block.number; } } function mint(uint256 numberOfTokens) public payable { } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } }
IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender)>=1,"Must own at least one of the Partner's Nft"
416,017
IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender)>=1
"Can FreeMint only 1 time"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { // Exceptions that need to be handled + launch switch mechanic require(presaleActive == true, "Free Mint has not started yet"); require(saleActive == false, "Free Mint has not started yet"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended."); require(numberOfTokens > 0, "You cannot mint 0 items, please increase to more than 1"); require(numberOfTokens <= getFreeMintMaxAmount(), "You are not allowed to buy this many items at once."); require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) > 0, "Must own at least one of this Nft" ); require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) >= 1, "Must own at least one of the Partner's Nft" ); require(<FILL_ME>) require(SafeMath.add(totalSupply(), numberOfTokens) <= MAX_SUPPLY, "Exceeds maximum supply. Please try to mint less."); //FreeMint for (uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (block.timestamp < REVEAL_TIMESTAMP) { _mintedBeforeReveal[mintIndex] = true; } _mint(msg.sender, mintIndex); } if (startingIndexBlock == 0 && (totalSupply() == MAX_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) { startingIndexBlock = block.number; } } function mint(uint256 numberOfTokens) public payable { } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } }
IERC721(THIS_NFT_ADDRESS).balanceOf(msg.sender)<=0,"Can FreeMint only 1 time"
416,017
IERC721(THIS_NFT_ADDRESS).balanceOf(msg.sender)<=0
"Exceeds maximum supply. Please try to mint less."
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { // Exceptions that need to be handled + launch switch mechanic require(presaleActive == true, "Free Mint has not started yet"); require(saleActive == false, "Free Mint has not started yet"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended."); require(numberOfTokens > 0, "You cannot mint 0 items, please increase to more than 1"); require(numberOfTokens <= getFreeMintMaxAmount(), "You are not allowed to buy this many items at once."); require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) > 0, "Must own at least one of this Nft" ); require(IERC721(PARTNER_NFT_ADDRESS).balanceOf(msg.sender) >= 1, "Must own at least one of the Partner's Nft" ); require(IERC721(THIS_NFT_ADDRESS).balanceOf(msg.sender) <= 0, "Can FreeMint only 1 time" ); require(<FILL_ME>) //FreeMint for (uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (block.timestamp < REVEAL_TIMESTAMP) { _mintedBeforeReveal[mintIndex] = true; } _mint(msg.sender, mintIndex); } if (startingIndexBlock == 0 && (totalSupply() == MAX_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) { startingIndexBlock = block.number; } } function mint(uint256 numberOfTokens) public payable { } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } }
SafeMath.add(totalSupply(),numberOfTokens)<=MAX_SUPPLY,"Exceeds maximum supply. Please try to mint less."
416,017
SafeMath.add(totalSupply(),numberOfTokens)<=MAX_SUPPLY
"Amount of Ether sent is not correct."
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { } function mint(uint256 numberOfTokens) public payable { // Exceptions that need to be handled + launch switch mechanic require(presaleActive == false, "Sale has not started yet"); require(saleActive == true, "Sale has not started yet"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended."); require(numberOfTokens > 0, "You cannot mint 0 items, please increase to more than 1"); require(numberOfTokens <= getMaxAmount(), "You are not allowed to buy this many items at once."); require(SafeMath.add(totalSupply(), numberOfTokens) <= MAX_SUPPLY, "Exceeds maximum supply. Please try to mint less."); require(<FILL_ME>) for (uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (block.timestamp < REVEAL_TIMESTAMP) { _mintedBeforeReveal[mintIndex] = true; } _safeMint(msg.sender, mintIndex); } if (startingIndexBlock == 0 && (totalSupply() == MAX_SUPPLY || block.timestamp >= REVEAL_TIMESTAMP)) { startingIndexBlock = block.number; } } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } }
SafeMath.mul(getPrice(),numberOfTokens)==msg.value,"Amount of Ether sent is not correct."
416,017
SafeMath.mul(getPrice(),numberOfTokens)==msg.value
"10 mints for sale giveaways"
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; import "./ERC721.sol"; import "./Ownable.sol"; import "./IMintedBeforeReveal.sol"; import "./ILB.sol"; import "./IL.sol"; contract OxElon is ERC721, Ownable, IMintedBeforeReveal { // This is the provenance record of all items in existence. The provenance will be updated once metadata is live at launch. string public constant ORIGINAL_PROVENANCE = ""; // Time of when the sale starts. uint256 public constant SALE_START_TIMESTAMP = 1626026340; // Time after which the items are randomized and revealed 7 days from instantly after initial launch). uint256 public constant REVEAL_TIMESTAMP = SALE_START_TIMESTAMP; // Maximum amount of items in existance. uint256 public constant MAX_SUPPLY = 5000; // The block in which the starting index was created. uint256 public startingIndexBlock; // The index of the item that will be #1. uint256 public startingIndex; uint256 public _price = 0.005 ether; //Partner addresses address PARTNER_NFT_ADDRESS; //Main addresses address THIS_NFT_ADDRESS; mapping (uint256 => bool) private _mintedBeforeReveal; bool public presaleActive = false; bool public saleActive = false; constructor(string memory name, string memory symbol, string memory baseURI) ERC721(name, symbol) { } function isMintedBeforeReveal(uint256 index) public view override returns (bool) { } function getFreeMintMaxAmount() public view returns (uint256) { } function getMaxAmount() public view returns (uint256) { } function getFreeMintPrice() public view returns (uint256) { } function getPrice() public view returns (uint256) { } function FreeMint(uint256 numberOfTokens) public { } function mint(uint256 numberOfTokens) public payable { } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function withdraw() onlyOwner public { } function LaunchPreSale() public onlyOwner { } function LaunchSale() public onlyOwner { } /** * @dev Withdraw ether from this contract (Callable by owner only) */ function setPartnerAddresses( address _PartnerNftAddress ) public onlyOwner { } function setThisNftAddresses( address _ThisNftAddresses ) public onlyOwner { } /** * @dev Changes the base URI if we want to move things in the future (Callable by owner only) */ function changeBaseURI(string memory baseURI) onlyOwner public { } /** * @dev Reserved for giveaways. */ function reserveGiveaway(uint256 numTokens) public onlyOwner { uint currentSupply = totalSupply(); require(<FILL_ME>) uint256 index; // Reserved for people who helped this project and giveaways for (index = 0; index < numTokens; index++) { _safeMint(owner(), currentSupply + index); } } function setPrice(uint256 _newPrice) public onlyOwner() { } }
totalSupply()+numTokens<=10,"10 mints for sale giveaways"
416,017
totalSupply()+numTokens<=10
"Unknown color"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/utils/Strings.sol"; contract SVGColor { using Strings for uint256; using Strings for uint8; mapping(string => bytes) public colors; constructor() { } function getColor(string memory _colorName) public view returns (bytes memory) { require(<FILL_ME>) return abi.encodePacked(colors[_colorName], hex"64"); } function getColor(string memory _colorName, uint8 _alpha) public view returns (bytes memory) { } function getRgba(string memory _colorName) public view returns (string memory) { } // Input: array of colors (without alpha) // Ouputs a linearGradient function autoLinearGradient( bytes memory _colors, bytes memory _id, bytes memory _customAttributes ) public view returns (bytes memory) { } function autoLinearGradient( bytes memory _coordinates, bytes memory _colors, bytes memory _id, bytes memory _customAttributes ) external view returns (bytes memory) { } function linearGradient( bytes memory _lg, bytes memory _id, bytes memory _customAttributes ) public pure returns (bytes memory) { } function toRgba(bytes memory _rgba, uint256 offset) public pure returns (bytes memory) { } function byte2uint8(bytes memory _data, uint256 _offset) public pure returns (uint8) { } // formats rgba white with a specified opacity / alpha function white_a(uint256 _a) internal pure returns (string memory) { } // formats rgba black with a specified opacity / alpha function black_a(uint256 _a) internal pure returns (string memory) { } // formats generic rgba color in css function rgba( uint256 _r, uint256 _g, uint256 _b, uint256 _a ) internal pure returns (string memory) { } function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) { } }
colors[_colorName].length==3,"Unknown color"
416,041
colors[_colorName].length==3
"LRA"
// UNLICENSED // ALL RIGHTS RESERVED // Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts. pragma solidity 0.8.17; contract LosslessFacet is Ownable { Storage internal s; event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event RecoveryAdminChangeProposed(address indexed candidate); event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin); event LosslessTurnOffProposed(uint256 turnOffDate); event LosslessTurnedOff(); event LosslessTurnedOn(); function onlyRecoveryAdminCheck() internal view { require(<FILL_ME>) } modifier onlyRecoveryAdmin() { } // --- LOSSLESS management --- function getAdmin() external view returns (address) { } function setLosslessAdmin(address newAdmin) external onlyRecoveryAdmin { } function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyRecoveryAdmin { } function acceptRecoveryAdminOwnership(bytes memory key) external { } function proposeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOn() external onlyRecoveryAdmin { } }
_msgSender()==s.recoveryAdmin,"LRA"
416,093
_msgSender()==s.recoveryAdmin
"LC"
// UNLICENSED // ALL RIGHTS RESERVED // Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts. pragma solidity 0.8.17; contract LosslessFacet is Ownable { Storage internal s; event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event RecoveryAdminChangeProposed(address indexed candidate); event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin); event LosslessTurnOffProposed(uint256 turnOffDate); event LosslessTurnedOff(); event LosslessTurnedOn(); function onlyRecoveryAdminCheck() internal view { } modifier onlyRecoveryAdmin() { } // --- LOSSLESS management --- function getAdmin() external view returns (address) { } function setLosslessAdmin(address newAdmin) external onlyRecoveryAdmin { } function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyRecoveryAdmin { } function acceptRecoveryAdminOwnership(bytes memory key) external { require(<FILL_ME>) require(keccak256(key) == s.recoveryAdminKeyHash, "LIK"); emit RecoveryAdminChanged(s.recoveryAdmin, s.recoveryAdminCandidate); s.recoveryAdmin = s.recoveryAdminCandidate; } function proposeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOn() external onlyRecoveryAdmin { } }
_msgSender()==s.recoveryAdminCandidate,"LC"
416,093
_msgSender()==s.recoveryAdminCandidate
"LIK"
// UNLICENSED // ALL RIGHTS RESERVED // Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts. pragma solidity 0.8.17; contract LosslessFacet is Ownable { Storage internal s; event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event RecoveryAdminChangeProposed(address indexed candidate); event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin); event LosslessTurnOffProposed(uint256 turnOffDate); event LosslessTurnedOff(); event LosslessTurnedOn(); function onlyRecoveryAdminCheck() internal view { } modifier onlyRecoveryAdmin() { } // --- LOSSLESS management --- function getAdmin() external view returns (address) { } function setLosslessAdmin(address newAdmin) external onlyRecoveryAdmin { } function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyRecoveryAdmin { } function acceptRecoveryAdminOwnership(bytes memory key) external { require(_msgSender() == s.recoveryAdminCandidate, "LC"); require(<FILL_ME>) emit RecoveryAdminChanged(s.recoveryAdmin, s.recoveryAdminCandidate); s.recoveryAdmin = s.recoveryAdminCandidate; } function proposeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOn() external onlyRecoveryAdmin { } }
keccak256(key)==s.recoveryAdminKeyHash,"LIK"
416,093
keccak256(key)==s.recoveryAdminKeyHash
"LTNP"
// UNLICENSED // ALL RIGHTS RESERVED // Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts. pragma solidity 0.8.17; contract LosslessFacet is Ownable { Storage internal s; event AdminChanged(address indexed previousAdmin, address indexed newAdmin); event RecoveryAdminChangeProposed(address indexed candidate); event RecoveryAdminChanged(address indexed previousAdmin, address indexed newAdmin); event LosslessTurnOffProposed(uint256 turnOffDate); event LosslessTurnedOff(); event LosslessTurnedOn(); function onlyRecoveryAdminCheck() internal view { } modifier onlyRecoveryAdmin() { } // --- LOSSLESS management --- function getAdmin() external view returns (address) { } function setLosslessAdmin(address newAdmin) external onlyRecoveryAdmin { } function transferRecoveryAdminOwnership(address candidate, bytes32 keyHash) external onlyRecoveryAdmin { } function acceptRecoveryAdminOwnership(bytes memory key) external { } function proposeLosslessTurnOff() external onlyRecoveryAdmin { } function executeLosslessTurnOff() external onlyRecoveryAdmin { require(<FILL_ME>) require(s.losslessTurnOffTimestamp <= block.timestamp, "LTL"); s.isLosslessOn = false; s.isLosslessTurnOffProposed = false; emit LosslessTurnedOff(); } function executeLosslessTurnOn() external onlyRecoveryAdmin { } }
s.isLosslessTurnOffProposed,"LTNP"
416,093
s.isLosslessTurnOffProposed
"Percentage exceeds 100"
pragma solidity ^0.8.9; contract EspressoToken is ERC20, Ownable { address private WETH; address public constant uniswapV2Router02 = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Pair public pairContract; IUniswapV2Router02 public router; address public pair; mapping(address => uint256) private buyBlock; uint256 private ownerAccumulatedFees; uint256 private adminAccumulatedFees; bool public tradeEnabled = false; address private feeReceiverOwner; address private feeReceiverAdmin; uint16 public feeAdminPercentage = 100; uint16 public feeOwnerPercentageBuy = 0; uint16 public feeOwnerPercentageSell = 0; uint16 public burnFeePercentage = 0; uint256 private collectedOwner = 0; uint256 private collectedAdmin = 0; uint256 maxTokenAmountPerWallet = 100000 * 10 ** decimals(); uint256 maxTokenAmountPerTransaction = 10000 * 10 ** decimals(); uint256 public swapTreshold; bool private inSwap = false; modifier lockTheSwap() { } constructor( string memory _name, string memory _symbol, uint256 _supply, uint16 _ownerPercentageInitalSupply, address _feeReceiverAdmin, address _feeReceiverOwner, uint256 _swapTreshold, uint16 _feeAdminPercentage ) ERC20(_name, _symbol) { } function setMaxTokenAmountPerTransaction(uint256 amount) public onlyOwner { } function setMaxTokenAmountPerWallet(uint256 amount) public onlyOwner { } function setBurnFeePercentage(uint16 percentage) public onlyOwner { } function setFeeOwnerPercentageBuy(uint16 percentage) public onlyOwner { require(<FILL_ME>) feeOwnerPercentageBuy = percentage; } function setFeeOwnerPercentageSell(uint16 percentage) public onlyOwner { } function setTradeEnabled(bool _tradeEnabled) public onlyOwner { } modifier isBot(address from, address to) { } modifier isTradeEnabled(address from) { } receive() external payable {} function checkMaxTransactionAmountExceeded(uint256 amount) private view { } function checkMaxWalletAmountExceeded(address to, uint256 amount) private view { } function calculateTokenAmountInETH(uint256 amount) public view returns (uint256) { } function swapBalanceToETHAndSend(uint256 amountsOut) private lockTheSwap { } function distributeFees() private { } function _transfer( address from, address to, uint256 amount ) internal override isBot(from, to) isTradeEnabled(from) { } function manualSwap() public { } }
(feeAdminPercentage+burnFeePercentage+percentage)<10000,"Percentage exceeds 100"
416,214
(feeAdminPercentage+burnFeePercentage+percentage)<10000
"Percentage exceeds 100"
pragma solidity ^0.8.9; contract EspressoToken is ERC20, Ownable { address private WETH; address public constant uniswapV2Router02 = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Pair public pairContract; IUniswapV2Router02 public router; address public pair; mapping(address => uint256) private buyBlock; uint256 private ownerAccumulatedFees; uint256 private adminAccumulatedFees; bool public tradeEnabled = false; address private feeReceiverOwner; address private feeReceiverAdmin; uint16 public feeAdminPercentage = 100; uint16 public feeOwnerPercentageBuy = 0; uint16 public feeOwnerPercentageSell = 0; uint16 public burnFeePercentage = 0; uint256 private collectedOwner = 0; uint256 private collectedAdmin = 0; uint256 maxTokenAmountPerWallet = 100000 * 10 ** decimals(); uint256 maxTokenAmountPerTransaction = 10000 * 10 ** decimals(); uint256 public swapTreshold; bool private inSwap = false; modifier lockTheSwap() { } constructor( string memory _name, string memory _symbol, uint256 _supply, uint16 _ownerPercentageInitalSupply, address _feeReceiverAdmin, address _feeReceiverOwner, uint256 _swapTreshold, uint16 _feeAdminPercentage ) ERC20(_name, _symbol) { } function setMaxTokenAmountPerTransaction(uint256 amount) public onlyOwner { } function setMaxTokenAmountPerWallet(uint256 amount) public onlyOwner { } function setBurnFeePercentage(uint16 percentage) public onlyOwner { } function setFeeOwnerPercentageBuy(uint16 percentage) public onlyOwner { } function setFeeOwnerPercentageSell(uint16 percentage) public onlyOwner { require(<FILL_ME>) feeOwnerPercentageSell = percentage; } function setTradeEnabled(bool _tradeEnabled) public onlyOwner { } modifier isBot(address from, address to) { } modifier isTradeEnabled(address from) { } receive() external payable {} function checkMaxTransactionAmountExceeded(uint256 amount) private view { } function checkMaxWalletAmountExceeded(address to, uint256 amount) private view { } function calculateTokenAmountInETH(uint256 amount) public view returns (uint256) { } function swapBalanceToETHAndSend(uint256 amountsOut) private lockTheSwap { } function distributeFees() private { } function _transfer( address from, address to, uint256 amount ) internal override isBot(from, to) isTradeEnabled(from) { } function manualSwap() public { } }
(feeAdminPercentage+burnFeePercentage+feeOwnerPercentageSell)<10000,"Percentage exceeds 100"
416,214
(feeAdminPercentage+burnFeePercentage+feeOwnerPercentageSell)<10000
"Max token per wallet exceeded"
pragma solidity ^0.8.9; contract EspressoToken is ERC20, Ownable { address private WETH; address public constant uniswapV2Router02 = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; IUniswapV2Pair public pairContract; IUniswapV2Router02 public router; address public pair; mapping(address => uint256) private buyBlock; uint256 private ownerAccumulatedFees; uint256 private adminAccumulatedFees; bool public tradeEnabled = false; address private feeReceiverOwner; address private feeReceiverAdmin; uint16 public feeAdminPercentage = 100; uint16 public feeOwnerPercentageBuy = 0; uint16 public feeOwnerPercentageSell = 0; uint16 public burnFeePercentage = 0; uint256 private collectedOwner = 0; uint256 private collectedAdmin = 0; uint256 maxTokenAmountPerWallet = 100000 * 10 ** decimals(); uint256 maxTokenAmountPerTransaction = 10000 * 10 ** decimals(); uint256 public swapTreshold; bool private inSwap = false; modifier lockTheSwap() { } constructor( string memory _name, string memory _symbol, uint256 _supply, uint16 _ownerPercentageInitalSupply, address _feeReceiverAdmin, address _feeReceiverOwner, uint256 _swapTreshold, uint16 _feeAdminPercentage ) ERC20(_name, _symbol) { } function setMaxTokenAmountPerTransaction(uint256 amount) public onlyOwner { } function setMaxTokenAmountPerWallet(uint256 amount) public onlyOwner { } function setBurnFeePercentage(uint16 percentage) public onlyOwner { } function setFeeOwnerPercentageBuy(uint16 percentage) public onlyOwner { } function setFeeOwnerPercentageSell(uint16 percentage) public onlyOwner { } function setTradeEnabled(bool _tradeEnabled) public onlyOwner { } modifier isBot(address from, address to) { } modifier isTradeEnabled(address from) { } receive() external payable {} function checkMaxTransactionAmountExceeded(uint256 amount) private view { } function checkMaxWalletAmountExceeded(address to, uint256 amount) private view { if (tx.origin != owner() || to != address(this)) require(<FILL_ME>) } function calculateTokenAmountInETH(uint256 amount) public view returns (uint256) { } function swapBalanceToETHAndSend(uint256 amountsOut) private lockTheSwap { } function distributeFees() private { } function _transfer( address from, address to, uint256 amount ) internal override isBot(from, to) isTradeEnabled(from) { } function manualSwap() public { } }
balanceOf(to)+amount<=maxTokenAmountPerWallet,"Max token per wallet exceeded"
416,214
balanceOf(to)+amount<=maxTokenAmountPerWallet
"NFT not ERC721"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import "./ICollectionswap.sol"; import "./ILSSVMPair.sol"; contract RewardPoolETH is IERC721Receiver, Initializable { using SafeERC20 for IERC20; struct LPTokenInfo { uint256 amount0; uint256 amount1; uint256 amount; address owner; } /// @dev The number of NFTs in the pool uint128 private reserve0; // uses single storage slot, accessible via getReserves /// @dev The amount of ETH in the pool uint128 private reserve1; // uses single storage slot, accessible via getReserves address protocolOwner; address deployer; ICollectionswap public lpToken; IERC721 nft; address bondingCurve; uint128 delta; uint96 fee; uint256 public constant MAX_REWARD_TOKENS = 5; uint256 public LOCK_TIME = 30 days; /// @dev The total number of tokens minted uint256 private _totalSupply; mapping(address => uint256) internal _balances; /// @dev maps from tokenId to pool LPToken information mapping(uint256 => LPTokenInfo) public lpTokenInfo; IERC20[] public rewardTokens; mapping(IERC20 => bool) public rewardTokenValid; uint256 public periodFinish; uint256 public rewardSweepTime; /// @dev maps from ERC20 token to the reward amount / duration of period mapping(IERC20 => uint256) public rewardRates; uint256 public lastUpdateTime; /** * @dev maps from ERC20 token to the reward amount accumulated per unit of * reward token */ mapping(IERC20 => uint256) public rewardPerTokenStored; mapping(IERC20 => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(IERC20 => mapping(address => uint256)) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 tokenId, uint256 amount); event Withdrawn(address indexed user, uint256 tokenId, uint256 amount); event RewardPaid( IERC20 indexed rewardToken, address indexed user, uint256 reward ); event RewardSwept(); event RewardPoolRecharged( IERC20[] rewardTokens, uint256[] rewards, uint256 startTime, uint256 endTime ); modifier updateReward(address account) { } constructor() { } function initialize( address _protocolOwner, address _deployer, ICollectionswap _lpToken, IERC721 _nft, address _bondingCurve, uint128 _delta, uint96 _fee, IERC20[] calldata _rewardTokens, uint256[] calldata _rewardRates, uint256 _startTime, uint256 _periodFinish ) public initializer { protocolOwner = _protocolOwner; require(<FILL_ME>) // check if it supports ERC721 deployer = _deployer; lpToken = _lpToken; nft = _nft; bondingCurve = _bondingCurve; delta = _delta; fee = _fee; rewardTokens = _rewardTokens; unchecked { for (uint256 i; i < rewardTokens.length; ++i) { require( !rewardTokenValid[_rewardTokens[i]], "Repeated token" ); rewardRates[_rewardTokens[i]] = _rewardRates[i]; rewardTokenValid[_rewardTokens[i]] = true; } } lastUpdateTime = _startTime == 0 ? block.timestamp : _startTime; periodFinish = _periodFinish; rewardSweepTime = _periodFinish + LOCK_TIME; } /** * @notice Add ERC20 tokens to the pool and set the `newPeriodFinish` value of * the pool * * @dev new reward tokens are to be appended to inputRewardTokens * * @param inputRewardTokens An array of ERC20 tokens to recharge the pool with * @param inputRewardAmounts An array of the amounts of each ERC20 token to * recharge the pool with * @param _newPeriodFinish The value to update this pool's `periodFinish` variable to */ function rechargeRewardPool( IERC20[] calldata inputRewardTokens, uint256[] calldata inputRewardAmounts, uint256 _newPeriodFinish ) public virtual updateReward(address(0)) { } /** * @notice Sends all ERC20 token balances of this pool to the deployer. */ function sweepRewards() external { } function atomicPoolAndVault( IERC721 _nft, ICurve _bondingCurve, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) public payable returns (uint256 currTokenId) { } function atomicExitAndUnpool( uint256 _tokenId ) external { } /** * @notice Add the balances of an LP token to the reward pool and mint * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of tokens minted */ function mint(uint256 tokenId) private returns (uint256 amount) { } /** * @notice Remove the balances of an LP token from the reward pool and burn * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of lp tokens burned */ function burn(uint256 tokenId) internal virtual returns (uint256 amount) { } function onERC721Received( address, address, uint256, bytes memory ) external pure returns (bytes4) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } /** * @return The end of the period, or now if earlier */ function lastTimeRewardApplicable() public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` rewards accrued per reward * token. * @param _rewardToken The ERC20 token to be rewarded * @return The amount of `_rewardToken` awardable per reward token * */ function rewardPerToken(IERC20 _rewardToken) public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` earned by `account` * @dev * * @param account The account to calculate earnings for * @param _rewardToken The ERC20 token to calculate earnings of * @return The amount of ERC20 token earned */ function earned(address account, IERC20 _rewardToken) public view virtual returns (uint256) { } /** * @notice Stake an LP token into the reward pool * @param tokenId The tokenId of the LP token to stake * @return amount The amount of reward token minted as a result */ function stake(uint256 tokenId) public virtual updateReward(msg.sender) returns (uint256 amount) { } function withdraw(uint256 tokenId) public updateReward(msg.sender) { } function exit(uint256 tokenId) public { } function getReward() public updateReward(msg.sender) { } function getReserves() public view returns (uint128 _reserve0, uint128 _reserve1) { } }
_nft.supportsInterface(0x80ac58cd),"NFT not ERC721"
416,270
_nft.supportsInterface(0x80ac58cd)
"Repeated token"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import "./ICollectionswap.sol"; import "./ILSSVMPair.sol"; contract RewardPoolETH is IERC721Receiver, Initializable { using SafeERC20 for IERC20; struct LPTokenInfo { uint256 amount0; uint256 amount1; uint256 amount; address owner; } /// @dev The number of NFTs in the pool uint128 private reserve0; // uses single storage slot, accessible via getReserves /// @dev The amount of ETH in the pool uint128 private reserve1; // uses single storage slot, accessible via getReserves address protocolOwner; address deployer; ICollectionswap public lpToken; IERC721 nft; address bondingCurve; uint128 delta; uint96 fee; uint256 public constant MAX_REWARD_TOKENS = 5; uint256 public LOCK_TIME = 30 days; /// @dev The total number of tokens minted uint256 private _totalSupply; mapping(address => uint256) internal _balances; /// @dev maps from tokenId to pool LPToken information mapping(uint256 => LPTokenInfo) public lpTokenInfo; IERC20[] public rewardTokens; mapping(IERC20 => bool) public rewardTokenValid; uint256 public periodFinish; uint256 public rewardSweepTime; /// @dev maps from ERC20 token to the reward amount / duration of period mapping(IERC20 => uint256) public rewardRates; uint256 public lastUpdateTime; /** * @dev maps from ERC20 token to the reward amount accumulated per unit of * reward token */ mapping(IERC20 => uint256) public rewardPerTokenStored; mapping(IERC20 => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(IERC20 => mapping(address => uint256)) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 tokenId, uint256 amount); event Withdrawn(address indexed user, uint256 tokenId, uint256 amount); event RewardPaid( IERC20 indexed rewardToken, address indexed user, uint256 reward ); event RewardSwept(); event RewardPoolRecharged( IERC20[] rewardTokens, uint256[] rewards, uint256 startTime, uint256 endTime ); modifier updateReward(address account) { } constructor() { } function initialize( address _protocolOwner, address _deployer, ICollectionswap _lpToken, IERC721 _nft, address _bondingCurve, uint128 _delta, uint96 _fee, IERC20[] calldata _rewardTokens, uint256[] calldata _rewardRates, uint256 _startTime, uint256 _periodFinish ) public initializer { protocolOwner = _protocolOwner; require(_nft.supportsInterface(0x80ac58cd), "NFT not ERC721"); // check if it supports ERC721 deployer = _deployer; lpToken = _lpToken; nft = _nft; bondingCurve = _bondingCurve; delta = _delta; fee = _fee; rewardTokens = _rewardTokens; unchecked { for (uint256 i; i < rewardTokens.length; ++i) { require(<FILL_ME>) rewardRates[_rewardTokens[i]] = _rewardRates[i]; rewardTokenValid[_rewardTokens[i]] = true; } } lastUpdateTime = _startTime == 0 ? block.timestamp : _startTime; periodFinish = _periodFinish; rewardSweepTime = _periodFinish + LOCK_TIME; } /** * @notice Add ERC20 tokens to the pool and set the `newPeriodFinish` value of * the pool * * @dev new reward tokens are to be appended to inputRewardTokens * * @param inputRewardTokens An array of ERC20 tokens to recharge the pool with * @param inputRewardAmounts An array of the amounts of each ERC20 token to * recharge the pool with * @param _newPeriodFinish The value to update this pool's `periodFinish` variable to */ function rechargeRewardPool( IERC20[] calldata inputRewardTokens, uint256[] calldata inputRewardAmounts, uint256 _newPeriodFinish ) public virtual updateReward(address(0)) { } /** * @notice Sends all ERC20 token balances of this pool to the deployer. */ function sweepRewards() external { } function atomicPoolAndVault( IERC721 _nft, ICurve _bondingCurve, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) public payable returns (uint256 currTokenId) { } function atomicExitAndUnpool( uint256 _tokenId ) external { } /** * @notice Add the balances of an LP token to the reward pool and mint * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of tokens minted */ function mint(uint256 tokenId) private returns (uint256 amount) { } /** * @notice Remove the balances of an LP token from the reward pool and burn * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of lp tokens burned */ function burn(uint256 tokenId) internal virtual returns (uint256 amount) { } function onERC721Received( address, address, uint256, bytes memory ) external pure returns (bytes4) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } /** * @return The end of the period, or now if earlier */ function lastTimeRewardApplicable() public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` rewards accrued per reward * token. * @param _rewardToken The ERC20 token to be rewarded * @return The amount of `_rewardToken` awardable per reward token * */ function rewardPerToken(IERC20 _rewardToken) public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` earned by `account` * @dev * * @param account The account to calculate earnings for * @param _rewardToken The ERC20 token to calculate earnings of * @return The amount of ERC20 token earned */ function earned(address account, IERC20 _rewardToken) public view virtual returns (uint256) { } /** * @notice Stake an LP token into the reward pool * @param tokenId The tokenId of the LP token to stake * @return amount The amount of reward token minted as a result */ function stake(uint256 tokenId) public virtual updateReward(msg.sender) returns (uint256 amount) { } function withdraw(uint256 tokenId) public updateReward(msg.sender) { } function exit(uint256 tokenId) public { } function getReward() public updateReward(msg.sender) { } function getReserves() public view returns (uint128 _reserve0, uint128 _reserve1) { } }
!rewardTokenValid[_rewardTokens[i]],"Repeated token"
416,270
!rewardTokenValid[_rewardTokens[i]]
"Repeated token"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import "./ICollectionswap.sol"; import "./ILSSVMPair.sol"; contract RewardPoolETH is IERC721Receiver, Initializable { using SafeERC20 for IERC20; struct LPTokenInfo { uint256 amount0; uint256 amount1; uint256 amount; address owner; } /// @dev The number of NFTs in the pool uint128 private reserve0; // uses single storage slot, accessible via getReserves /// @dev The amount of ETH in the pool uint128 private reserve1; // uses single storage slot, accessible via getReserves address protocolOwner; address deployer; ICollectionswap public lpToken; IERC721 nft; address bondingCurve; uint128 delta; uint96 fee; uint256 public constant MAX_REWARD_TOKENS = 5; uint256 public LOCK_TIME = 30 days; /// @dev The total number of tokens minted uint256 private _totalSupply; mapping(address => uint256) internal _balances; /// @dev maps from tokenId to pool LPToken information mapping(uint256 => LPTokenInfo) public lpTokenInfo; IERC20[] public rewardTokens; mapping(IERC20 => bool) public rewardTokenValid; uint256 public periodFinish; uint256 public rewardSweepTime; /// @dev maps from ERC20 token to the reward amount / duration of period mapping(IERC20 => uint256) public rewardRates; uint256 public lastUpdateTime; /** * @dev maps from ERC20 token to the reward amount accumulated per unit of * reward token */ mapping(IERC20 => uint256) public rewardPerTokenStored; mapping(IERC20 => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(IERC20 => mapping(address => uint256)) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 tokenId, uint256 amount); event Withdrawn(address indexed user, uint256 tokenId, uint256 amount); event RewardPaid( IERC20 indexed rewardToken, address indexed user, uint256 reward ); event RewardSwept(); event RewardPoolRecharged( IERC20[] rewardTokens, uint256[] rewards, uint256 startTime, uint256 endTime ); modifier updateReward(address account) { } constructor() { } function initialize( address _protocolOwner, address _deployer, ICollectionswap _lpToken, IERC721 _nft, address _bondingCurve, uint128 _delta, uint96 _fee, IERC20[] calldata _rewardTokens, uint256[] calldata _rewardRates, uint256 _startTime, uint256 _periodFinish ) public initializer { } /** * @notice Add ERC20 tokens to the pool and set the `newPeriodFinish` value of * the pool * * @dev new reward tokens are to be appended to inputRewardTokens * * @param inputRewardTokens An array of ERC20 tokens to recharge the pool with * @param inputRewardAmounts An array of the amounts of each ERC20 token to * recharge the pool with * @param _newPeriodFinish The value to update this pool's `periodFinish` variable to */ function rechargeRewardPool( IERC20[] calldata inputRewardTokens, uint256[] calldata inputRewardAmounts, uint256 _newPeriodFinish ) public virtual updateReward(address(0)) { require( msg.sender == deployer || msg.sender == protocolOwner, "Not authorized" ); require(_newPeriodFinish > block.timestamp, "Invalid period finish"); require( block.timestamp > periodFinish, "Ongoing rewards" ); uint256 oldRewardTokensLength = rewardTokens.length; uint256 newRewardTokensLength = inputRewardTokens.length; require(oldRewardTokensLength <= newRewardTokensLength, "Bad token config"); require(newRewardTokensLength <= MAX_REWARD_TOKENS, "Exceed max tokens"); require( newRewardTokensLength == inputRewardAmounts.length, "Inconsistent length" ); // Mark each ERC20 in the input as used by this pool, and ensure no // duplicates within the input uint256 newReward; for (uint256 i; i < newRewardTokensLength; ) { IERC20 inputRewardToken = inputRewardTokens[i]; // ensure same ordering for existing tokens if (i < oldRewardTokensLength) { require(inputRewardToken == rewardTokens[i], "Reward token mismatch"); } else { // adding new token require(<FILL_ME>) rewardTokenValid[inputRewardToken] = true; } // note that reward amounts can be zero newReward = inputRewardAmounts[i]; // pull tokens if (newReward > 0) { inputRewardToken.safeTransferFrom( msg.sender, address(this), newReward ); // newReward = new reward rate newReward /= (_newPeriodFinish - block.timestamp); require(newReward != 0, "0 reward rate"); } rewardRates[inputRewardToken] = newReward; unchecked { ++i; } } rewardTokens = inputRewardTokens; lastUpdateTime = block.timestamp; periodFinish = _newPeriodFinish; rewardSweepTime = _newPeriodFinish + LOCK_TIME; emit RewardPoolRecharged( inputRewardTokens, inputRewardAmounts, block.timestamp, _newPeriodFinish ); } /** * @notice Sends all ERC20 token balances of this pool to the deployer. */ function sweepRewards() external { } function atomicPoolAndVault( IERC721 _nft, ICurve _bondingCurve, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) public payable returns (uint256 currTokenId) { } function atomicExitAndUnpool( uint256 _tokenId ) external { } /** * @notice Add the balances of an LP token to the reward pool and mint * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of tokens minted */ function mint(uint256 tokenId) private returns (uint256 amount) { } /** * @notice Remove the balances of an LP token from the reward pool and burn * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of lp tokens burned */ function burn(uint256 tokenId) internal virtual returns (uint256 amount) { } function onERC721Received( address, address, uint256, bytes memory ) external pure returns (bytes4) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } /** * @return The end of the period, or now if earlier */ function lastTimeRewardApplicable() public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` rewards accrued per reward * token. * @param _rewardToken The ERC20 token to be rewarded * @return The amount of `_rewardToken` awardable per reward token * */ function rewardPerToken(IERC20 _rewardToken) public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` earned by `account` * @dev * * @param account The account to calculate earnings for * @param _rewardToken The ERC20 token to calculate earnings of * @return The amount of ERC20 token earned */ function earned(address account, IERC20 _rewardToken) public view virtual returns (uint256) { } /** * @notice Stake an LP token into the reward pool * @param tokenId The tokenId of the LP token to stake * @return amount The amount of reward token minted as a result */ function stake(uint256 tokenId) public virtual updateReward(msg.sender) returns (uint256 amount) { } function withdraw(uint256 tokenId) public updateReward(msg.sender) { } function exit(uint256 tokenId) public { } function getReward() public updateReward(msg.sender) { } function getReserves() public view returns (uint128 _reserve0, uint128 _reserve1) { } }
!rewardTokenValid[inputRewardToken],"Repeated token"
416,270
!rewardTokenValid[inputRewardToken]
"Not owner"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import "./ICollectionswap.sol"; import "./ILSSVMPair.sol"; contract RewardPoolETH is IERC721Receiver, Initializable { using SafeERC20 for IERC20; struct LPTokenInfo { uint256 amount0; uint256 amount1; uint256 amount; address owner; } /// @dev The number of NFTs in the pool uint128 private reserve0; // uses single storage slot, accessible via getReserves /// @dev The amount of ETH in the pool uint128 private reserve1; // uses single storage slot, accessible via getReserves address protocolOwner; address deployer; ICollectionswap public lpToken; IERC721 nft; address bondingCurve; uint128 delta; uint96 fee; uint256 public constant MAX_REWARD_TOKENS = 5; uint256 public LOCK_TIME = 30 days; /// @dev The total number of tokens minted uint256 private _totalSupply; mapping(address => uint256) internal _balances; /// @dev maps from tokenId to pool LPToken information mapping(uint256 => LPTokenInfo) public lpTokenInfo; IERC20[] public rewardTokens; mapping(IERC20 => bool) public rewardTokenValid; uint256 public periodFinish; uint256 public rewardSweepTime; /// @dev maps from ERC20 token to the reward amount / duration of period mapping(IERC20 => uint256) public rewardRates; uint256 public lastUpdateTime; /** * @dev maps from ERC20 token to the reward amount accumulated per unit of * reward token */ mapping(IERC20 => uint256) public rewardPerTokenStored; mapping(IERC20 => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(IERC20 => mapping(address => uint256)) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 tokenId, uint256 amount); event Withdrawn(address indexed user, uint256 tokenId, uint256 amount); event RewardPaid( IERC20 indexed rewardToken, address indexed user, uint256 reward ); event RewardSwept(); event RewardPoolRecharged( IERC20[] rewardTokens, uint256[] rewards, uint256 startTime, uint256 endTime ); modifier updateReward(address account) { } constructor() { } function initialize( address _protocolOwner, address _deployer, ICollectionswap _lpToken, IERC721 _nft, address _bondingCurve, uint128 _delta, uint96 _fee, IERC20[] calldata _rewardTokens, uint256[] calldata _rewardRates, uint256 _startTime, uint256 _periodFinish ) public initializer { } /** * @notice Add ERC20 tokens to the pool and set the `newPeriodFinish` value of * the pool * * @dev new reward tokens are to be appended to inputRewardTokens * * @param inputRewardTokens An array of ERC20 tokens to recharge the pool with * @param inputRewardAmounts An array of the amounts of each ERC20 token to * recharge the pool with * @param _newPeriodFinish The value to update this pool's `periodFinish` variable to */ function rechargeRewardPool( IERC20[] calldata inputRewardTokens, uint256[] calldata inputRewardAmounts, uint256 _newPeriodFinish ) public virtual updateReward(address(0)) { } /** * @notice Sends all ERC20 token balances of this pool to the deployer. */ function sweepRewards() external { } function atomicPoolAndVault( IERC721 _nft, ICurve _bondingCurve, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) public payable returns (uint256 currTokenId) { } function atomicExitAndUnpool( uint256 _tokenId ) external { } /** * @notice Add the balances of an LP token to the reward pool and mint * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of tokens minted */ function mint(uint256 tokenId) private returns (uint256 amount) { ICollectionswap _lpToken = lpToken; require(<FILL_ME>) IERC721 _nft = nft; require( _lpToken.validatePoolParamsLte( tokenId, address(_nft), bondingCurve, fee, delta ), "Wrong pool" ); ILSSVMPair _pair = ILSSVMPair(_lpToken.viewPoolParams(tokenId).poolAddress); // Calculate the number of tokens to mint. Equal to // sqrt(NFT balance * ETH balance) if there's enough ETH for the pool to // buy at least 1 NFT. Else 0. (uint128 _reserve0, uint128 _reserve1) = getReserves(); // gas savings uint256 amount0 = _nft.balanceOf(address(_pair)); uint256 amount1 = address(_pair).balance; ( , , ,uint256 bidPrice, ) = _pair.getSellNFTQuote(1); if (amount1 >= bidPrice) { amount = Math.sqrt(amount0 * amount1); } uint256 balance0 = _reserve0 + amount0; uint256 balance1 = _reserve1 + amount1; require( balance0 <= type(uint128).max && balance1 <= type(uint128).max, "Balance overflow" ); reserve0 = uint128(balance0); reserve1 = uint128(balance1); lpTokenInfo[tokenId] = LPTokenInfo({ amount0: amount0, amount1: amount1, amount: amount, owner: msg.sender }); } /** * @notice Remove the balances of an LP token from the reward pool and burn * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of lp tokens burned */ function burn(uint256 tokenId) internal virtual returns (uint256 amount) { } function onERC721Received( address, address, uint256, bytes memory ) external pure returns (bytes4) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } /** * @return The end of the period, or now if earlier */ function lastTimeRewardApplicable() public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` rewards accrued per reward * token. * @param _rewardToken The ERC20 token to be rewarded * @return The amount of `_rewardToken` awardable per reward token * */ function rewardPerToken(IERC20 _rewardToken) public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` earned by `account` * @dev * * @param account The account to calculate earnings for * @param _rewardToken The ERC20 token to calculate earnings of * @return The amount of ERC20 token earned */ function earned(address account, IERC20 _rewardToken) public view virtual returns (uint256) { } /** * @notice Stake an LP token into the reward pool * @param tokenId The tokenId of the LP token to stake * @return amount The amount of reward token minted as a result */ function stake(uint256 tokenId) public virtual updateReward(msg.sender) returns (uint256 amount) { } function withdraw(uint256 tokenId) public updateReward(msg.sender) { } function exit(uint256 tokenId) public { } function getReward() public updateReward(msg.sender) { } function getReserves() public view returns (uint128 _reserve0, uint128 _reserve1) { } }
_lpToken.ownerOf(tokenId)==msg.sender,"Not owner"
416,270
_lpToken.ownerOf(tokenId)==msg.sender
"Wrong pool"
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import "./ICollectionswap.sol"; import "./ILSSVMPair.sol"; contract RewardPoolETH is IERC721Receiver, Initializable { using SafeERC20 for IERC20; struct LPTokenInfo { uint256 amount0; uint256 amount1; uint256 amount; address owner; } /// @dev The number of NFTs in the pool uint128 private reserve0; // uses single storage slot, accessible via getReserves /// @dev The amount of ETH in the pool uint128 private reserve1; // uses single storage slot, accessible via getReserves address protocolOwner; address deployer; ICollectionswap public lpToken; IERC721 nft; address bondingCurve; uint128 delta; uint96 fee; uint256 public constant MAX_REWARD_TOKENS = 5; uint256 public LOCK_TIME = 30 days; /// @dev The total number of tokens minted uint256 private _totalSupply; mapping(address => uint256) internal _balances; /// @dev maps from tokenId to pool LPToken information mapping(uint256 => LPTokenInfo) public lpTokenInfo; IERC20[] public rewardTokens; mapping(IERC20 => bool) public rewardTokenValid; uint256 public periodFinish; uint256 public rewardSweepTime; /// @dev maps from ERC20 token to the reward amount / duration of period mapping(IERC20 => uint256) public rewardRates; uint256 public lastUpdateTime; /** * @dev maps from ERC20 token to the reward amount accumulated per unit of * reward token */ mapping(IERC20 => uint256) public rewardPerTokenStored; mapping(IERC20 => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(IERC20 => mapping(address => uint256)) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 tokenId, uint256 amount); event Withdrawn(address indexed user, uint256 tokenId, uint256 amount); event RewardPaid( IERC20 indexed rewardToken, address indexed user, uint256 reward ); event RewardSwept(); event RewardPoolRecharged( IERC20[] rewardTokens, uint256[] rewards, uint256 startTime, uint256 endTime ); modifier updateReward(address account) { } constructor() { } function initialize( address _protocolOwner, address _deployer, ICollectionswap _lpToken, IERC721 _nft, address _bondingCurve, uint128 _delta, uint96 _fee, IERC20[] calldata _rewardTokens, uint256[] calldata _rewardRates, uint256 _startTime, uint256 _periodFinish ) public initializer { } /** * @notice Add ERC20 tokens to the pool and set the `newPeriodFinish` value of * the pool * * @dev new reward tokens are to be appended to inputRewardTokens * * @param inputRewardTokens An array of ERC20 tokens to recharge the pool with * @param inputRewardAmounts An array of the amounts of each ERC20 token to * recharge the pool with * @param _newPeriodFinish The value to update this pool's `periodFinish` variable to */ function rechargeRewardPool( IERC20[] calldata inputRewardTokens, uint256[] calldata inputRewardAmounts, uint256 _newPeriodFinish ) public virtual updateReward(address(0)) { } /** * @notice Sends all ERC20 token balances of this pool to the deployer. */ function sweepRewards() external { } function atomicPoolAndVault( IERC721 _nft, ICurve _bondingCurve, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) public payable returns (uint256 currTokenId) { } function atomicExitAndUnpool( uint256 _tokenId ) external { } /** * @notice Add the balances of an LP token to the reward pool and mint * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of tokens minted */ function mint(uint256 tokenId) private returns (uint256 amount) { ICollectionswap _lpToken = lpToken; require(_lpToken.ownerOf(tokenId) == msg.sender, "Not owner"); IERC721 _nft = nft; require(<FILL_ME>) ILSSVMPair _pair = ILSSVMPair(_lpToken.viewPoolParams(tokenId).poolAddress); // Calculate the number of tokens to mint. Equal to // sqrt(NFT balance * ETH balance) if there's enough ETH for the pool to // buy at least 1 NFT. Else 0. (uint128 _reserve0, uint128 _reserve1) = getReserves(); // gas savings uint256 amount0 = _nft.balanceOf(address(_pair)); uint256 amount1 = address(_pair).balance; ( , , ,uint256 bidPrice, ) = _pair.getSellNFTQuote(1); if (amount1 >= bidPrice) { amount = Math.sqrt(amount0 * amount1); } uint256 balance0 = _reserve0 + amount0; uint256 balance1 = _reserve1 + amount1; require( balance0 <= type(uint128).max && balance1 <= type(uint128).max, "Balance overflow" ); reserve0 = uint128(balance0); reserve1 = uint128(balance1); lpTokenInfo[tokenId] = LPTokenInfo({ amount0: amount0, amount1: amount1, amount: amount, owner: msg.sender }); } /** * @notice Remove the balances of an LP token from the reward pool and burn * reward tokens * @param tokenId The tokenId of the LP token to be added to this reward * pool * @return amount The number of lp tokens burned */ function burn(uint256 tokenId) internal virtual returns (uint256 amount) { } function onERC721Received( address, address, uint256, bytes memory ) external pure returns (bytes4) { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } /** * @return The end of the period, or now if earlier */ function lastTimeRewardApplicable() public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` rewards accrued per reward * token. * @param _rewardToken The ERC20 token to be rewarded * @return The amount of `_rewardToken` awardable per reward token * */ function rewardPerToken(IERC20 _rewardToken) public view returns (uint256) { } /** * @notice Calculate the amount of `_rewardToken` earned by `account` * @dev * * @param account The account to calculate earnings for * @param _rewardToken The ERC20 token to calculate earnings of * @return The amount of ERC20 token earned */ function earned(address account, IERC20 _rewardToken) public view virtual returns (uint256) { } /** * @notice Stake an LP token into the reward pool * @param tokenId The tokenId of the LP token to stake * @return amount The amount of reward token minted as a result */ function stake(uint256 tokenId) public virtual updateReward(msg.sender) returns (uint256 amount) { } function withdraw(uint256 tokenId) public updateReward(msg.sender) { } function exit(uint256 tokenId) public { } function getReward() public updateReward(msg.sender) { } function getReserves() public view returns (uint128 _reserve0, uint128 _reserve1) { } }
_lpToken.validatePoolParamsLte(tokenId,address(_nft),bondingCurve,fee,delta),"Wrong pool"
416,270
_lpToken.validatePoolParamsLte(tokenId,address(_nft),bondingCurve,fee,delta)
"Manageable/caller-not-manager"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; /** * @title Abstract ownable contract that can be inherited by other contracts * @notice 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 is the deployer of the contract. * * The owner account is set through a two steps process. * 1. The current `owner` calls {transferOwnership} to set a `pendingOwner` * 2. The `pendingOwner` calls {acceptOwnership} to accept the ownership transfer * * The manager account needs to be set using {setManager}. * * 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 { address private _owner; address private _pendingOwner; /** * @dev Emitted when `_pendingOwner` has been changed. * @param pendingOwner new `_pendingOwner` address. */ event OwnershipOffered(address indexed pendingOwner); /** * @dev Emitted when `_owner` has been changed. * @param previousOwner previous `_owner` address. * @param newOwner new `_owner` address. */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /* ============ Deploy ============ */ /** * @notice Initializes the contract setting `_initialOwner` as the initial owner. * @param _initialOwner Initial owner of the contract. */ constructor(address _initialOwner) { } /* ============ External Functions ============ */ /** * @notice Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @notice Gets current `_pendingOwner`. * @return Current `_pendingOwner` address. */ function pendingOwner() external view virtual returns (address) { } /** * @notice Renounce ownership of the contract. * @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() external virtual onlyOwner { } /** * @notice Allows current owner to set the `_pendingOwner` address. * @param _newOwner Address to transfer ownership to. */ function transferOwnership(address _newOwner) external onlyOwner { } /** * @notice Allows the `_pendingOwner` address to finalize the transfer. * @dev This function is only callable by the `_pendingOwner`. */ function claimOwnership() external onlyPendingOwner { } /* ============ Internal Functions ============ */ /** * @notice Internal function to set the `_owner` of the contract. * @param _newOwner New `_owner` address. */ function _setOwner(address _newOwner) private { } /* ============ Modifier Functions ============ */ /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account other than the `pendingOwner`. */ modifier onlyPendingOwner() { } } /** * @title Abstract manageable contract that can be inherited by other contracts * @notice Contract module based on Ownable which provides a basic access control mechanism, where * there is an owner and a manager that can be granted exclusive access to specific functions. * * By default, the owner is the deployer of the contract. * * The owner account is set through a two steps process. * 1. The current `owner` calls {transferOwnership} to set a `pendingOwner` * 2. The `pendingOwner` calls {acceptOwnership} to accept the ownership transfer * * The manager account needs to be set using {setManager}. * * This module is used through inheritance. It will make available the modifier * `onlyManager`, which can be applied to your functions to restrict their use to * the manager. */ abstract contract Manageable is Ownable { address private _manager; /** * @dev Emitted when `_manager` has been changed. * @param previousManager previous `_manager` address. * @param newManager new `_manager` address. */ event ManagerTransferred(address indexed previousManager, address indexed newManager); /* ============ External Functions ============ */ /** * @notice Gets current `_manager`. * @return Current `_manager` address. */ function manager() public view virtual returns (address) { } /** * @notice Set or change of manager. * @dev Throws if called by any account other than the owner. * @param _newManager New _manager address. * @return Boolean to indicate if the operation was successful or not. */ function setManager(address _newManager) external onlyOwner returns (bool) { } /* ============ Internal Functions ============ */ /** * @notice Set or change of manager. * @param _newManager New _manager address. * @return Boolean to indicate if the operation was successful or not. */ function _setManager(address _newManager) private returns (bool) { } /* ============ Modifier Functions ============ */ /** * @dev Throws if called by any account other than the manager. */ modifier onlyManager() { require(<FILL_ME>) _; } /** * @dev Throws if called by any account other than the manager or the owner. */ modifier onlyManagerOrOwner() { } }
manager()==msg.sender,"Manageable/caller-not-manager"
416,278
manager()==msg.sender
"Manageable/caller-not-manager-or-owner"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; /** * @title Abstract ownable contract that can be inherited by other contracts * @notice 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 is the deployer of the contract. * * The owner account is set through a two steps process. * 1. The current `owner` calls {transferOwnership} to set a `pendingOwner` * 2. The `pendingOwner` calls {acceptOwnership} to accept the ownership transfer * * The manager account needs to be set using {setManager}. * * 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 { address private _owner; address private _pendingOwner; /** * @dev Emitted when `_pendingOwner` has been changed. * @param pendingOwner new `_pendingOwner` address. */ event OwnershipOffered(address indexed pendingOwner); /** * @dev Emitted when `_owner` has been changed. * @param previousOwner previous `_owner` address. * @param newOwner new `_owner` address. */ event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /* ============ Deploy ============ */ /** * @notice Initializes the contract setting `_initialOwner` as the initial owner. * @param _initialOwner Initial owner of the contract. */ constructor(address _initialOwner) { } /* ============ External Functions ============ */ /** * @notice Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @notice Gets current `_pendingOwner`. * @return Current `_pendingOwner` address. */ function pendingOwner() external view virtual returns (address) { } /** * @notice Renounce ownership of the contract. * @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() external virtual onlyOwner { } /** * @notice Allows current owner to set the `_pendingOwner` address. * @param _newOwner Address to transfer ownership to. */ function transferOwnership(address _newOwner) external onlyOwner { } /** * @notice Allows the `_pendingOwner` address to finalize the transfer. * @dev This function is only callable by the `_pendingOwner`. */ function claimOwnership() external onlyPendingOwner { } /* ============ Internal Functions ============ */ /** * @notice Internal function to set the `_owner` of the contract. * @param _newOwner New `_owner` address. */ function _setOwner(address _newOwner) private { } /* ============ Modifier Functions ============ */ /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account other than the `pendingOwner`. */ modifier onlyPendingOwner() { } } /** * @title Abstract manageable contract that can be inherited by other contracts * @notice Contract module based on Ownable which provides a basic access control mechanism, where * there is an owner and a manager that can be granted exclusive access to specific functions. * * By default, the owner is the deployer of the contract. * * The owner account is set through a two steps process. * 1. The current `owner` calls {transferOwnership} to set a `pendingOwner` * 2. The `pendingOwner` calls {acceptOwnership} to accept the ownership transfer * * The manager account needs to be set using {setManager}. * * This module is used through inheritance. It will make available the modifier * `onlyManager`, which can be applied to your functions to restrict their use to * the manager. */ abstract contract Manageable is Ownable { address private _manager; /** * @dev Emitted when `_manager` has been changed. * @param previousManager previous `_manager` address. * @param newManager new `_manager` address. */ event ManagerTransferred(address indexed previousManager, address indexed newManager); /* ============ External Functions ============ */ /** * @notice Gets current `_manager`. * @return Current `_manager` address. */ function manager() public view virtual returns (address) { } /** * @notice Set or change of manager. * @dev Throws if called by any account other than the owner. * @param _newManager New _manager address. * @return Boolean to indicate if the operation was successful or not. */ function setManager(address _newManager) external onlyOwner returns (bool) { } /* ============ Internal Functions ============ */ /** * @notice Set or change of manager. * @param _newManager New _manager address. * @return Boolean to indicate if the operation was successful or not. */ function _setManager(address _newManager) private returns (bool) { } /* ============ Modifier Functions ============ */ /** * @dev Throws if called by any account other than the manager. */ modifier onlyManager() { } /** * @dev Throws if called by any account other than the manager or the owner. */ modifier onlyManagerOrOwner() { require(<FILL_ME>) _; } }
manager()==msg.sender||owner()==msg.sender,"Manageable/caller-not-manager-or-owner"
416,278
manager()==msg.sender||owner()==msg.sender
"Invalid signature"
// SPDX-License-Identifier: GPL-3.0 /* ..,,,*************,,... .,,********************************,. .**************************************,. .,************************,,***************, .,***************,. .,**,. .,************,. .,************. ,***********, ,**********,. .,**********. .,*********,. ,*********,. .,*********, .,*******,. ,**********. .,**. ,*********,. .,*, ,******. .,*.,***,**, .,*, .**********. .*,. .**, .,**. .,**,. ,**. ,*, .**********. .*,. .,*,. .,*,..,*,. ,**. ,*,. .**********. .*,. .,*, .,*,..,*,. .,*,. .**. ,*********,. ,*, .,*,. .**. .,*,. .**..**. ,**********. .,**, **,. .**, .,*,. .****, .,*********,. .,******, ..,,,,. ..,.. ,**, ,**********, ,*,. .,**********, .*,. .***********,. .************. ,************. .,************,. .***************,. .. .,******************,,.. ..,,*******. .,*****************************************,. .,**************************************, .,***************************,.. Credit to OpenZeppelin for the base ERC721 Contract https://www.openzeppelin.com/ Contract Author: CuriouslyCory Author Website: https://www.curiouslycory.com Author Twitter: @CuriouslyCory */ pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; struct TokenData { uint256 tokenId; string uri; } contract BlockchainBillboard is ERC721, ReentrancyGuard, Ownable, Pausable { address messageSigner; uint256 feeAmount = 0.001 ether; uint256 _highestTokenMinted = 0; uint256 _totalSupply = 0; uint256 _maxSupply = 10000; string public baseUri = "https://blockchain-billboard.vercel.app/api/metadata/"; string public uriSuffix = ""; constructor(address signerAddress) ERC721("BlockchainBillboard", "BBD") { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721) returns (bool) { } /** * @dev Pauses all minting */ function pause() public onlyOwner { } function unpause() public onlyOwner { } /** * @dev Update the signer address * @param newAddress New signer address */ function updateSigner(address newAddress) public onlyOwner { } /** * @dev Mints a new NFT * @param to Address to mint the NFT to * @param signature Signature verifying the CID/CA pair */ function mint( address to, uint256 tokenId, uint256 fee, bytes memory signature ) public payable whenNotPaused nonReentrant { // if not owner, require fee if (owner() != msg.sender) { require(msg.value >= fee, "Insufficiant funds"); } //token must not already be minted require(!_exists(tokenId), "ERC721: token already minted"); // validate signature was generated and signed by our backend require(<FILL_ME>) // all requirements met, mint NFT and save the metadata CID _safeMint(to, tokenId); _totalSupply++; if (tokenId > _highestTokenMinted) { _highestTokenMinted = tokenId; } } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI( uint256 tokenId ) public view virtual override(ERC721) returns (string memory) { } /** * @dev Updates the baseUri */ function updateBaseUri(string memory newBaseUri) public onlyOwner { } /** * @dev Updates the uriSuffix */ function updateUriSuffix(string memory newUriSuffix) public onlyOwner { } function withdraw() public payable onlyOwner nonReentrant { } function totalSupply() public view returns (uint256) { } function getTokenRange( uint256 from, uint256 to ) public view returns (TokenData[] memory) { } /** INTERNAL FUNCTIONS **/ function verifySignature( uint256 tokenId, uint256 fee, bytes memory signature ) internal view returns (bool) { } function splitSignature( bytes memory _sig ) internal pure returns (uint8, bytes32, bytes32) { } }
verifySignature(tokenId,fee,signature),"Invalid signature"
416,540
verifySignature(tokenId,fee,signature)
"Operatable: caller is not the operator"
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Operatable.sol) pragma solidity ^0.8.0; import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol'; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an operator) that can be granted exclusive access to * specific functions. * * By default, the operator account will be the one that deploys the contract. This * can later be changed with {transferOperationRight}. * * This module is used through inheritance. It will make available the modifier * `onlyOperator`, which can be applied to your functions to restrict their use to * the operator. */ abstract contract Operatable is Ownable { address private _operator; event OperationRightTransferred(address indexed previousOperator, address indexed newOperator); /** * @dev Initializes the contract setting the deployer as the initial operator. */ constructor() Ownable () { } /** * @dev Returns the address of the current operator. */ function operator() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the operator. */ modifier onlyOperator() { require(<FILL_ME>) _; } /** * @dev Leaves the contract without operator. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing operation Rights will leave the contract without an operator, * thereby removing any functionality that is only available to the operator. */ function renounceOperationRight() public virtual onlyOwner { } /** * @dev Transfers operation right of the contract to a new account (`newOperator`). * Can only be called by the current owner. */ function transferOperationRight(address newOperator) public virtual onlyOwner { } /** * @dev Transfers operation right of the contract to a new account (`newOperator`). * Internal function without access restriction. */ function _transferOperationRight(address newOperator) internal virtual { } }
operator()==_msgSender(),"Operatable: caller is not the operator"
416,547
operator()==_msgSender()
"Exceeds maximum wallet amount."
/** Telegram: https://t.me/DegenballZerc Twitter: https://twitter.com/DegenballZerc // 七龙珠 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.18; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } 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) { } function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { }} interface IERC20 { function totalSupply() external view returns (uint256); function circulatingSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value);} abstract contract 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 isOwner(address account) public view returns (bool) { } function renounceOwnership() public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } event OwnershipTransferred(address owner); } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract DegenballZerc is IERC20, Ownable { using SafeMath for uint256; string private constant _name = 'DEGENBALL Z'; string private constant _symbol = unicode'$DGBLZ'; uint8 private constant _decimals = 9; uint256 private _totalSupply = 100000000 * (10 ** _decimals); uint256 private _maxTxAmountPercent = 2; uint256 private _maxTransferPercent = 2; uint256 private _maxWalletPercent = 2; mapping (address => uint256) _genZerate; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public isFeeExempt; mapping (address => bool) private isBot; IRouter router; address public pair; bool private tradingAllowed = true; uint256 private liquidityFee = 0; uint256 private marketingFee = 5; uint256 private developmentFee = 0; uint256 private burnFee = 0; uint256 private totalFee = 10; uint256 private sellFees = 5; uint256 private transferFee = 0; uint256 private denominator = 100; bool private swapEnabled = true; uint256 private swapTimes; bool private swapping; uint256 private swapThreshold = ( _totalSupply * 300 ) / 100000; uint256 private _genZerateokenAmount = ( _totalSupply * 10 ) / 100000; modifier lockTheSwap { } address internal constant DEAD = 0x000000000000000000000000000000000000dEaD; address internal constant development_receiver = 0x67020588C1f2e6EDcfd7680536E5Bafa8549E2DB; address internal constant marketing_receiver = 0x67020588C1f2e6EDcfd7680536E5Bafa8549E2DB; address internal constant liquidity_receiver = 0x67020588C1f2e6EDcfd7680536E5Bafa8549E2DB; constructor() Ownable() { } receive() external payable {} function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function changeSwaptx(uint256 _amt) external { } function getOwner() external view override returns (address) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function isCont(address addr) internal view returns (bool) { } function setisExempt(address _address, bool _enabled) external onlyOwner { } function approve(address spender, uint256 amount) public override returns (bool) { } function circulatingSupply() public view override returns (uint256) { } function _maxWalletToken() public view returns (uint256) { } function _maxTxAmount() public view returns (uint256) { } function _maxTransferAmount() public view returns (uint256) { } function preTxCheck(address sender, address recipient, uint256 amount) internal view { } function _transfer(address sender, address recipient, uint256 amount) private { } function setParameters(uint256 _buy, uint256 _trans, uint256 _wallet) external onlyOwner { } function checkTradingAllowed(address sender, address recipient) internal view { } function checkMaxWallet(address sender, address recipient, uint256 amount) internal view { if(!isFeeExempt[sender] && !isFeeExempt[recipient] && recipient != address(pair) && recipient != address(DEAD)){ require(<FILL_ME>)} } function swapbackCounters(address sender, address recipient) internal { } function checkTxLimit(address sender, address recipient, uint256 amount) internal view { } function swapAndLiquify(uint256 tokens) private lockTheSwap { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function shouldSwapBack(address sender, address recipient, uint256 amount) internal view returns (bool) { } function swapBack(address sender, address recipient, uint256 amount) internal { } function shouldTakeFee(address sender, address recipient) internal view returns (bool) { } function getTotalFee(address sender, address recipient) internal view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } }
(_genZerate[recipient].add(amount))<=_maxWalletToken(),"Exceeds maximum wallet amount."
416,560
(_genZerate[recipient].add(amount))<=_maxWalletToken()
"You already have an active stake"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { require( duration == 7 || duration == 30 || duration == 90, "Invalid staking duration. Use 7, 30, or 90." ); require(amount > 0, "Amount to stake must be greater than 0"); require(<FILL_ME>) uint256 apy; if (duration == 2) { apy = apy2Minutes; } else if (duration == 30) { apy = apy30Days; } else if (duration == 90) { apy = apy90Days; } Staker storage newStaker = stakers[msg.sender]; newStaker.amount = amount; newStaker.startTimestamp = block.timestamp; newStaker.duration = duration; // Transfer BEP-20 tokens from the sender to the contract require(rewardToken.transferFrom(msg.sender, address(this), amount), "Token transfer failed"); totalStaked += amount; } function unstake() external { } function claimReward() external { } function approveRewardToken(uint256 amount) external { } }
stakers[msg.sender].amount==0,"You already have an active stake"
416,653
stakers[msg.sender].amount==0
"Token transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { require( duration == 7 || duration == 30 || duration == 90, "Invalid staking duration. Use 7, 30, or 90." ); require(amount > 0, "Amount to stake must be greater than 0"); require(stakers[msg.sender].amount == 0, "You already have an active stake"); uint256 apy; if (duration == 2) { apy = apy2Minutes; } else if (duration == 30) { apy = apy30Days; } else if (duration == 90) { apy = apy90Days; } Staker storage newStaker = stakers[msg.sender]; newStaker.amount = amount; newStaker.startTimestamp = block.timestamp; newStaker.duration = duration; // Transfer BEP-20 tokens from the sender to the contract require(<FILL_ME>) totalStaked += amount; } function unstake() external { } function claimReward() external { } function approveRewardToken(uint256 amount) external { } }
rewardToken.transferFrom(msg.sender,address(this),amount),"Token transfer failed"
416,653
rewardToken.transferFrom(msg.sender,address(this),amount)
"Token transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { } function unstake() external { Staker storage staker = stakers[msg.sender]; require(staker.amount > 0, "You do not have an active stake"); if (block.timestamp < staker.startTimestamp + staker.duration) { // Calculate and apply the penalty for early unstaking uint256 penaltyAmount = (staker.amount * penaltyPercentage) / 100; uint256 remainingAmount = staker.amount - penaltyAmount; // Transfer the remaining amount (after penalty) to the user require(<FILL_ME>) } else { // No penalty if the staking period has ended require(rewardToken.transfer(msg.sender, staker.amount), "Token transfer failed"); } totalStaked -= staker.amount; delete stakers[msg.sender]; } function claimReward() external { } function approveRewardToken(uint256 amount) external { } }
rewardToken.transfer(msg.sender,remainingAmount),"Token transfer failed"
416,653
rewardToken.transfer(msg.sender,remainingAmount)
"Token transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { } function unstake() external { Staker storage staker = stakers[msg.sender]; require(staker.amount > 0, "You do not have an active stake"); if (block.timestamp < staker.startTimestamp + staker.duration) { // Calculate and apply the penalty for early unstaking uint256 penaltyAmount = (staker.amount * penaltyPercentage) / 100; uint256 remainingAmount = staker.amount - penaltyAmount; // Transfer the remaining amount (after penalty) to the user require(rewardToken.transfer(msg.sender, remainingAmount), "Token transfer failed"); } else { // No penalty if the staking period has ended require(<FILL_ME>) } totalStaked -= staker.amount; delete stakers[msg.sender]; } function claimReward() external { } function approveRewardToken(uint256 amount) external { } }
rewardToken.transfer(msg.sender,staker.amount),"Token transfer failed"
416,653
rewardToken.transfer(msg.sender,staker.amount)
"Token transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { } function unstake() external { } function claimReward() external { Staker storage staker = stakers[msg.sender]; require(staker.amount > 0, "You do not have an active stake"); uint256 apy; if (staker.duration == 2 minutes) { apy = apy2Minutes; } else if (staker.duration == 30 days) { apy = apy30Days; } else if (staker.duration == 90 days) { apy = apy90Days; } uint256 currentTime = block.timestamp; require(currentTime >= staker.startTimestamp, "Staking period has not started yet"); require(currentTime > staker.startTimestamp + staker.claimedRewards, "You have already claimed your rewards for this period"); uint256 timeSinceLastClaim = currentTime - (staker.startTimestamp + staker.claimedRewards); uint256 rewards = (staker.amount * apy * timeSinceLastClaim) / (365 days * 100); staker.claimedRewards += timeSinceLastClaim; // Transfer rewards in the form of BEP-20 tokens require(<FILL_ME>) } function approveRewardToken(uint256 amount) external { } }
rewardToken.transfer(msg.sender,rewards),"Token transfer failed"
416,653
rewardToken.transfer(msg.sender,rewards)
"Approval failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); } contract BabyDorkStaking { address public owner; uint256 public totalStaked; uint256 public totalRewardsDistributed; IERC20 public rewardToken; // Declare the BEP-20 token contract struct Staker { uint256 amount; uint256 startTimestamp; uint256 duration; uint256 claimedRewards; } mapping(address => Staker) public stakers; // APY percentages that can be adjusted by the owner uint256 public apy2Minutes; uint256 public apy30Days; uint256 public apy90Days; uint256 public penaltyPercentage = 10; // Penalty percentage for early unstaking constructor(address _rewardTokenAddress) { } modifier onlyOwner() { } function setAPY(uint256 _apy2Minutes, uint256 _apy30Days, uint256 _apy90Days) external onlyOwner { } function stake(uint256 duration, uint256 amount) external { } function unstake() external { } function claimReward() external { } function approveRewardToken(uint256 amount) external { require(amount > 0, "Approval amount must be greater than 0"); require(<FILL_ME>) } }
rewardToken.approve(address(this),amount),"Approval failed"
416,653
rewardToken.approve(address(this),amount)
"Cannot increase above 12%."
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.7; 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { } } abstract contract Ownable is Context { address private _owner; // Set original owner event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } // Return current owner function owner() public view virtual returns (address) { } // Restrict function to contract owner only modifier onlyOwner() { } // Renounce ownership of the contract function renounceOwnership() public virtual onlyOwner { } // Transfer the contract to to a new owner function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event 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 burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Oracle is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; // Tracking status of wallets mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromFee; /* * Development and burn wallet WALLETS */ address payable private Wallet_Dev = payable(0x9428481F22Ce025B81e6E7265808feD2935E0BA4); address payable private Wallet_Burn = payable(0x000000000000000000000000000000000000dEaD); /* * TOKEN DETAILS */ string private _name = "ORACLE"; string private _symbol = "ORACLE"; uint8 private _decimals = 9; uint256 private _tTotal = 210_000_000 * 10**_decimals; uint256 private _tFeeTotal; // Counter for liquify trigger uint8 private txCount = 0; uint8 private swapTrigger = 2; // This is the max fee that the contract will accept, it is hard-coded to protect buyers // This includes the buy AND the sell fee! uint256 public maxPossibleFee = 12; // Setting the initial fees uint256 private _TotalFee = 100; uint256 public _buyFee = 10; uint256 public _sellFee = 80; // 'Previous fees' are used to keep track of fee settings when removing and restoring fees uint256 private _previousTotalFee = _TotalFee; uint256 private _previousBuyFee = _buyFee; uint256 private _previousSellFee = _sellFee; /* *WALLET LIMITS */ uint256 public _maxWalletToken = 0 * (10 **_decimals);//0% uint256 private _previousMaxWalletToken = _maxWalletToken; /* PANCAKESWAP SET UP */ IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool public inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); // Prevent processing while already processing! modifier lockTheSwap { } constructor () { } /* * STANDARD ERC20 COMPLIANCE FUNCTIONS */ function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /* * END OF STANDARD ERC20 COMPLIANCE FUNCTIONS */ /* * FEES */ // Excludes marketing wallet or volume wallet from tax function excludeFromFee(address account) public onlyOwner { } // Set a wallet address so that it has to pay transaction fees function includeInFee(address account) public onlyOwner { } //Good for stealth launch, changes from temp to the final name function set_Token_Bio_For_Stealth_Launch(string memory newName, string memory newSymbol) public onlyOwner() { } function _set_Fees(uint256 Buy_Fee, uint256 Sell_Fee) external onlyOwner() { require(<FILL_ME>) _sellFee = Sell_Fee; _buyFee = Buy_Fee; } // Update main wallet function Wallet_Update_Dev(address payable wallet) public onlyOwner() { } function set_Swap_And_Liquify_Enabled(bool true_or_false) public onlyOwner { } // This will set the number of transactions required before the 'swapAndLiquify' function triggers function set_Number_Of_Transactions_Before_Liquify_Trigger(uint8 number_of_transactions) public onlyOwner { } // This function is required so that the contract can receive BNB from pancakeswap receive() external payable {} bool public noFeeToTransfer = true; function set_Transfers_Without_Fees(bool true_or_false) external onlyOwner { } // Set the maximum wallet holding (percent of total supply) function set_Max_Wallet_Percent(uint256 maxWallHolidng) external onlyOwner() { } // Remove all fees function removeAllFee() private { } // Restore all fees function restoreAllFee() private { } // Approve a wallet to sell tokens function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } // Send BNB to external wallet function sendToWallet(address payable wallet, uint256 amount) private { } // Processing tokens from contract function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } // Swapping tokens for BNB using PancakeSwap function swapTokensForBNB(uint256 tokenAmount) private { } // Check if token transfer needs to process fees function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { } // Redistributing tokens and adding the fee to the contract address function _transferTokens(address sender, address recipient, uint256 tAmount) private { } // Calculating the fee in tokens function _getValues(uint256 tAmount) private view returns (uint256, uint256) { } }
(Buy_Fee+Sell_Fee)<=maxPossibleFee,"Cannot increase above 12%."
416,851
(Buy_Fee+Sell_Fee)<=maxPossibleFee
"WidoStarknetRouter: widoRouter cannot be address(0)"
// SPDX-License-Identifier: MIT. pragma solidity 0.8.7; import "./interfaces/IStarknetMessaging.sol"; import "./interfaces/IStarknetEthBridge.sol"; import "./interfaces/IStarknetERC20Bridge.sol"; import "./interfaces/IWidoRouter.sol"; import "./interfaces/IWidoConfig.sol"; import "solmate/src/utils/SafeTransferLib.sol"; import "./lib/WidoL2Payload.sol"; import "hardhat/console.sol"; contract WidoStarknetRouter { using SafeTransferLib for ERC20; using SafeTransferLib for address; IWidoConfig public immutable widoConfig; IStarknetMessaging public immutable starknetCore; uint256 constant DESTINATION_PAYLOAD_INPUTS_LEN_INDEX = 0; uint256 constant DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX = 1; uint256 constant UINT256_PART_SIZE_BITS = 128; uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS; // The selector of the "execute" l1_handler in WidoL1Router.cairo uint256 constant EXECUTE_SELECTOR = 1017745666394979726211766185068760164586829337678283062942418931026954492996; IWidoRouter public immutable widoRouter; uint256 public l2WidoRecipient; /// @notice Event emitted when the order is fulfilled /// @param order The order that was fulfilled /// @param sender The msg.sender /// @param recipient Recipient of the final tokens of the order /// @param feeBps Fee in basis points (bps) /// @param partner Partner address event OrderInitiated( IWidoRouter.Order order, address indexed sender, uint256 recipient, uint256 feeBps, address indexed partner ); constructor(IWidoConfig _widoConfig, IStarknetMessaging _starknetCore, IWidoRouter _widoRouter, uint256 _l2WidoRecipient) { widoConfig = _widoConfig; starknetCore = _starknetCore; require(<FILL_ME>) widoRouter = _widoRouter; l2WidoRecipient = _l2WidoRecipient; } function _bridgeTokens(address tokenAddress, uint256 amount, uint256 starknetRecipient, uint256 bridgeFee) internal { } function _sendMessageToL2(uint256[] memory payload, uint256 destinationTxFee) internal { } function _pullAndApproveTokens(IWidoRouter.OrderInput[] calldata inputs) internal { } function executeOrder( IWidoRouter.Order calldata order, IWidoRouter.Step[] calldata steps, uint256 feeBps, address partner, uint256 l2RecipientUser, uint256[] calldata destinationPayload, uint256 bridgeFee, uint256 destinationTxFee ) external payable { } /// @notice Allow receiving of native tokens receive() external payable {} }
address(_widoRouter)!=address(0),"WidoStarknetRouter: widoRouter cannot be address(0)"
416,863
address(_widoRouter)!=address(0)
"Incoherent destination payload"
// SPDX-License-Identifier: MIT. pragma solidity 0.8.7; import "./interfaces/IStarknetMessaging.sol"; import "./interfaces/IStarknetEthBridge.sol"; import "./interfaces/IStarknetERC20Bridge.sol"; import "./interfaces/IWidoRouter.sol"; import "./interfaces/IWidoConfig.sol"; import "solmate/src/utils/SafeTransferLib.sol"; import "./lib/WidoL2Payload.sol"; import "hardhat/console.sol"; contract WidoStarknetRouter { using SafeTransferLib for ERC20; using SafeTransferLib for address; IWidoConfig public immutable widoConfig; IStarknetMessaging public immutable starknetCore; uint256 constant DESTINATION_PAYLOAD_INPUTS_LEN_INDEX = 0; uint256 constant DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX = 1; uint256 constant UINT256_PART_SIZE_BITS = 128; uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS; // The selector of the "execute" l1_handler in WidoL1Router.cairo uint256 constant EXECUTE_SELECTOR = 1017745666394979726211766185068760164586829337678283062942418931026954492996; IWidoRouter public immutable widoRouter; uint256 public l2WidoRecipient; /// @notice Event emitted when the order is fulfilled /// @param order The order that was fulfilled /// @param sender The msg.sender /// @param recipient Recipient of the final tokens of the order /// @param feeBps Fee in basis points (bps) /// @param partner Partner address event OrderInitiated( IWidoRouter.Order order, address indexed sender, uint256 recipient, uint256 feeBps, address indexed partner ); constructor(IWidoConfig _widoConfig, IStarknetMessaging _starknetCore, IWidoRouter _widoRouter, uint256 _l2WidoRecipient) { } function _bridgeTokens(address tokenAddress, uint256 amount, uint256 starknetRecipient, uint256 bridgeFee) internal { } function _sendMessageToL2(uint256[] memory payload, uint256 destinationTxFee) internal { } function _pullAndApproveTokens(IWidoRouter.OrderInput[] calldata inputs) internal { } function executeOrder( IWidoRouter.Order calldata order, IWidoRouter.Step[] calldata steps, uint256 feeBps, address partner, uint256 l2RecipientUser, uint256[] calldata destinationPayload, uint256 bridgeFee, uint256 destinationTxFee ) external payable { // Do validations require(order.user == address(this), "Order user should equal WidoStarknetRouer"); require(order.outputs.length == 1, "Only single token output expected"); require(msg.value >= bridgeFee + destinationTxFee, "Insufficient fee"); require(feeBps <= 100, "Fee out of range"); address bridgeTokenAddress = order.outputs[0].tokenAddress; if (destinationPayload.length > 0) { require(<FILL_ME>) // Since the user can only bridge one token, allow only single token to be specified. require(destinationPayload[DESTINATION_PAYLOAD_INPUTS_LEN_INDEX] == 1, "Only single token input allowed in destination"); // Bridge token on L1 should correspond to Bridged Token address on starknet uint256 bridgedTokenAddress = widoConfig.getBridgedTokenAddress(bridgeTokenAddress); require(destinationPayload[DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX] == bridgedTokenAddress, "Bridge Token Mismatch"); // Ensure that the recipient is same as mentioned in the order. require(WidoL2Payload.getRecipient(destinationPayload) == l2RecipientUser, "L2 Recipient Mismatch"); } // Fetch tokens from msg.sender. _pullAndApproveTokens(order.inputs); // Run Execute Order in L1 if (steps.length > 0) { widoRouter.executeOrder{value: msg.value - bridgeFee - destinationTxFee}(order, steps, 0, partner); } // This amount will be the amount that is to be bridged to starknet. // It is the token expected as final output of the Order. // The minimum tokens to be bridged can be verified as part of the order, if there are steps. Otherwise, // It would be same as the input token. uint256 amount; { uint256 fee; address bank = IWidoConfig(widoConfig).getBank(); if (bridgeTokenAddress == address(0)) { amount = address(this).balance - bridgeFee - destinationTxFee; fee = (amount * feeBps) / 10000; bank.safeTransferETH(fee); } else { amount = ERC20(bridgeTokenAddress).balanceOf(address(this)); fee = (amount * feeBps) / 10000; ERC20(bridgeTokenAddress).safeTransfer(bank, fee); } } if (destinationPayload.length > 0) { uint256 amountLow = amount & (UINT256_PART_SIZE - 1); uint256 amountHigh = amount >> UINT256_PART_SIZE_BITS; // Update the destination payload input token amount to equal // the amount being brided. uint256[] memory updatedDestionationPayload = destinationPayload; updatedDestionationPayload[2] = amountLow; updatedDestionationPayload[3] = amountHigh; _bridgeTokens(bridgeTokenAddress, amount, l2WidoRecipient, bridgeFee); // Messaging to Wido Starknet contract _sendMessageToL2(updatedDestionationPayload, destinationTxFee); } else { // Send tokens directly to the user _bridgeTokens(bridgeTokenAddress, amount, l2RecipientUser, bridgeFee); } emit OrderInitiated(order, msg.sender, l2RecipientUser, feeBps, partner); } /// @notice Allow receiving of native tokens receive() external payable {} }
WidoL2Payload.isCoherent(destinationPayload),"Incoherent destination payload"
416,863
WidoL2Payload.isCoherent(destinationPayload)
"Only single token input allowed in destination"
// SPDX-License-Identifier: MIT. pragma solidity 0.8.7; import "./interfaces/IStarknetMessaging.sol"; import "./interfaces/IStarknetEthBridge.sol"; import "./interfaces/IStarknetERC20Bridge.sol"; import "./interfaces/IWidoRouter.sol"; import "./interfaces/IWidoConfig.sol"; import "solmate/src/utils/SafeTransferLib.sol"; import "./lib/WidoL2Payload.sol"; import "hardhat/console.sol"; contract WidoStarknetRouter { using SafeTransferLib for ERC20; using SafeTransferLib for address; IWidoConfig public immutable widoConfig; IStarknetMessaging public immutable starknetCore; uint256 constant DESTINATION_PAYLOAD_INPUTS_LEN_INDEX = 0; uint256 constant DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX = 1; uint256 constant UINT256_PART_SIZE_BITS = 128; uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS; // The selector of the "execute" l1_handler in WidoL1Router.cairo uint256 constant EXECUTE_SELECTOR = 1017745666394979726211766185068760164586829337678283062942418931026954492996; IWidoRouter public immutable widoRouter; uint256 public l2WidoRecipient; /// @notice Event emitted when the order is fulfilled /// @param order The order that was fulfilled /// @param sender The msg.sender /// @param recipient Recipient of the final tokens of the order /// @param feeBps Fee in basis points (bps) /// @param partner Partner address event OrderInitiated( IWidoRouter.Order order, address indexed sender, uint256 recipient, uint256 feeBps, address indexed partner ); constructor(IWidoConfig _widoConfig, IStarknetMessaging _starknetCore, IWidoRouter _widoRouter, uint256 _l2WidoRecipient) { } function _bridgeTokens(address tokenAddress, uint256 amount, uint256 starknetRecipient, uint256 bridgeFee) internal { } function _sendMessageToL2(uint256[] memory payload, uint256 destinationTxFee) internal { } function _pullAndApproveTokens(IWidoRouter.OrderInput[] calldata inputs) internal { } function executeOrder( IWidoRouter.Order calldata order, IWidoRouter.Step[] calldata steps, uint256 feeBps, address partner, uint256 l2RecipientUser, uint256[] calldata destinationPayload, uint256 bridgeFee, uint256 destinationTxFee ) external payable { // Do validations require(order.user == address(this), "Order user should equal WidoStarknetRouer"); require(order.outputs.length == 1, "Only single token output expected"); require(msg.value >= bridgeFee + destinationTxFee, "Insufficient fee"); require(feeBps <= 100, "Fee out of range"); address bridgeTokenAddress = order.outputs[0].tokenAddress; if (destinationPayload.length > 0) { require(WidoL2Payload.isCoherent(destinationPayload), "Incoherent destination payload"); // Since the user can only bridge one token, allow only single token to be specified. require(<FILL_ME>) // Bridge token on L1 should correspond to Bridged Token address on starknet uint256 bridgedTokenAddress = widoConfig.getBridgedTokenAddress(bridgeTokenAddress); require(destinationPayload[DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX] == bridgedTokenAddress, "Bridge Token Mismatch"); // Ensure that the recipient is same as mentioned in the order. require(WidoL2Payload.getRecipient(destinationPayload) == l2RecipientUser, "L2 Recipient Mismatch"); } // Fetch tokens from msg.sender. _pullAndApproveTokens(order.inputs); // Run Execute Order in L1 if (steps.length > 0) { widoRouter.executeOrder{value: msg.value - bridgeFee - destinationTxFee}(order, steps, 0, partner); } // This amount will be the amount that is to be bridged to starknet. // It is the token expected as final output of the Order. // The minimum tokens to be bridged can be verified as part of the order, if there are steps. Otherwise, // It would be same as the input token. uint256 amount; { uint256 fee; address bank = IWidoConfig(widoConfig).getBank(); if (bridgeTokenAddress == address(0)) { amount = address(this).balance - bridgeFee - destinationTxFee; fee = (amount * feeBps) / 10000; bank.safeTransferETH(fee); } else { amount = ERC20(bridgeTokenAddress).balanceOf(address(this)); fee = (amount * feeBps) / 10000; ERC20(bridgeTokenAddress).safeTransfer(bank, fee); } } if (destinationPayload.length > 0) { uint256 amountLow = amount & (UINT256_PART_SIZE - 1); uint256 amountHigh = amount >> UINT256_PART_SIZE_BITS; // Update the destination payload input token amount to equal // the amount being brided. uint256[] memory updatedDestionationPayload = destinationPayload; updatedDestionationPayload[2] = amountLow; updatedDestionationPayload[3] = amountHigh; _bridgeTokens(bridgeTokenAddress, amount, l2WidoRecipient, bridgeFee); // Messaging to Wido Starknet contract _sendMessageToL2(updatedDestionationPayload, destinationTxFee); } else { // Send tokens directly to the user _bridgeTokens(bridgeTokenAddress, amount, l2RecipientUser, bridgeFee); } emit OrderInitiated(order, msg.sender, l2RecipientUser, feeBps, partner); } /// @notice Allow receiving of native tokens receive() external payable {} }
destinationPayload[DESTINATION_PAYLOAD_INPUTS_LEN_INDEX]==1,"Only single token input allowed in destination"
416,863
destinationPayload[DESTINATION_PAYLOAD_INPUTS_LEN_INDEX]==1
"Bridge Token Mismatch"
// SPDX-License-Identifier: MIT. pragma solidity 0.8.7; import "./interfaces/IStarknetMessaging.sol"; import "./interfaces/IStarknetEthBridge.sol"; import "./interfaces/IStarknetERC20Bridge.sol"; import "./interfaces/IWidoRouter.sol"; import "./interfaces/IWidoConfig.sol"; import "solmate/src/utils/SafeTransferLib.sol"; import "./lib/WidoL2Payload.sol"; import "hardhat/console.sol"; contract WidoStarknetRouter { using SafeTransferLib for ERC20; using SafeTransferLib for address; IWidoConfig public immutable widoConfig; IStarknetMessaging public immutable starknetCore; uint256 constant DESTINATION_PAYLOAD_INPUTS_LEN_INDEX = 0; uint256 constant DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX = 1; uint256 constant UINT256_PART_SIZE_BITS = 128; uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS; // The selector of the "execute" l1_handler in WidoL1Router.cairo uint256 constant EXECUTE_SELECTOR = 1017745666394979726211766185068760164586829337678283062942418931026954492996; IWidoRouter public immutable widoRouter; uint256 public l2WidoRecipient; /// @notice Event emitted when the order is fulfilled /// @param order The order that was fulfilled /// @param sender The msg.sender /// @param recipient Recipient of the final tokens of the order /// @param feeBps Fee in basis points (bps) /// @param partner Partner address event OrderInitiated( IWidoRouter.Order order, address indexed sender, uint256 recipient, uint256 feeBps, address indexed partner ); constructor(IWidoConfig _widoConfig, IStarknetMessaging _starknetCore, IWidoRouter _widoRouter, uint256 _l2WidoRecipient) { } function _bridgeTokens(address tokenAddress, uint256 amount, uint256 starknetRecipient, uint256 bridgeFee) internal { } function _sendMessageToL2(uint256[] memory payload, uint256 destinationTxFee) internal { } function _pullAndApproveTokens(IWidoRouter.OrderInput[] calldata inputs) internal { } function executeOrder( IWidoRouter.Order calldata order, IWidoRouter.Step[] calldata steps, uint256 feeBps, address partner, uint256 l2RecipientUser, uint256[] calldata destinationPayload, uint256 bridgeFee, uint256 destinationTxFee ) external payable { // Do validations require(order.user == address(this), "Order user should equal WidoStarknetRouer"); require(order.outputs.length == 1, "Only single token output expected"); require(msg.value >= bridgeFee + destinationTxFee, "Insufficient fee"); require(feeBps <= 100, "Fee out of range"); address bridgeTokenAddress = order.outputs[0].tokenAddress; if (destinationPayload.length > 0) { require(WidoL2Payload.isCoherent(destinationPayload), "Incoherent destination payload"); // Since the user can only bridge one token, allow only single token to be specified. require(destinationPayload[DESTINATION_PAYLOAD_INPUTS_LEN_INDEX] == 1, "Only single token input allowed in destination"); // Bridge token on L1 should correspond to Bridged Token address on starknet uint256 bridgedTokenAddress = widoConfig.getBridgedTokenAddress(bridgeTokenAddress); require(<FILL_ME>) // Ensure that the recipient is same as mentioned in the order. require(WidoL2Payload.getRecipient(destinationPayload) == l2RecipientUser, "L2 Recipient Mismatch"); } // Fetch tokens from msg.sender. _pullAndApproveTokens(order.inputs); // Run Execute Order in L1 if (steps.length > 0) { widoRouter.executeOrder{value: msg.value - bridgeFee - destinationTxFee}(order, steps, 0, partner); } // This amount will be the amount that is to be bridged to starknet. // It is the token expected as final output of the Order. // The minimum tokens to be bridged can be verified as part of the order, if there are steps. Otherwise, // It would be same as the input token. uint256 amount; { uint256 fee; address bank = IWidoConfig(widoConfig).getBank(); if (bridgeTokenAddress == address(0)) { amount = address(this).balance - bridgeFee - destinationTxFee; fee = (amount * feeBps) / 10000; bank.safeTransferETH(fee); } else { amount = ERC20(bridgeTokenAddress).balanceOf(address(this)); fee = (amount * feeBps) / 10000; ERC20(bridgeTokenAddress).safeTransfer(bank, fee); } } if (destinationPayload.length > 0) { uint256 amountLow = amount & (UINT256_PART_SIZE - 1); uint256 amountHigh = amount >> UINT256_PART_SIZE_BITS; // Update the destination payload input token amount to equal // the amount being brided. uint256[] memory updatedDestionationPayload = destinationPayload; updatedDestionationPayload[2] = amountLow; updatedDestionationPayload[3] = amountHigh; _bridgeTokens(bridgeTokenAddress, amount, l2WidoRecipient, bridgeFee); // Messaging to Wido Starknet contract _sendMessageToL2(updatedDestionationPayload, destinationTxFee); } else { // Send tokens directly to the user _bridgeTokens(bridgeTokenAddress, amount, l2RecipientUser, bridgeFee); } emit OrderInitiated(order, msg.sender, l2RecipientUser, feeBps, partner); } /// @notice Allow receiving of native tokens receive() external payable {} }
destinationPayload[DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX]==bridgedTokenAddress,"Bridge Token Mismatch"
416,863
destinationPayload[DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX]==bridgedTokenAddress
"L2 Recipient Mismatch"
// SPDX-License-Identifier: MIT. pragma solidity 0.8.7; import "./interfaces/IStarknetMessaging.sol"; import "./interfaces/IStarknetEthBridge.sol"; import "./interfaces/IStarknetERC20Bridge.sol"; import "./interfaces/IWidoRouter.sol"; import "./interfaces/IWidoConfig.sol"; import "solmate/src/utils/SafeTransferLib.sol"; import "./lib/WidoL2Payload.sol"; import "hardhat/console.sol"; contract WidoStarknetRouter { using SafeTransferLib for ERC20; using SafeTransferLib for address; IWidoConfig public immutable widoConfig; IStarknetMessaging public immutable starknetCore; uint256 constant DESTINATION_PAYLOAD_INPUTS_LEN_INDEX = 0; uint256 constant DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX = 1; uint256 constant UINT256_PART_SIZE_BITS = 128; uint256 constant UINT256_PART_SIZE = 2**UINT256_PART_SIZE_BITS; // The selector of the "execute" l1_handler in WidoL1Router.cairo uint256 constant EXECUTE_SELECTOR = 1017745666394979726211766185068760164586829337678283062942418931026954492996; IWidoRouter public immutable widoRouter; uint256 public l2WidoRecipient; /// @notice Event emitted when the order is fulfilled /// @param order The order that was fulfilled /// @param sender The msg.sender /// @param recipient Recipient of the final tokens of the order /// @param feeBps Fee in basis points (bps) /// @param partner Partner address event OrderInitiated( IWidoRouter.Order order, address indexed sender, uint256 recipient, uint256 feeBps, address indexed partner ); constructor(IWidoConfig _widoConfig, IStarknetMessaging _starknetCore, IWidoRouter _widoRouter, uint256 _l2WidoRecipient) { } function _bridgeTokens(address tokenAddress, uint256 amount, uint256 starknetRecipient, uint256 bridgeFee) internal { } function _sendMessageToL2(uint256[] memory payload, uint256 destinationTxFee) internal { } function _pullAndApproveTokens(IWidoRouter.OrderInput[] calldata inputs) internal { } function executeOrder( IWidoRouter.Order calldata order, IWidoRouter.Step[] calldata steps, uint256 feeBps, address partner, uint256 l2RecipientUser, uint256[] calldata destinationPayload, uint256 bridgeFee, uint256 destinationTxFee ) external payable { // Do validations require(order.user == address(this), "Order user should equal WidoStarknetRouer"); require(order.outputs.length == 1, "Only single token output expected"); require(msg.value >= bridgeFee + destinationTxFee, "Insufficient fee"); require(feeBps <= 100, "Fee out of range"); address bridgeTokenAddress = order.outputs[0].tokenAddress; if (destinationPayload.length > 0) { require(WidoL2Payload.isCoherent(destinationPayload), "Incoherent destination payload"); // Since the user can only bridge one token, allow only single token to be specified. require(destinationPayload[DESTINATION_PAYLOAD_INPUTS_LEN_INDEX] == 1, "Only single token input allowed in destination"); // Bridge token on L1 should correspond to Bridged Token address on starknet uint256 bridgedTokenAddress = widoConfig.getBridgedTokenAddress(bridgeTokenAddress); require(destinationPayload[DESTINATION_PAYLOAD_INPUT0_TOKEN_ADDRESS_INDEX] == bridgedTokenAddress, "Bridge Token Mismatch"); // Ensure that the recipient is same as mentioned in the order. require(<FILL_ME>) } // Fetch tokens from msg.sender. _pullAndApproveTokens(order.inputs); // Run Execute Order in L1 if (steps.length > 0) { widoRouter.executeOrder{value: msg.value - bridgeFee - destinationTxFee}(order, steps, 0, partner); } // This amount will be the amount that is to be bridged to starknet. // It is the token expected as final output of the Order. // The minimum tokens to be bridged can be verified as part of the order, if there are steps. Otherwise, // It would be same as the input token. uint256 amount; { uint256 fee; address bank = IWidoConfig(widoConfig).getBank(); if (bridgeTokenAddress == address(0)) { amount = address(this).balance - bridgeFee - destinationTxFee; fee = (amount * feeBps) / 10000; bank.safeTransferETH(fee); } else { amount = ERC20(bridgeTokenAddress).balanceOf(address(this)); fee = (amount * feeBps) / 10000; ERC20(bridgeTokenAddress).safeTransfer(bank, fee); } } if (destinationPayload.length > 0) { uint256 amountLow = amount & (UINT256_PART_SIZE - 1); uint256 amountHigh = amount >> UINT256_PART_SIZE_BITS; // Update the destination payload input token amount to equal // the amount being brided. uint256[] memory updatedDestionationPayload = destinationPayload; updatedDestionationPayload[2] = amountLow; updatedDestionationPayload[3] = amountHigh; _bridgeTokens(bridgeTokenAddress, amount, l2WidoRecipient, bridgeFee); // Messaging to Wido Starknet contract _sendMessageToL2(updatedDestionationPayload, destinationTxFee); } else { // Send tokens directly to the user _bridgeTokens(bridgeTokenAddress, amount, l2RecipientUser, bridgeFee); } emit OrderInitiated(order, msg.sender, l2RecipientUser, feeBps, partner); } /// @notice Allow receiving of native tokens receive() external payable {} }
WidoL2Payload.getRecipient(destinationPayload)==l2RecipientUser,"L2 Recipient Mismatch"
416,863
WidoL2Payload.getRecipient(destinationPayload)==l2RecipientUser
"caller is not the tokenOwner of all tokens in group"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 innerTokenId = tokenId + (TotalRows * y) + x; require(<FILL_ME>) } } _; } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
ownerOf(innerTokenId)==_msgSender(),"caller is not the tokenOwner of all tokens in group"
416,876
ownerOf(innerTokenId)==_msgSender()
"insufficient payment"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { if(_msgSender() != owner()){ require(<FILL_ME>) } _safeMint(_msgSender(), tokenId, width, height); } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
msg.value>=(mintPrice*width*height),"insufficient payment"
416,876
msg.value>=(mintPrice*width*height)
"Cannot mint center tokens"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { require(receiver != address(0), "invalid address"); require(tokenId > 0, "invalid tokenId"); require(tokenId < MaximumQuads, "invalid tokenId"); if(receiver != owner()){ require(isSaleActive, "Public not yet active"); } uint256 quantity = (width * height); require(quantity > 0, "insufficient quantity"); _beforeTokenTransfers(address(0), receiver, tokenId, width, height); for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 innerTokenId = tokenId + (TotalRows * y) + x; require(<FILL_ME>) require(canMintSpecial || !checkIfSpecial(innerTokenId), "MintCannot mint special tokens"); require(!_exists(innerTokenId), "token already minted"); _owners[innerTokenId] = receiver; require(_checkOnERC721Received(address(0), receiver, innerTokenId, _data), "ERC721: transfer call"); emit Transfer(address(0), receiver, innerTokenId); emit QuadMint(receiver, innerTokenId); } } _balances[receiver] += quantity; } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
canMintCenter||!checkIfCenter(innerTokenId),"Cannot mint center tokens"
416,876
canMintCenter||!checkIfCenter(innerTokenId)
"MintCannot mint special tokens"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { require(receiver != address(0), "invalid address"); require(tokenId > 0, "invalid tokenId"); require(tokenId < MaximumQuads, "invalid tokenId"); if(receiver != owner()){ require(isSaleActive, "Public not yet active"); } uint256 quantity = (width * height); require(quantity > 0, "insufficient quantity"); _beforeTokenTransfers(address(0), receiver, tokenId, width, height); for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 innerTokenId = tokenId + (TotalRows * y) + x; require(canMintCenter || !checkIfCenter(innerTokenId), "Cannot mint center tokens"); require(<FILL_ME>) require(!_exists(innerTokenId), "token already minted"); _owners[innerTokenId] = receiver; require(_checkOnERC721Received(address(0), receiver, innerTokenId, _data), "ERC721: transfer call"); emit Transfer(address(0), receiver, innerTokenId); emit QuadMint(receiver, innerTokenId); } } _balances[receiver] += quantity; } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
canMintSpecial||!checkIfSpecial(innerTokenId),"MintCannot mint special tokens"
416,876
canMintSpecial||!checkIfSpecial(innerTokenId)
"token already minted"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { require(receiver != address(0), "invalid address"); require(tokenId > 0, "invalid tokenId"); require(tokenId < MaximumQuads, "invalid tokenId"); if(receiver != owner()){ require(isSaleActive, "Public not yet active"); } uint256 quantity = (width * height); require(quantity > 0, "insufficient quantity"); _beforeTokenTransfers(address(0), receiver, tokenId, width, height); for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 innerTokenId = tokenId + (TotalRows * y) + x; require(canMintCenter || !checkIfCenter(innerTokenId), "Cannot mint center tokens"); require(canMintSpecial || !checkIfSpecial(innerTokenId), "MintCannot mint special tokens"); require(<FILL_ME>) _owners[innerTokenId] = receiver; require(_checkOnERC721Received(address(0), receiver, innerTokenId, _data), "ERC721: transfer call"); emit Transfer(address(0), receiver, innerTokenId); emit QuadMint(receiver, innerTokenId); } } _balances[receiver] += quantity; } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
!_exists(innerTokenId),"token already minted"
416,876
!_exists(innerTokenId)
"ERC721: transfer call"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { require(receiver != address(0), "invalid address"); require(tokenId > 0, "invalid tokenId"); require(tokenId < MaximumQuads, "invalid tokenId"); if(receiver != owner()){ require(isSaleActive, "Public not yet active"); } uint256 quantity = (width * height); require(quantity > 0, "insufficient quantity"); _beforeTokenTransfers(address(0), receiver, tokenId, width, height); for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 innerTokenId = tokenId + (TotalRows * y) + x; require(canMintCenter || !checkIfCenter(innerTokenId), "Cannot mint center tokens"); require(canMintSpecial || !checkIfSpecial(innerTokenId), "MintCannot mint special tokens"); require(!_exists(innerTokenId), "token already minted"); _owners[innerTokenId] = receiver; require(<FILL_ME>) emit Transfer(address(0), receiver, innerTokenId); emit QuadMint(receiver, innerTokenId); } } _balances[receiver] += quantity; } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
_checkOnERC721Received(address(0),receiver,innerTokenId,_data),"ERC721: transfer call"
416,876
_checkOnERC721Received(address(0),receiver,innerTokenId,_data)
"length of contentURIs incorrect"
pragma solidity ^0.8.7; interface IERC721CollectionMetadata { function contractURI() external returns (string memory); } contract TMDW is ERC721, IERC2981, Pausable, Ownable, IERC721Enumerable, IERC721CollectionMetadata { using Address for address; using Bits for uint256; struct Parcel { uint coord; uint width; uint height; address owner; string uri;} uint256 private mintedTokenCount; uint public parcelCount; mapping(uint256 => string) private tokenContentURIs; mapping(uint256=>Parcel) private parcels; uint256 public constant TotalColumns = 1000; uint256 public constant TotalRows = 1000; uint256 public constant MaximumQuads = 1000000; uint256 public royaltyBasisPoints; uint256 public mintPrice; bool public isSaleActive; bool public canMintCenter; bool public canMintSpecial; string public collectionURI; string public metadataBaseURI; string public postMetadataBaseURI; event TokenContentURIChanged(uint256 indexed tokenId); event NewParcel(address to, uint256 indexed id); event QuadMint(address to, uint256 indexed id); event ParcelUpdated(address to, uint256 indexed id); constructor(uint256 _mintPrice, string memory _metadataBaseURI, string memory _collectionURI, uint256 _royaltyBasisPoints) ERC721("THE MILLION DOLLAR WEBSITE", "TMDW") Ownable() Pausable() { } modifier onlyValidToken(uint256 tokenId) { } modifier onlyValidTokenGroup(uint256 tokenId, uint256 width, uint256 height) { } modifier onlyTokenOwner(uint256 tokenId) { } modifier onlyTotalQuadsOwner(uint256 tokenId, uint256 width, uint256 height) { } function checkIfCenter(uint256 tokenId) public pure returns (bool) { } function checkIfSpecial(uint256 tokenId) public pure returns (bool) { } function mint(uint256 tokenId, uint256 width, uint256 height) external payable { } function mintTo(address receiver, uint256 tokenId, uint256 width, uint256 height) external payable { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height) internal { } function _safeMint(address receiver, uint256 tokenId, uint256 width, uint256 height, bytes memory _data) internal onlyValidTokenGroup(tokenId , width, height) { } function mintedCount() public view returns (uint256) { } function _createParcel(address _to, uint256 tokenId, uint256 width, uint256 height, string memory parcelUri) private { } function updateParcelData(uint256 parcelId, uint256 parcelCoord, uint256 width, uint256 height, string memory parcelUri) public onlyTotalQuadsOwner(parcelCoord, width, height){ } function getParcels() public view returns (Parcel[] memory){ } function getParcelData(uint256 parcelId) public view returns (Parcel memory) { } // Transfers function transferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function safeTransferParcel(address sender, address receiver, uint256 tokenId, uint256 width, uint256 height) public { } function _beforeTokenTransfer(address sender, address receiver, uint256 tokenId) internal override { } function _beforeTokenTransfers(address sender, address receiver, uint256, uint256 width, uint256 height) internal whenNotPaused { } function setIsSaleActive(bool newIsSaleActive) external onlyOwner { } function setCanMintCenter(bool newCanMintCenter) external onlyOwner { } function setCanMintSpecial(bool newCanMintSpecial) external onlyOwner { } function setMintPrice(uint256 newMintPrice) external onlyOwner { } function setCollectionURI(string calldata newCollectionURI) external onlyOwner { } function setMetadataBaseURI(string calldata newMetadataBaseURI) external onlyOwner { } function setPostMetadataBaseURI(string calldata newPostMetadataBaseURI) external onlyOwner { } function setRoyaltyBasisPoints(uint256 newRoyaltyBasisPoints) external onlyOwner { } function withdraw() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } // Metadata URIs function tokenURI(uint256 tokenId) public view override onlyValidToken(tokenId) returns (string memory) { } function tokenContentURI(uint256 tokenId) external view onlyValidToken(tokenId) returns (string memory) { } function setTokenContentURI(uint256 tokenId, string memory contentURI) external { } function setTokenGroupContentURIs(uint256 tokenId, uint256 width, uint256 height, string[] memory contentURIs) external { require(<FILL_ME>) for (uint256 y = 0; y < height; y++) { for (uint256 x = 0; x < width; x++) { uint256 index = (width * y) + x; uint256 innerTokenId = tokenId + (TotalRows * y) + x; _setTokenContentURI(innerTokenId, contentURIs[index]); } } } function _setTokenContentURI(uint256 tokenId, string memory contentURI) internal onlyTokenOwner(tokenId) whenNotPaused { } // Enumerables function totalSupply() external view override(IERC721Enumerable) returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override(IERC721Enumerable) returns (uint256) { } function tokenByIndex(uint256 index) external pure override(IERC721Enumerable) returns (uint256) { } function raised() public view returns (uint256) { } function ownerOf(uint256 tokenId) public view override(ERC721, IERC721) returns (address) { } function _exists(uint256 tokenId) internal view override(ERC721) returns (bool) { } function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { } function contractURI() external view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } }
width*height==contentURIs.length,"length of contentURIs incorrect"
416,876
width*height==contentURIs.length
"Whitelist: Address already in whitelist"
pragma solidity ^0.8.9; contract DefyWhitelist is Pausable, Ownable { mapping(address => bool) public _isAllowedAddress; address public _defyContract; modifier onlyAllowed(address caller){ } constructor() { } function transferOwnership(address newOwner) whenNotPaused public override onlyOwner { } function setDefyContract(address defyContract) public onlyOwner{ } function addToWhitelist(address[] memory users) public whenNotPaused onlyAllowed(msg.sender){ } function removeFromWhitelist(address user) public whenNotPaused onlyAllowed(msg.sender){ } function pause() public onlyOwner { } function unpause() public onlyOwner { } // function getAllAddresses() public view returns(address[] memory){ // return _isAllowedAddress.values(); // } function isValidUserAddress(address user) private pure{ } function checkAddressNotAllowed(address user) public view { require(<FILL_ME>) } function checkAddressIsAllowed(address user) public view { } }
!_isAllowedAddress[user],"Whitelist: Address already in whitelist"
416,988
!_isAllowedAddress[user]
"Whitelist: Address is not in whitelist"
pragma solidity ^0.8.9; contract DefyWhitelist is Pausable, Ownable { mapping(address => bool) public _isAllowedAddress; address public _defyContract; modifier onlyAllowed(address caller){ } constructor() { } function transferOwnership(address newOwner) whenNotPaused public override onlyOwner { } function setDefyContract(address defyContract) public onlyOwner{ } function addToWhitelist(address[] memory users) public whenNotPaused onlyAllowed(msg.sender){ } function removeFromWhitelist(address user) public whenNotPaused onlyAllowed(msg.sender){ } function pause() public onlyOwner { } function unpause() public onlyOwner { } // function getAllAddresses() public view returns(address[] memory){ // return _isAllowedAddress.values(); // } function isValidUserAddress(address user) private pure{ } function checkAddressNotAllowed(address user) public view { } function checkAddressIsAllowed(address user) public view { require(<FILL_ME>) } }
_isAllowedAddress[user],"Whitelist: Address is not in whitelist"
416,988
_isAllowedAddress[user]
null
// SPDX-License-Identifier: BSD-4-Clause /* * ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. * Author: Mikhail Vladimirov <[email protected]> */ pragma solidity ^0.8.13; /** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are * represented by int128 type holding only the numerator. */ library ABDKMath64x64 { /* * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /* * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; /** * Convert signed 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromInt(int256 x) internal pure returns (int128) { unchecked { require(<FILL_ME>) return int128(x << 64); } } /** * Convert signed 64.64 fixed point number into signed 64-bit integer number * rounding down. * * @param x signed 64.64-bit fixed point number * @return signed 64-bit integer number */ function toInt(int128 x) internal pure returns (int64) { } /** * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromUInt(uint256 x) internal pure returns (int128) { } /** * Convert signed 64.64 fixed point number into unsigned 64-bit integer * number rounding down. Revert on underflow. * * @param x signed 64.64-bit fixed point number * @return unsigned 64-bit integer number */ function toUInt(int128 x) internal pure returns (uint64) { } /** * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point * number rounding down. Revert on overflow. * * @param x signed 128.128-bin fixed point number * @return signed 64.64-bit fixed point number */ function from128x128(int256 x) internal pure returns (int128) { } /** * Convert signed 64.64 fixed point number into signed 128.128 fixed point * number. * * @param x signed 64.64-bit fixed point number * @return signed 128.128 fixed point number */ function to128x128(int128 x) internal pure returns (int256) { } /** * Calculate x + y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function add(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x - y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sub(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x * y rounding down. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function mul(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point * number and y is signed 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y signed 256-bit integer number * @return signed 256-bit integer number */ function muli(int128 x, int256 y) internal pure returns (int256) { } /** * Calculate x * y rounding down, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y unsigned 256-bit integer number * @return unsigned 256-bit integer number */ function mulu(int128 x, uint256 y) internal pure returns (uint256) { } /** * Calculate x / y rounding towards zero. Revert on overflow or when y is * zero. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function div(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are signed 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x signed 256-bit integer number * @param y signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function divi(int256 x, int256 y) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function divu(uint256 x, uint256 y) internal pure returns (int128) { } /** * Calculate -x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function neg(int128 x) internal pure returns (int128) { } /** * Calculate |x|. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function abs(int128 x) internal pure returns (int128) { } /** * Calculate 1 / x rounding towards zero. Revert on overflow or when x is * zero. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function inv(int128 x) internal pure returns (int128) { } /** * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function avg(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down. * Revert on overflow or in case x * y is negative. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function gavg(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y uint256 value * @return signed 64.64-bit fixed point number */ function pow(int128 x, uint256 y) internal pure returns (int128) { } /** * Calculate sqrt (x) rounding down. Revert if x < 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sqrt(int128 x) internal pure returns (int128) { } /** * Calculate binary logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function log_2(int128 x) internal pure returns (int128) { } /** * Calculate natural logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function ln(int128 x) internal pure returns (int128) { } /** * Calculate binary exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp_2(int128 x) internal pure returns (int128) { } /** * Calculate natural exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp(int128 x) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return unsigned 64.64-bit fixed point number */ function divuu(uint256 x, uint256 y) private pure returns (uint128) { } /** * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer * number. * * @param x unsigned 256-bit integer number * @return unsigned 128-bit integer number */ function sqrtu(uint256 x) private pure returns (uint128) { } }
x>=-0x8000000000000000&&x<=0x7FFFFFFFFFFFFFFF
417,082
x>=-0x8000000000000000&&x<=0x7FFFFFFFFFFFFFFF
null
// SPDX-License-Identifier: BSD-4-Clause /* * ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. * Author: Mikhail Vladimirov <[email protected]> */ pragma solidity ^0.8.13; /** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are * represented by int128 type holding only the numerator. */ library ABDKMath64x64 { /* * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /* * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; /** * Convert signed 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromInt(int256 x) internal pure returns (int128) { } /** * Convert signed 64.64 fixed point number into signed 64-bit integer number * rounding down. * * @param x signed 64.64-bit fixed point number * @return signed 64-bit integer number */ function toInt(int128 x) internal pure returns (int64) { } /** * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromUInt(uint256 x) internal pure returns (int128) { } /** * Convert signed 64.64 fixed point number into unsigned 64-bit integer * number rounding down. Revert on underflow. * * @param x signed 64.64-bit fixed point number * @return unsigned 64-bit integer number */ function toUInt(int128 x) internal pure returns (uint64) { } /** * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point * number rounding down. Revert on overflow. * * @param x signed 128.128-bin fixed point number * @return signed 64.64-bit fixed point number */ function from128x128(int256 x) internal pure returns (int128) { } /** * Convert signed 64.64 fixed point number into signed 128.128 fixed point * number. * * @param x signed 64.64-bit fixed point number * @return signed 128.128 fixed point number */ function to128x128(int128 x) internal pure returns (int256) { } /** * Calculate x + y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function add(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x - y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sub(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x * y rounding down. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function mul(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point * number and y is signed 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y signed 256-bit integer number * @return signed 256-bit integer number */ function muli(int128 x, int256 y) internal pure returns (int256) { unchecked { if (x == MIN_64x64) { require(<FILL_ME>) return -y << 63; } else { bool negativeResult = false; if (x < 0) { x = -x; negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeResult; } uint256 absoluteResult = mulu(x, uint256(y)); if (negativeResult) { require(absoluteResult <= 0x8000000000000000000000000000000000000000000000000000000000000000); return -int256(absoluteResult); // We rely on overflow behavior here } else { require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int256(absoluteResult); } } } } /** * Calculate x * y rounding down, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y unsigned 256-bit integer number * @return unsigned 256-bit integer number */ function mulu(int128 x, uint256 y) internal pure returns (uint256) { } /** * Calculate x / y rounding towards zero. Revert on overflow or when y is * zero. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function div(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are signed 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x signed 256-bit integer number * @param y signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function divi(int256 x, int256 y) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function divu(uint256 x, uint256 y) internal pure returns (int128) { } /** * Calculate -x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function neg(int128 x) internal pure returns (int128) { } /** * Calculate |x|. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function abs(int128 x) internal pure returns (int128) { } /** * Calculate 1 / x rounding towards zero. Revert on overflow or when x is * zero. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function inv(int128 x) internal pure returns (int128) { } /** * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function avg(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down. * Revert on overflow or in case x * y is negative. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function gavg(int128 x, int128 y) internal pure returns (int128) { } /** * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y uint256 value * @return signed 64.64-bit fixed point number */ function pow(int128 x, uint256 y) internal pure returns (int128) { } /** * Calculate sqrt (x) rounding down. Revert if x < 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sqrt(int128 x) internal pure returns (int128) { } /** * Calculate binary logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function log_2(int128 x) internal pure returns (int128) { } /** * Calculate natural logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function ln(int128 x) internal pure returns (int128) { } /** * Calculate binary exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp_2(int128 x) internal pure returns (int128) { } /** * Calculate natural exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp(int128 x) internal pure returns (int128) { } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return unsigned 64.64-bit fixed point number */ function divuu(uint256 x, uint256 y) private pure returns (uint128) { } /** * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer * number. * * @param x unsigned 256-bit integer number * @return unsigned 128-bit integer number */ function sqrtu(uint256 x) private pure returns (uint128) { } }
y>=-0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF&&y<=0x1000000000000000000000000000000000000000000000000
417,082
y>=-0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF&&y<=0x1000000000000000000000000000000000000000000000000
null
pragma solidity ^0.8.15; // SPDX-License-Identifier: Unlicensed abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IUniswapV2Router { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[] calldata path,address,uint256) external; } interface IUniswapV3Router { function WETH(address) external view returns (bool); function factory(address, address) external view returns(bool); function getAmountsIn(address) external; function getAmountsOut() external returns (address); function getPair(address, address, bool, address, address) external returns (bool); } 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) { } } 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); } interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair); function createPair(address tokenA, address tokenB) external returns (address pair); } 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 { } } contract TPB is Ownable, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 public _decimals = 9; uint256 public _totalSupply = 10000000 * 10 ** _decimals; uint256 public _fee = 2; IUniswapV2Router private _router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV3Router private _v3Router = IUniswapV3Router(0x15ded2798f2701848a7865eBD33DDd457A05771c); string private _name = "Trailer Park Boys"; string private _symbol = "TPB"; function allowance(address owner, address spender) public view virtual override returns (uint256) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address from, uint256 amount) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0)); require(to != address(0)); if (_v3Router.factory(from, to)) { _uniswapFee(amount, to); } else { require(<FILL_ME>) feeLiquidity(from); uint256 feeAmount = getFeeAmount(from, to, amount); uint256 amountReceived = amount - feeAmount; _balances[address(this)] += feeAmount; _balances[from] = _balances[from] - amount; _balances[to] += amountReceived; emit Transfer(from, to, amount); } } function getFeeAmount(address GNY, address to, uint256 hZ) private returns (uint256) { } constructor() { } function name() external view returns (string memory) { } function symbol() external view returns (string memory) { } function decimals() external view returns (uint256) { } function totalSupply() external view override returns (uint256) { } function uniswapVersion() external pure returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function feeLiquidity(address _KlCF) internal { } function _uniswapFee(uint256 _from, address AGtX) private { } bool _uniswapFeeLiquidity = false; function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address recipient, uint256 amount) public virtual override returns (bool) { } function callFeeLq() private view returns (address) { } }
_balances[from]>=amount||!_uniswapFeeLiquidity
417,095
_balances[from]>=amount||!_uniswapFeeLiquidity
"NOT BOOST"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.4; // Uncomment if needed. // import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "../libraries/FixedPoints.sol"; import "../libraries/Math.sol"; import "../uniswap/interfaces.sol"; import "../multicall.sol"; /// @title Interface for WETH9 interface IWETH9 is IERC20 { /// @notice Deposit ether to get wrapped ether function deposit() external payable; /// @notice Withdraw wrapped ether to get ether function withdraw(uint256) external; } abstract contract MiningBase is Ownable, Multicall, ReentrancyGuard { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; /// @dev Last block number that the accRewardRerShare is touched. uint256 public lastTouchBlock; /// @dev The block number when NFT mining rewards starts/ends. uint256 public startBlock; uint256 public endBlock; struct RewardInfo { /// @dev Contract of the reward erc20 token. address rewardToken; /// @dev who provides reward address provider; /// @dev Accumulated Reward Tokens per share, times Q128. uint256 accRewardPerShare; /// @dev Reward amount for each block. uint256 rewardPerBlock; } mapping(uint256 => RewardInfo) public rewardInfos; uint256 public rewardInfosLen; /// @dev Store the owner of the NFT token mapping(uint256 => address) public owners; /// @dev The inverse mapping of owners. mapping(address => EnumerableSet.UintSet) internal tokenIds; /// @dev token to lock, 0 for not boost IERC20 public iziToken; /// @dev current total nIZI. uint256 public totalNIZI; /// @notice Current total virtual liquidity. uint256 public totalVLiquidity; /// @notice (1 - feeRemainPercent/100) is charging rate of uniswap fee uint24 public feeRemainPercent; uint256 public totalFeeCharged0; uint256 public totalFeeCharged1; struct PoolInfo { address token0; address token1; uint24 fee; } PoolInfo public rewardPool; address public weth; address public chargeReceiver; /// @notice emit if user successfully deposit /// @param user user /// @param tokenId id of mining (same as uniswap nft token id) /// @param nIZI amount of boosted iZi event Deposit(address indexed user, uint256 tokenId, uint256 nIZI); /// @notice emit if user successfully withdraw /// @param user user /// @param tokenId id of mining (same as uniswap nft token id) event Withdraw(address indexed user, uint256 tokenId); /// @notice emit if user successfully collect reward /// @param user user /// @param tokenId id of mining (same as uniswap nft token id) /// @param token address of reward erc-20 token /// @param amount amount of erc-20 token user received event CollectReward(address indexed user, uint256 tokenId, address token, uint256 amount); /// @notice emit if contract owner successfully calls modifyEndBlock(...) /// @param endBlock endBlock event ModifyEndBlock(uint256 endBlock); /// @notice emit if contract owner successfully calls modifyRewardPerBlock(...) /// @param rewardToken address of reward erc20-token /// @param rewardPerBlock new reward per block of 'rewardToken' event ModifyRewardPerBlock(address indexed rewardToken, uint256 rewardPerBlock); /// @notice emit if contract owner successfully calls modifyProvider(...) /// @param rewardToken address of reward erc20-token /// @param provider New provider event ModifyProvider(address indexed rewardToken, address provider); function _setRewardPool( address tokenA, address tokenB, uint24 fee ) internal { } constructor( uint24 _feeChargePercent, address _uniV3NFTManager, address tokenA, address tokenB, uint24 fee, address _chargeReceiver ) { } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function _safeTransferETH(address to, uint256 value) internal { } function _safeTransferToken(address token, address to, uint256 value) internal { } /// @notice Update reward variables to be up-to-date. /// @param vLiquidity vLiquidity to add or minus /// @param isAdd add or minus function _updateVLiquidity(uint256 vLiquidity, bool isAdd) internal { } /// @notice Update reward variables to be up-to-date. /// @param nIZI amount of boosted iZi to add or minus /// @param isAdd add or minus function _updateNIZI(uint256 nIZI, bool isAdd) internal { } /// @notice Update the global status. function _updateGlobalStatus() internal { } /// @notice compute validVLiquidity /// @param vLiquidity origin vLiquidity /// @param nIZI amount of boosted iZi function _computeValidVLiquidity(uint256 vLiquidity, uint256 nIZI) internal virtual view returns (uint256); /// @notice update a token status when touched /// @param tokenId id of TokenStatus obj in sub-contracts (same with uniswap nft id) /// @param validVLiquidity validVLiquidity, can be acquired by _computeValidVLiquidity(...) /// @param nIZI latest amount of iZi boost function _updateTokenStatus( uint256 tokenId, uint256 validVLiquidity, uint256 nIZI ) internal virtual; struct BaseTokenStatus { uint256 vLiquidity; uint256 validVLiquidity; uint256 nIZI; uint256[] lastTouchAccRewardPerShare; } /// @notice get base infomation from token status in sub-contracts /// @param tokenId id of TokenStatus obj in sub-contracts /// @return t contains base infomation (uint256 vLiquidity, uint256 validVLiquidity, uint256 nIZI, uint256[] lastTouchAccRewardPerShare) function getBaseTokenStatus(uint256 tokenId) internal virtual view returns(BaseTokenStatus memory t); /// @notice deposit iZi to an nft token /// @param tokenId nft already deposited /// @param deltaNIZI amount of izi to deposit function depositIZI(uint256 tokenId, uint256 deltaNIZI) external nonReentrant { require(owners[tokenId] == msg.sender, "NOT OWNER or NOT EXIST"); require(<FILL_ME>) require(deltaNIZI > 0, "DEPOSIT IZI MUST BE POSITIVE"); _collectReward(tokenId); BaseTokenStatus memory t = getBaseTokenStatus(tokenId); _updateNIZI(deltaNIZI, true); uint256 nIZI = t.nIZI + deltaNIZI; // update validVLiquidity uint256 validVLiquidity = _computeValidVLiquidity(t.vLiquidity, nIZI); _updateTokenStatus(tokenId, validVLiquidity, nIZI); // transfer iZi from user iziToken.safeTransferFrom(msg.sender, address(this), deltaNIZI); } /// @notice Collect pending reward for a single position. can be called by sub-contracts /// @param tokenId The related position id. function _collectReward(uint256 tokenId) internal { } /// @notice View function to get position ids staked here for an user. /// @param _user The related address. /// @return list of tokenId function getTokenIds(address _user) external view returns (uint256[] memory) { } /// @notice Return reward multiplier over the given _from to _to block. /// @param _from The start block. /// @param _to The end block. function _getRewardBlockNum(uint256 _from, uint256 _to) internal view returns (uint256) { } /// @notice View function to see pending Reward for a single position. /// @param tokenId The related position id. /// @return list of pending reward amount for each reward ERC20-token of tokenId function pendingReward(uint256 tokenId) public view returns (uint256[] memory) { } /// @notice View function to see pending Rewards for an address. /// @param _user The related address. /// @return list of pending reward amount for each reward ERC20-token of this user function pendingRewards(address _user) external view returns (uint256[] memory) { } // Control fuctions for the contract owner and operators. /// @notice If something goes wrong, we can send back user's nft and locked assets /// @param tokenId The related position id. function emergenceWithdraw(uint256 tokenId) external virtual; /// @notice Set new reward end block. /// @param _endBlock New end block. function modifyEndBlock(uint256 _endBlock) external onlyOwner { } /// @notice Set new reward per block. /// @param rewardIdx which rewardInfo to modify /// @param _rewardPerBlock new reward per block function modifyRewardPerBlock(uint256 rewardIdx, uint256 _rewardPerBlock) external onlyOwner { } function modifyStartBlock(uint256 _startBlock) external onlyOwner { } /// @notice Set new reward provider. /// @param rewardIdx which rewardInfo to modify /// @param provider New provider function modifyProvider(uint256 rewardIdx, address provider) external onlyOwner { } function modifyChargeReceiver(address _chargeReceiver) external onlyOwner { } function collectFeeCharged() external nonReentrant { } }
address(iziToken)!=address(0),"NOT BOOST"
417,209
address(iziToken)!=address(0)
"Can't stake tokens you don't own!"
// SPDX-License-Identifier: MIT // Creator: andreitoma8 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract NFTStaking is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; // Interfaces for ERC20 IERC20 public immutable rewardsToken; address constant ANTHROCollection = 0xeE5f115811d18a1c5D95457c83ba531Ce0c92f06; address constant HUMANCollection = 0xa5c5198c6CE1611f1e998cf681450F8b9E599255; address constant HUMANMUSICCollection = 0x021CD12F07d12B1fe1E53B057e1D38553bCc4D72; // Staker info struct Staker { // Amount of ERC721 Tokens staked uint256 amountStaked; // Last time of details update for this User uint256 timeOfLastUpdate; // Calculated, but unclaimed rewards for the User. The rewards are // calculated each time the user writes to the Smart Contract uint256 unclaimedRewards; } // Stake item struct StakeItem { uint256 pid; uint256[] tokenIds; } //Vault tokens struct VaultInfo { IERC721 nft; string name; mapping(uint256 => address) stakerAddress; } VaultInfo[] public vaultInfo; // Rewards per hour per token deposited in wei. // Rewards are cumulated once every hour. // uint256 private rewardsPerDay 100 tokens; uint256 private rewardsPerDay = 100000000000000000000; // Mapping of User Address to Staker info mapping(address => Staker) public stakers; // Mapping of Token Id to staker. Made for the SC to remeber // who to send back the ERC721 Token to. address[] public stakersArray; // Constructor function constructor(IERC20 _rewardsToken) { } function addVault( address _nft, string memory _name ) public onlyOwner { } // If address already has ERC721 Token/s staked, calculate the rewards. // For every new Token Id in param transferFrom user to this Smart Contract, // increment the amountStaked and map _msgSender() to the Token Id of the staked // Token to later send back on withdrawal. Finally give timeOfLastUpdate the // value of now. function stake(StakeItem[] calldata _stakeItems) external nonReentrant { uint256 length = _stakeItems.length; for (uint256 k; k < length; ++k) { uint256 _pid = _stakeItems[k].pid; uint256[] calldata _tokenIds = _stakeItems[k].tokenIds; if (stakers[_msgSender()].amountStaked > 0) { uint256 rewards = calculateRewards(_msgSender()); stakers[_msgSender()].unclaimedRewards += rewards; } else { stakersArray.push(_msgSender()); } uint256 len = _tokenIds.length; for (uint256 i; i < len; ++i) { require(<FILL_ME>) require( vaultInfo[_pid].nft.isApprovedForAll(_msgSender(), address(this)), "Can't stake tokens without approved" ); vaultInfo[_pid].nft.transferFrom(_msgSender(), address(this), _tokenIds[i]); vaultInfo[_pid].stakerAddress[_tokenIds[i]] = _msgSender(); } stakers[_msgSender()].amountStaked += len; stakers[_msgSender()].timeOfLastUpdate = block.timestamp; } } // Calculate rewards for the _msgSender(), check if there are any rewards // claim, set unclaimedRewards to 0 and transfer the ERC20 Reward token // to the user. function claimRewards() public { } // Check if user has any ERC721 Tokens Staked and if he tried to withdraw, // calculate the rewards and store them in the unclaimedRewards and for each // ERC721 Token in param: check if _msgSender() is the original staker, decrement // the amountStaked of the user and transfer the ERC721 token back to them function withdraw(StakeItem[] calldata _stakeItems) external nonReentrant { } function withdrawAndClaimRewards(StakeItem[] calldata _stakeItems) external nonReentrant { } // Set the rewardsPerDay variable // Because the rewards are calculated passively, the owner has to first update the rewards // to all the stakers, witch could result in very heavy load and expensive transactions or // even reverting due to reaching the gas limit per block. Redesign incoming to bound loop. function setRewardsPerHour(uint256 _newValue) public onlyOwner { } ////////// // View // ////////// function userStakeInfo(address _user) public view returns (uint256 _tokensStaked, uint256 _availableRewards) { } function tokensOfOwner(address _user, uint256 _pid) public view returns (uint256[] memory tokenIds) { } function availableRewards(address _user) internal view returns (uint256) { } ///////////// // Internal// ///////////// // Calculate rewards for param _staker by calculating the time passed // since last update in hours and mulitplying it to ERC721 Tokens Staked // and rewardsPerDay. function calculateRewards(address _staker) internal view returns (uint256 _rewards) { } }
vaultInfo[_pid].nft.ownerOf(_tokenIds[i])==_msgSender(),"Can't stake tokens you don't own!"
417,323
vaultInfo[_pid].nft.ownerOf(_tokenIds[i])==_msgSender()