comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
'caller must be signer'
pragma solidity 0.8.17; //SPDX-License-Identifier: MIT interface ERC20Essential { function balanceOf(address user) external view returns(uint256); function transfer(address _to, uint256 _amount) external returns (bool); function transferFrom(address _from, address _to, uint256 _amount) external returns (bool); } //USDT contract in Ethereum does not follow ERC20 standard so it needs different interface interface usdtContract { function transferFrom(address _from, address _to, uint256 _amount) external; } //*******************************************************************// //------------------ Contract to Manage Ownership -------------------// //*******************************************************************// contract owned { address public owner; address internal newOwner; mapping(address => bool) public signer; event OwnershipTransferred(address indexed _from, address indexed _to); event SignerUpdated(address indexed signer, bool indexed status); constructor() { } modifier onlyOwner { } modifier onlySigner { require(<FILL_ME>) _; } function changeSigner(address _signer, bool _status) public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } //the reason for this flow is to protect owners from sending ownership to unintended address due to human error function acceptOwnership() public { } } //****************************************************************************// //--------------------- MAIN CODE STARTS HERE ---------------------// //****************************************************************************// contract Bridge is owned { uint256 public orderID; // This generates a public event of coin received by contract event CoinIn(uint256 indexed orderID, address indexed user, uint256 value, address outputCurrency); event CoinOut(uint256 indexed orderID, address indexed user, uint256 value); event CoinOutFailed(uint256 indexed orderID, address indexed user, uint256 value); event TokenIn(uint256 indexed orderID, address indexed tokenAddress, address indexed user, uint256 value, uint256 chainID, address outputCurrency); event TokenOut(uint256 indexed orderID, address indexed tokenAddress, address indexed user, uint256 value, uint256 chainID); event TokenOutFailed(uint256 indexed orderID, address indexed tokenAddress, address indexed user, uint256 value, uint256 chainID); receive () external payable { } function coinIn(address outputCurrency) external payable returns(bool){ } function coinOut(address user, uint256 amount, uint256 _orderID) external onlySigner returns(bool){ } function tokenIn(address tokenAddress, uint256 tokenAmount, uint256 chainID, address outputCurrency) external returns(bool){ } function tokenOut(address tokenAddress, address user, uint256 tokenAmount, uint256 _orderID, uint256 chainID) external onlySigner returns(bool){ } }
signer[msg.sender],'caller must be signer'
446,404
signer[msg.sender]
"Must be distributor"
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "./libraries/Math.sol"; import "./utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // solhint-disable not-rely-on-time contract PicniqSingleStake is Context { IERC20 internal immutable _token; RewardState private _state; uint256 private _totalSupply; mapping(address => uint256) private _userRewardPerTokenPaid; mapping(address => uint256) private _rewards; mapping(address => uint256) private _balances; struct RewardState { uint8 mutex; uint64 periodFinish; uint64 rewardsDuration; uint64 lastUpdateTime; uint160 distributor; uint256 rewardRate; uint256 rewardPerTokenStored; } constructor( address token, address distributor, uint64 duration ) { } function rewardToken() external view returns (address) { } function stakingToken() external view returns (address) { } function totalSupply() external view returns (uint256) { } function balanceOf(address account) external view returns (uint256) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken() public view returns (uint256) { } function earned(address account) public view returns (uint256) { } function getRewardForDuration() external view returns (uint256) { } function stake(uint256 amount) external payable updateReward(_msgSender()) { } function withdraw(uint256 amount) external payable nonReentrant updateReward(_msgSender()) { } function getReward() external payable nonReentrant updateReward(_msgSender()) { } function exit() external payable nonReentrant { } function notifyRewardAmount(uint256 reward) public payable onlyDistributor updateReward(address(0)) { } function _notifyRewardAmount(uint256 reward, address account) private { } function _updateReward(address account) private { } function addRewardTokens(uint256 amount) external onlyDistributor { } function withdrawRewardTokens() external onlyDistributor { } modifier updateReward(address account) { } modifier onlyDistributor() { require(<FILL_ME>) _; } modifier nonReentrant() { } /* === EVENTS === */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); }
_msgSender()==address(_state.distributor),"Must be distributor"
446,439
_msgSender()==address(_state.distributor)
"KuullectorEditions: caller is not the owner or authorized"
// SPDX-License-Identifier: MIT /*** __ _ _ _ _ _ ____ __ ____ ____ ____ ____ _ _ ( / )/ )( \/ )( \( _ \ / \(_ _)(_ _)( __)( _ \( \/ ) ) ( ) \/ () \/ ( ) __/( O ) )( )( ) _) ) / ) / (__\_)\____/\____/(__) \__/ (__) (__) (____)(__\_)(__/ ____ ____ __ ____ __ __ __ _ ____ ( __)( \( )(_ _)( )/ \ ( ( \/ ___) ) _) ) D ( )( )( )(( O )/ /\___ \ (____)(____/(__) (__) (__)\__/ \_)__)(____/ */ // Contract by @Montana_Wong pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract KuullectorEditions is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply { string public name = "Kuullector Editions"; string public symbol = "KE"; address private authorizedMintingProxy; constructor() ERC1155("ipfs://QmVyJxxw24YXKWUnYgXCNyrHVCfvu9S1ZEKpf7rDw3vH4x/{id}.json") {} modifier onlyOwnerOrAuthorized() { require(<FILL_ME>) _; } function setURI(string memory newuri) public onlyOwner { } function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyOwnerOrAuthorized { } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwnerOrAuthorized { } function airdrop(address[] memory addresses, uint256 id, uint256 amount) external onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply) { } function adminBurn(address account, uint256 id, uint256 amount) external onlyOwner { } function setAuthorizedMintProxy(address _authorizedMintingProxy) external onlyOwner { } }
owner()==_msgSender()||authorizedMintingProxy==_msgSender(),"KuullectorEditions: caller is not the owner or authorized"
446,523
owner()==_msgSender()||authorizedMintingProxy==_msgSender()
"Supply Limit exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol"; contract HQW3 is ERC1155, DefaultOperatorFilterer, Ownable, ReentrancyGuard { string public name = "Owner"; string public symbol = "HQW"; string public base_uri = "https://www.headquarterweb3.at/assets/media/"; uint256 public PUBLIC_PRICE = 2 ether; uint256 public constant Owner = 1; uint256 public OWNER_MAX_SUPPLY = 999; uint256 public OWNER_TOTAL_SUPPLY = 0; enum Stage { NONE, PUBLIC, FINAL } Stage stage = Stage.NONE; mapping(address => uint256) private numberMinted; constructor() ERC1155("") { } function getNumberMinted(address owner) public view returns (uint256) { } function setPublicStage() external onlyOwner nonReentrant { } function setNoneStage() external onlyOwner nonReentrant { } function setFinialStage() external onlyOwner nonReentrant { } function isPublicMint() external view returns (bool) { } function isFinalMint() external view returns (bool) { } function publicMintOwner(uint256 amount) external payable nonReentrant { require(stage == Stage.PUBLIC, "Public mint hasn't started yet"); require(<FILL_ME>) require(msg.value == (PUBLIC_PRICE * amount), "Invalid ether amount"); _mintOwner(msg.sender, amount); } function finalMint(uint256 amount) external onlyOwner nonReentrant { } function _mintOwner(address minter, uint256 amount) internal { } // Config contract function uri(uint256 id) public view override returns (string memory) { } function setBaseUri(string memory _base_uri) external onlyOwner nonReentrant { } function setPublicPrice(uint256 price) external onlyOwner nonReentrant { } function withdraw() external onlyOwner nonReentrant { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } }
OWNER_TOTAL_SUPPLY+amount<=OWNER_MAX_SUPPLY,"Supply Limit exceeded"
446,549
OWNER_TOTAL_SUPPLY+amount<=OWNER_MAX_SUPPLY
"Invalid ether amount"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {DefaultOperatorFilterer} from "./DefaultOperatorFilterer.sol"; contract HQW3 is ERC1155, DefaultOperatorFilterer, Ownable, ReentrancyGuard { string public name = "Owner"; string public symbol = "HQW"; string public base_uri = "https://www.headquarterweb3.at/assets/media/"; uint256 public PUBLIC_PRICE = 2 ether; uint256 public constant Owner = 1; uint256 public OWNER_MAX_SUPPLY = 999; uint256 public OWNER_TOTAL_SUPPLY = 0; enum Stage { NONE, PUBLIC, FINAL } Stage stage = Stage.NONE; mapping(address => uint256) private numberMinted; constructor() ERC1155("") { } function getNumberMinted(address owner) public view returns (uint256) { } function setPublicStage() external onlyOwner nonReentrant { } function setNoneStage() external onlyOwner nonReentrant { } function setFinialStage() external onlyOwner nonReentrant { } function isPublicMint() external view returns (bool) { } function isFinalMint() external view returns (bool) { } function publicMintOwner(uint256 amount) external payable nonReentrant { require(stage == Stage.PUBLIC, "Public mint hasn't started yet"); require( OWNER_TOTAL_SUPPLY + amount <= OWNER_MAX_SUPPLY, "Supply Limit exceeded" ); require(<FILL_ME>) _mintOwner(msg.sender, amount); } function finalMint(uint256 amount) external onlyOwner nonReentrant { } function _mintOwner(address minter, uint256 amount) internal { } // Config contract function uri(uint256 id) public view override returns (string memory) { } function setBaseUri(string memory _base_uri) external onlyOwner nonReentrant { } function setPublicPrice(uint256 price) external onlyOwner nonReentrant { } function withdraw() external onlyOwner nonReentrant { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } }
msg.value==(PUBLIC_PRICE*amount),"Invalid ether amount"
446,549
msg.value==(PUBLIC_PRICE*amount)
"Contract not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract TouchGrass is ERC20, Ownable { uint256 private TEAM_WALLET_PERCENTAGE = 45; uint256 private MARKET_WALLET_PERCENTAGE = 49; uint256 private TOTAL_SUPPLY = 360_000_000_000 ether; bool private _limitBuyEnabled = true; uint256 private _maxWalletPercentage = 5; uint256 private _maxTransferPercentage = 4; address private _uniswapPair; address private _teamAddress; address private _marketingAddress; bool private _constructionPhase; constructor(address teamAddress, address marketAddress) ERC20("Touch Grass", "TOUCHGRASS") { } function _beforeTokenTransfer( address from, address to, uint256 amount ) override internal virtual { if(_constructionPhase){ return; } if(_ownerAddress(from, to)){ return; } if (_uniswapPair == address(0)) { require(<FILL_ME>) return; } bool buy = _isUniswap(from); bool sell = _isUniswap(to); if (_limitBuyEnabled && (buy || sell)){ uint256 maxWhaleTransferAllowance = (TOTAL_SUPPLY * _maxTransferPercentage) / 100; require(amount <= maxWhaleTransferAllowance, "Buy or sell amount to high"); } if(_limitBuyEnabled && buy){ uint256 whaleMaxWalletAllowance = (TOTAL_SUPPLY * _maxWalletPercentage) / 100; require(super.balanceOf(to) + amount <= whaleMaxWalletAllowance, "Wallet holds to many coins"); } } function setMaxBuy(uint256 maxWalletPercentage, uint256 maxTransferPercentage) external onlyOwner { } function setUniswapPair(address uniswapPair) external onlyOwner { } function disableLimitBuy() external onlyOwner { } function _isUniswap(address pair) private view returns (bool) { } function _ownerAddress(address from, address to) private view returns (bool) { } }
_ownerAddress(from,to),"Contract not active"
446,724
_ownerAddress(from,to)
"Wallet holds to many coins"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract TouchGrass is ERC20, Ownable { uint256 private TEAM_WALLET_PERCENTAGE = 45; uint256 private MARKET_WALLET_PERCENTAGE = 49; uint256 private TOTAL_SUPPLY = 360_000_000_000 ether; bool private _limitBuyEnabled = true; uint256 private _maxWalletPercentage = 5; uint256 private _maxTransferPercentage = 4; address private _uniswapPair; address private _teamAddress; address private _marketingAddress; bool private _constructionPhase; constructor(address teamAddress, address marketAddress) ERC20("Touch Grass", "TOUCHGRASS") { } function _beforeTokenTransfer( address from, address to, uint256 amount ) override internal virtual { if(_constructionPhase){ return; } if(_ownerAddress(from, to)){ return; } if (_uniswapPair == address(0)) { require(_ownerAddress(from, to), "Contract not active"); return; } bool buy = _isUniswap(from); bool sell = _isUniswap(to); if (_limitBuyEnabled && (buy || sell)){ uint256 maxWhaleTransferAllowance = (TOTAL_SUPPLY * _maxTransferPercentage) / 100; require(amount <= maxWhaleTransferAllowance, "Buy or sell amount to high"); } if(_limitBuyEnabled && buy){ uint256 whaleMaxWalletAllowance = (TOTAL_SUPPLY * _maxWalletPercentage) / 100; require(<FILL_ME>) } } function setMaxBuy(uint256 maxWalletPercentage, uint256 maxTransferPercentage) external onlyOwner { } function setUniswapPair(address uniswapPair) external onlyOwner { } function disableLimitBuy() external onlyOwner { } function _isUniswap(address pair) private view returns (bool) { } function _ownerAddress(address from, address to) private view returns (bool) { } }
super.balanceOf(to)+amount<=whaleMaxWalletAllowance,"Wallet holds to many coins"
446,724
super.balanceOf(to)+amount<=whaleMaxWalletAllowance
"!rewardTotal"
// SPDX-License-Identifier: MIT // Votium pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "./Ownable.sol"; contract Votium is Ownable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ // relevant time constraints uint256 epochDuration = 86400 * 14; // 2 weeks uint256 roundDuration = 86400 * 5; // 5 days uint256 deadlineDuration = 60 * 60 * 6; // 6 hours mapping(address => bool) public tokenAllowed; // token allow list mapping(address => bool) public approvedTeam; // for team functions that do not require multi-sig security address public feeAddress; // address to receive platform fees uint256 public platformFee = 400; // 4% uint256 public constant DENOMINATOR = 10000; // denominates weights 10000 = 100% address public distributor; // address of distributor contract bool public requireAllowlist = true; // begin with erc20 allow list in effect struct Incentive { address token; uint256 amount; uint256 maxPerVote; uint256 distributed; uint256 recycled; address depositor; } mapping(uint256 => address[]) public roundGauges; // round => gauge array mapping(uint256 => mapping(address => bool)) public inRoundGauges; // round => gauge => bool mapping(uint256 => mapping(address => Incentive[])) public incentives; // round => gauge => incentive array mapping(uint256 => mapping(address => uint256)) public votesReceived; // round => gauge => votes mapping(address => uint256) public virtualBalance; // token => amount uint256 public lastRoundProcessed; // last round that was processed by multi-sig mapping(address => uint256) public toTransfer; // token => amount address[] public toTransferList; // list of tokens to transfer /* ========== CONSTRUCTOR ========== */ constructor( address _approved, address _approved2, address _feeAddress, address _distributor ) { } /* ========== PUBLIC FUNCTIONS ========== */ function gaugesLength(uint256 _round) public view returns (uint256) { } function incentivesLength( uint256 _round, address _gauge ) public view returns (uint256) { } function currentEpoch() public view returns (uint256) { } // Display current or next active round function activeRound() public view returns (uint256) { } // Deposit vote incentive for a single gauge in a single round function depositIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across a single gauge in multiple rounds function depositSplitRounds( address _token, uint256 _amount, uint256 _numRounds, address _gauge, uint256 _maxPerVote ) public { require(_numRounds < 8, "!farFuture"); require(_numRounds > 1, "!numRounds"); uint256 rewardTotal = _takeDeposit(_token, _amount, _numRounds); require(<FILL_ME>) uint256 round = activeRound(); for (uint256 i = 0; i < _numRounds; i++) { Incentive memory incentive = Incentive({ token: _token, amount: rewardTotal / _numRounds, maxPerVote: _maxPerVote, distributed: 0, recycled: 0, depositor: msg.sender }); incentives[round + i][_gauge].push(incentive); if (!inRoundGauges[round + i][_gauge]) { roundGauges[round + i].push(_gauge); inRoundGauges[round + i][_gauge] = true; } emit NewIncentive( _token, rewardTotal / _numRounds, round + i, _gauge, _maxPerVote, false ); } } // evenly split deposit across multiple gauges in a single round function depositSplitGauges( address _token, uint256 _amount, uint256 _round, address[] calldata _gauges, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in multiple rounds function depositSplitGaugesRounds( address _token, uint256 _amount, uint256 _numRounds, address[] calldata _gauges, uint256 _maxPerVote ) public { } // deposit same token to multiple gauges with different amounts in a single round function depositUnevenSplitGauges( address _token, uint256 _round, address[] calldata _gauges, uint256[] calldata _amounts, uint256 _maxPerVote ) public { } function increaseIncentive( uint256 _round, address _gauge, uint256 _incentive, uint256 _increase, uint256 _maxPerVote ) public { } // function for depositor to withdraw unprocessed incentives // this should only happen if a gauge does not exist or is killed before the round ends // fees are not returned function withdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } // function for depositor to recycle unprocessed incentives instead of withdrawing (maybe gauge was not active yet or was killed and revived) function recycleUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } /* ========== APPROVED TEAM FUNCTIONS ========== */ // transfer stored rewards to distributor (to rescue tokens sent directly to contract) // does not change virtual balance function rescueToDistributor(address _token) public onlyTeam { } // allow/deny token function allowToken(address _token, bool _allow) public onlyTeam { } // allow/deny multiple tokens function allowTokens( address[] memory _tokens, bool _allow ) public onlyTeam { } /* ========== INTERNAL FUNCTIONS ========== */ // rewards are recycled automatically if processed without consuming entire reward (maxPerVote) function _recycleReward( address _token, uint256 _amount, address _gauge, uint256 _maxPerVote, address _depositor ) internal { } // take deposit and send fees to feeAddress, return rewardTotal function _takeDeposit( address _token, uint256 _amount, uint256 _split ) internal returns (uint256) { } /* ========== MUTLI-SIG FUNCTIONS ========== */ // submit vote totals and transfer rewards to distributor function endRound( uint256 _round, address[] memory _gauges, uint256[] memory _totals ) public onlyOwner { } // toggle whitelist requirement function setAllowlistRequired(bool _requireAllowlist) public onlyOwner { } // update fee address function updateFeeAddress(address _feeAddress) public onlyOwner { } // update fee amount function updateFeeAmount(uint256 _feeAmount) public onlyOwner { } // add or remove address from team functions function modifyTeam(address _member, bool _approval) public onlyOwner { } // update token distributor address function updateDistributor(address _distributor) public onlyOwner { } // Fallback executable function function execute( address _to, uint256 _value, bytes calldata _data ) external onlyOwner returns (bool, bytes memory) { } /* ========== MODIFIERS ========== */ modifier onlyTeam() { } /* ========== EVENTS ========== */ event NewIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote, bool _recycled ); event TokenAllow(address _token, bool _allow); event AllowlistRequirement(bool _requireAllowlist); event UpdatedFee(uint256 _feeAmount); event ModifiedTeam(address _member, bool _approval); event UpdatedDistributor(address _distributor); event WithdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive, uint256 _amount ); event IncreasedIncentive( address _token, uint256 _total, uint256 _increase, uint256 _round, address _gauge, uint256 _maxPerVote ); }
rewardTotal/_numRounds>0,"!rewardTotal"
446,730
rewardTotal/_numRounds>0
"!rewardTotal"
// SPDX-License-Identifier: MIT // Votium pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "./Ownable.sol"; contract Votium is Ownable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ // relevant time constraints uint256 epochDuration = 86400 * 14; // 2 weeks uint256 roundDuration = 86400 * 5; // 5 days uint256 deadlineDuration = 60 * 60 * 6; // 6 hours mapping(address => bool) public tokenAllowed; // token allow list mapping(address => bool) public approvedTeam; // for team functions that do not require multi-sig security address public feeAddress; // address to receive platform fees uint256 public platformFee = 400; // 4% uint256 public constant DENOMINATOR = 10000; // denominates weights 10000 = 100% address public distributor; // address of distributor contract bool public requireAllowlist = true; // begin with erc20 allow list in effect struct Incentive { address token; uint256 amount; uint256 maxPerVote; uint256 distributed; uint256 recycled; address depositor; } mapping(uint256 => address[]) public roundGauges; // round => gauge array mapping(uint256 => mapping(address => bool)) public inRoundGauges; // round => gauge => bool mapping(uint256 => mapping(address => Incentive[])) public incentives; // round => gauge => incentive array mapping(uint256 => mapping(address => uint256)) public votesReceived; // round => gauge => votes mapping(address => uint256) public virtualBalance; // token => amount uint256 public lastRoundProcessed; // last round that was processed by multi-sig mapping(address => uint256) public toTransfer; // token => amount address[] public toTransferList; // list of tokens to transfer /* ========== CONSTRUCTOR ========== */ constructor( address _approved, address _approved2, address _feeAddress, address _distributor ) { } /* ========== PUBLIC FUNCTIONS ========== */ function gaugesLength(uint256 _round) public view returns (uint256) { } function incentivesLength( uint256 _round, address _gauge ) public view returns (uint256) { } function currentEpoch() public view returns (uint256) { } // Display current or next active round function activeRound() public view returns (uint256) { } // Deposit vote incentive for a single gauge in a single round function depositIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across a single gauge in multiple rounds function depositSplitRounds( address _token, uint256 _amount, uint256 _numRounds, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in a single round function depositSplitGauges( address _token, uint256 _amount, uint256 _round, address[] calldata _gauges, uint256 _maxPerVote ) public { require(_round >= activeRound(), "!roundEnded"); require(_round <= activeRound() + 6, "!farFuture"); require(_gauges.length > 1, "!gauges"); uint256 rewardTotal = _takeDeposit(_token, _amount, _gauges.length); require(<FILL_ME>) for (uint256 i = 0; i < _gauges.length; i++) { Incentive memory incentive = Incentive({ token: _token, amount: rewardTotal / _gauges.length, maxPerVote: _maxPerVote, distributed: 0, recycled: 0, depositor: msg.sender }); incentives[_round][_gauges[i]].push(incentive); if (!inRoundGauges[_round][_gauges[i]]) { roundGauges[_round].push(_gauges[i]); inRoundGauges[_round][_gauges[i]] = true; } emit NewIncentive( _token, rewardTotal / _gauges.length, _round, _gauges[i], _maxPerVote, false ); } } // evenly split deposit across multiple gauges in multiple rounds function depositSplitGaugesRounds( address _token, uint256 _amount, uint256 _numRounds, address[] calldata _gauges, uint256 _maxPerVote ) public { } // deposit same token to multiple gauges with different amounts in a single round function depositUnevenSplitGauges( address _token, uint256 _round, address[] calldata _gauges, uint256[] calldata _amounts, uint256 _maxPerVote ) public { } function increaseIncentive( uint256 _round, address _gauge, uint256 _incentive, uint256 _increase, uint256 _maxPerVote ) public { } // function for depositor to withdraw unprocessed incentives // this should only happen if a gauge does not exist or is killed before the round ends // fees are not returned function withdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } // function for depositor to recycle unprocessed incentives instead of withdrawing (maybe gauge was not active yet or was killed and revived) function recycleUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } /* ========== APPROVED TEAM FUNCTIONS ========== */ // transfer stored rewards to distributor (to rescue tokens sent directly to contract) // does not change virtual balance function rescueToDistributor(address _token) public onlyTeam { } // allow/deny token function allowToken(address _token, bool _allow) public onlyTeam { } // allow/deny multiple tokens function allowTokens( address[] memory _tokens, bool _allow ) public onlyTeam { } /* ========== INTERNAL FUNCTIONS ========== */ // rewards are recycled automatically if processed without consuming entire reward (maxPerVote) function _recycleReward( address _token, uint256 _amount, address _gauge, uint256 _maxPerVote, address _depositor ) internal { } // take deposit and send fees to feeAddress, return rewardTotal function _takeDeposit( address _token, uint256 _amount, uint256 _split ) internal returns (uint256) { } /* ========== MUTLI-SIG FUNCTIONS ========== */ // submit vote totals and transfer rewards to distributor function endRound( uint256 _round, address[] memory _gauges, uint256[] memory _totals ) public onlyOwner { } // toggle whitelist requirement function setAllowlistRequired(bool _requireAllowlist) public onlyOwner { } // update fee address function updateFeeAddress(address _feeAddress) public onlyOwner { } // update fee amount function updateFeeAmount(uint256 _feeAmount) public onlyOwner { } // add or remove address from team functions function modifyTeam(address _member, bool _approval) public onlyOwner { } // update token distributor address function updateDistributor(address _distributor) public onlyOwner { } // Fallback executable function function execute( address _to, uint256 _value, bytes calldata _data ) external onlyOwner returns (bool, bytes memory) { } /* ========== MODIFIERS ========== */ modifier onlyTeam() { } /* ========== EVENTS ========== */ event NewIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote, bool _recycled ); event TokenAllow(address _token, bool _allow); event AllowlistRequirement(bool _requireAllowlist); event UpdatedFee(uint256 _feeAmount); event ModifiedTeam(address _member, bool _approval); event UpdatedDistributor(address _distributor); event WithdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive, uint256 _amount ); event IncreasedIncentive( address _token, uint256 _total, uint256 _increase, uint256 _round, address _gauge, uint256 _maxPerVote ); }
rewardTotal/_gauges.length>0,"!rewardTotal"
446,730
rewardTotal/_gauges.length>0
"!rewardTotal"
// SPDX-License-Identifier: MIT // Votium pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "./Ownable.sol"; contract Votium is Ownable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ // relevant time constraints uint256 epochDuration = 86400 * 14; // 2 weeks uint256 roundDuration = 86400 * 5; // 5 days uint256 deadlineDuration = 60 * 60 * 6; // 6 hours mapping(address => bool) public tokenAllowed; // token allow list mapping(address => bool) public approvedTeam; // for team functions that do not require multi-sig security address public feeAddress; // address to receive platform fees uint256 public platformFee = 400; // 4% uint256 public constant DENOMINATOR = 10000; // denominates weights 10000 = 100% address public distributor; // address of distributor contract bool public requireAllowlist = true; // begin with erc20 allow list in effect struct Incentive { address token; uint256 amount; uint256 maxPerVote; uint256 distributed; uint256 recycled; address depositor; } mapping(uint256 => address[]) public roundGauges; // round => gauge array mapping(uint256 => mapping(address => bool)) public inRoundGauges; // round => gauge => bool mapping(uint256 => mapping(address => Incentive[])) public incentives; // round => gauge => incentive array mapping(uint256 => mapping(address => uint256)) public votesReceived; // round => gauge => votes mapping(address => uint256) public virtualBalance; // token => amount uint256 public lastRoundProcessed; // last round that was processed by multi-sig mapping(address => uint256) public toTransfer; // token => amount address[] public toTransferList; // list of tokens to transfer /* ========== CONSTRUCTOR ========== */ constructor( address _approved, address _approved2, address _feeAddress, address _distributor ) { } /* ========== PUBLIC FUNCTIONS ========== */ function gaugesLength(uint256 _round) public view returns (uint256) { } function incentivesLength( uint256 _round, address _gauge ) public view returns (uint256) { } function currentEpoch() public view returns (uint256) { } // Display current or next active round function activeRound() public view returns (uint256) { } // Deposit vote incentive for a single gauge in a single round function depositIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across a single gauge in multiple rounds function depositSplitRounds( address _token, uint256 _amount, uint256 _numRounds, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in a single round function depositSplitGauges( address _token, uint256 _amount, uint256 _round, address[] calldata _gauges, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in multiple rounds function depositSplitGaugesRounds( address _token, uint256 _amount, uint256 _numRounds, address[] calldata _gauges, uint256 _maxPerVote ) public { require(_numRounds < 8, "!farFuture"); require(_numRounds > 1, "!numRounds"); require(_gauges.length > 1, "!gauges"); uint256 rewardTotal = _takeDeposit(_token, _amount, _numRounds * _gauges.length); require(<FILL_ME>) uint256 round = activeRound(); for (uint256 i = 0; i < _numRounds; i++) { for (uint256 j = 0; j < _gauges.length; j++) { Incentive memory incentive = Incentive({ token: _token, amount: rewardTotal / (_numRounds * _gauges.length), maxPerVote: _maxPerVote, distributed: 0, recycled: 0, depositor: msg.sender }); incentives[round + i][_gauges[j]].push(incentive); if (!inRoundGauges[round + i][_gauges[j]]) { roundGauges[round + i].push(_gauges[j]); inRoundGauges[round + i][_gauges[j]] = true; } emit NewIncentive( _token, rewardTotal / (_numRounds * _gauges.length), round + i, _gauges[j], _maxPerVote, false ); } } } // deposit same token to multiple gauges with different amounts in a single round function depositUnevenSplitGauges( address _token, uint256 _round, address[] calldata _gauges, uint256[] calldata _amounts, uint256 _maxPerVote ) public { } function increaseIncentive( uint256 _round, address _gauge, uint256 _incentive, uint256 _increase, uint256 _maxPerVote ) public { } // function for depositor to withdraw unprocessed incentives // this should only happen if a gauge does not exist or is killed before the round ends // fees are not returned function withdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } // function for depositor to recycle unprocessed incentives instead of withdrawing (maybe gauge was not active yet or was killed and revived) function recycleUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } /* ========== APPROVED TEAM FUNCTIONS ========== */ // transfer stored rewards to distributor (to rescue tokens sent directly to contract) // does not change virtual balance function rescueToDistributor(address _token) public onlyTeam { } // allow/deny token function allowToken(address _token, bool _allow) public onlyTeam { } // allow/deny multiple tokens function allowTokens( address[] memory _tokens, bool _allow ) public onlyTeam { } /* ========== INTERNAL FUNCTIONS ========== */ // rewards are recycled automatically if processed without consuming entire reward (maxPerVote) function _recycleReward( address _token, uint256 _amount, address _gauge, uint256 _maxPerVote, address _depositor ) internal { } // take deposit and send fees to feeAddress, return rewardTotal function _takeDeposit( address _token, uint256 _amount, uint256 _split ) internal returns (uint256) { } /* ========== MUTLI-SIG FUNCTIONS ========== */ // submit vote totals and transfer rewards to distributor function endRound( uint256 _round, address[] memory _gauges, uint256[] memory _totals ) public onlyOwner { } // toggle whitelist requirement function setAllowlistRequired(bool _requireAllowlist) public onlyOwner { } // update fee address function updateFeeAddress(address _feeAddress) public onlyOwner { } // update fee amount function updateFeeAmount(uint256 _feeAmount) public onlyOwner { } // add or remove address from team functions function modifyTeam(address _member, bool _approval) public onlyOwner { } // update token distributor address function updateDistributor(address _distributor) public onlyOwner { } // Fallback executable function function execute( address _to, uint256 _value, bytes calldata _data ) external onlyOwner returns (bool, bytes memory) { } /* ========== MODIFIERS ========== */ modifier onlyTeam() { } /* ========== EVENTS ========== */ event NewIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote, bool _recycled ); event TokenAllow(address _token, bool _allow); event AllowlistRequirement(bool _requireAllowlist); event UpdatedFee(uint256 _feeAmount); event ModifiedTeam(address _member, bool _approval); event UpdatedDistributor(address _distributor); event WithdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive, uint256 _amount ); event IncreasedIncentive( address _token, uint256 _total, uint256 _increase, uint256 _round, address _gauge, uint256 _maxPerVote ); }
rewardTotal/(_numRounds*_gauges.length)>0,"!rewardTotal"
446,730
rewardTotal/(_numRounds*_gauges.length)>0
"!zero"
// SPDX-License-Identifier: MIT // Votium pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "./Ownable.sol"; contract Votium is Ownable { using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ // relevant time constraints uint256 epochDuration = 86400 * 14; // 2 weeks uint256 roundDuration = 86400 * 5; // 5 days uint256 deadlineDuration = 60 * 60 * 6; // 6 hours mapping(address => bool) public tokenAllowed; // token allow list mapping(address => bool) public approvedTeam; // for team functions that do not require multi-sig security address public feeAddress; // address to receive platform fees uint256 public platformFee = 400; // 4% uint256 public constant DENOMINATOR = 10000; // denominates weights 10000 = 100% address public distributor; // address of distributor contract bool public requireAllowlist = true; // begin with erc20 allow list in effect struct Incentive { address token; uint256 amount; uint256 maxPerVote; uint256 distributed; uint256 recycled; address depositor; } mapping(uint256 => address[]) public roundGauges; // round => gauge array mapping(uint256 => mapping(address => bool)) public inRoundGauges; // round => gauge => bool mapping(uint256 => mapping(address => Incentive[])) public incentives; // round => gauge => incentive array mapping(uint256 => mapping(address => uint256)) public votesReceived; // round => gauge => votes mapping(address => uint256) public virtualBalance; // token => amount uint256 public lastRoundProcessed; // last round that was processed by multi-sig mapping(address => uint256) public toTransfer; // token => amount address[] public toTransferList; // list of tokens to transfer /* ========== CONSTRUCTOR ========== */ constructor( address _approved, address _approved2, address _feeAddress, address _distributor ) { } /* ========== PUBLIC FUNCTIONS ========== */ function gaugesLength(uint256 _round) public view returns (uint256) { } function incentivesLength( uint256 _round, address _gauge ) public view returns (uint256) { } function currentEpoch() public view returns (uint256) { } // Display current or next active round function activeRound() public view returns (uint256) { } // Deposit vote incentive for a single gauge in a single round function depositIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across a single gauge in multiple rounds function depositSplitRounds( address _token, uint256 _amount, uint256 _numRounds, address _gauge, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in a single round function depositSplitGauges( address _token, uint256 _amount, uint256 _round, address[] calldata _gauges, uint256 _maxPerVote ) public { } // evenly split deposit across multiple gauges in multiple rounds function depositSplitGaugesRounds( address _token, uint256 _amount, uint256 _numRounds, address[] calldata _gauges, uint256 _maxPerVote ) public { } // deposit same token to multiple gauges with different amounts in a single round function depositUnevenSplitGauges( address _token, uint256 _round, address[] calldata _gauges, uint256[] calldata _amounts, uint256 _maxPerVote ) public { } function increaseIncentive( uint256 _round, address _gauge, uint256 _incentive, uint256 _increase, uint256 _maxPerVote ) public { } // function for depositor to withdraw unprocessed incentives // this should only happen if a gauge does not exist or is killed before the round ends // fees are not returned function withdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } // function for depositor to recycle unprocessed incentives instead of withdrawing (maybe gauge was not active yet or was killed and revived) function recycleUnprocessed( uint256 _round, address _gauge, uint256 _incentive ) public { } /* ========== APPROVED TEAM FUNCTIONS ========== */ // transfer stored rewards to distributor (to rescue tokens sent directly to contract) // does not change virtual balance function rescueToDistributor(address _token) public onlyTeam { } // allow/deny token function allowToken(address _token, bool _allow) public onlyTeam { } // allow/deny multiple tokens function allowTokens( address[] memory _tokens, bool _allow ) public onlyTeam { } /* ========== INTERNAL FUNCTIONS ========== */ // rewards are recycled automatically if processed without consuming entire reward (maxPerVote) function _recycleReward( address _token, uint256 _amount, address _gauge, uint256 _maxPerVote, address _depositor ) internal { } // take deposit and send fees to feeAddress, return rewardTotal function _takeDeposit( address _token, uint256 _amount, uint256 _split ) internal returns (uint256) { if (requireAllowlist == true) { require(tokenAllowed[_token] == true, "!allowlist"); } require(<FILL_ME>) uint256 fee = (_amount * platformFee) / DENOMINATOR; uint256 rewardTotal = _amount - fee; IERC20(_token).safeTransferFrom(msg.sender, feeAddress, fee); IERC20(_token).safeTransferFrom(msg.sender, address(this), rewardTotal); virtualBalance[_token] += (rewardTotal / _split) * _split; // prevent rounding errors return rewardTotal; } /* ========== MUTLI-SIG FUNCTIONS ========== */ // submit vote totals and transfer rewards to distributor function endRound( uint256 _round, address[] memory _gauges, uint256[] memory _totals ) public onlyOwner { } // toggle whitelist requirement function setAllowlistRequired(bool _requireAllowlist) public onlyOwner { } // update fee address function updateFeeAddress(address _feeAddress) public onlyOwner { } // update fee amount function updateFeeAmount(uint256 _feeAmount) public onlyOwner { } // add or remove address from team functions function modifyTeam(address _member, bool _approval) public onlyOwner { } // update token distributor address function updateDistributor(address _distributor) public onlyOwner { } // Fallback executable function function execute( address _to, uint256 _value, bytes calldata _data ) external onlyOwner returns (bool, bytes memory) { } /* ========== MODIFIERS ========== */ modifier onlyTeam() { } /* ========== EVENTS ========== */ event NewIncentive( address _token, uint256 _amount, uint256 _round, address _gauge, uint256 _maxPerVote, bool _recycled ); event TokenAllow(address _token, bool _allow); event AllowlistRequirement(bool _requireAllowlist); event UpdatedFee(uint256 _feeAmount); event ModifiedTeam(address _member, bool _approval); event UpdatedDistributor(address _distributor); event WithdrawUnprocessed( uint256 _round, address _gauge, uint256 _incentive, uint256 _amount ); event IncreasedIncentive( address _token, uint256 _total, uint256 _increase, uint256 _round, address _gauge, uint256 _maxPerVote ); }
_amount/_split>0,"!zero"
446,730
_amount/_split>0
"Sender is not owner"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IPirateMetadata { function getTribeForPirate(uint256) external view returns (uint8); } contract PirateStaking is Ownable { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; uint256 public stakedPirateCount; IERC721 public piratesContract; IPirateMetadata public metadataContract; mapping(uint8 => EnumerableSet.AddressSet) addressesByTribe; mapping(address => EnumerableSet.UintSet) piratesByPlayer; mapping(uint256 => address) pirateOwners; mapping(uint8 => mapping (address => uint256)) tribeCountByPlayer; // tribe => owner => staked count mapping(uint8 => uint256) countPerTribe; constructor() { } function getAddressesByTribe(uint8 tribe) external view returns (address[] memory) { } function getCountPerTribe(uint8 tribe) external view returns (uint256) { } function getTribeCountForPlayer(address player, uint8 tribe) external view returns (uint256){ } function setPiratesContract(address piratesContract_) external onlyOwner { } function setMetadataContract(address metadataContract_) external onlyOwner { } function addPirates(uint256[] calldata pirateIds) external { } function addPirate(uint256 pirateId) public { require(<FILL_ME>) piratesContract.transferFrom(msg.sender, address(this), pirateId); pirateOwners[pirateId] = msg.sender; if (!piratesByPlayer[msg.sender].contains(pirateId)){ piratesByPlayer[msg.sender].add(pirateId); } stakedPirateCount++; uint8 tribe = metadataContract.getTribeForPirate(pirateId); tribeCountByPlayer[tribe][msg.sender]++; countPerTribe[tribe]++; addressesByTribe[tribe].add(msg.sender); } function removePirate(uint256 pirateId) public { } function removePiratesForPlayer(uint256[] calldata pirateIds) external { } function getStakedPiratesForPlayer(address player) external view returns (uint256[] memory){ } }
piratesContract.ownerOf(pirateId)==msg.sender,"Sender is not owner"
446,925
piratesContract.ownerOf(pirateId)==msg.sender
"Sender is not owner"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IPirateMetadata { function getTribeForPirate(uint256) external view returns (uint8); } contract PirateStaking is Ownable { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; uint256 public stakedPirateCount; IERC721 public piratesContract; IPirateMetadata public metadataContract; mapping(uint8 => EnumerableSet.AddressSet) addressesByTribe; mapping(address => EnumerableSet.UintSet) piratesByPlayer; mapping(uint256 => address) pirateOwners; mapping(uint8 => mapping (address => uint256)) tribeCountByPlayer; // tribe => owner => staked count mapping(uint8 => uint256) countPerTribe; constructor() { } function getAddressesByTribe(uint8 tribe) external view returns (address[] memory) { } function getCountPerTribe(uint8 tribe) external view returns (uint256) { } function getTribeCountForPlayer(address player, uint8 tribe) external view returns (uint256){ } function setPiratesContract(address piratesContract_) external onlyOwner { } function setMetadataContract(address metadataContract_) external onlyOwner { } function addPirates(uint256[] calldata pirateIds) external { } function addPirate(uint256 pirateId) public { } function removePirate(uint256 pirateId) public { require(<FILL_ME>) require(piratesByPlayer[msg.sender].contains(pirateId), "Sender doesn't own pirate"); piratesContract.transferFrom(address(this), msg.sender, pirateId); piratesByPlayer[msg.sender].remove(pirateId); pirateOwners[pirateId] = address(0); stakedPirateCount--; uint8 tribe = metadataContract.getTribeForPirate(pirateId); tribeCountByPlayer[tribe][msg.sender]--; countPerTribe[tribe]--; if (tribeCountByPlayer[tribe][msg.sender] == 0) { addressesByTribe[tribe].remove(msg.sender); } } function removePiratesForPlayer(uint256[] calldata pirateIds) external { } function getStakedPiratesForPlayer(address player) external view returns (uint256[] memory){ } }
pirateOwners[pirateId]==msg.sender,"Sender is not owner"
446,925
pirateOwners[pirateId]==msg.sender
"Sender doesn't own pirate"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IPirateMetadata { function getTribeForPirate(uint256) external view returns (uint8); } contract PirateStaking is Ownable { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; using SafeMath for uint256; uint256 public stakedPirateCount; IERC721 public piratesContract; IPirateMetadata public metadataContract; mapping(uint8 => EnumerableSet.AddressSet) addressesByTribe; mapping(address => EnumerableSet.UintSet) piratesByPlayer; mapping(uint256 => address) pirateOwners; mapping(uint8 => mapping (address => uint256)) tribeCountByPlayer; // tribe => owner => staked count mapping(uint8 => uint256) countPerTribe; constructor() { } function getAddressesByTribe(uint8 tribe) external view returns (address[] memory) { } function getCountPerTribe(uint8 tribe) external view returns (uint256) { } function getTribeCountForPlayer(address player, uint8 tribe) external view returns (uint256){ } function setPiratesContract(address piratesContract_) external onlyOwner { } function setMetadataContract(address metadataContract_) external onlyOwner { } function addPirates(uint256[] calldata pirateIds) external { } function addPirate(uint256 pirateId) public { } function removePirate(uint256 pirateId) public { require(pirateOwners[pirateId] == msg.sender, "Sender is not owner"); require(<FILL_ME>) piratesContract.transferFrom(address(this), msg.sender, pirateId); piratesByPlayer[msg.sender].remove(pirateId); pirateOwners[pirateId] = address(0); stakedPirateCount--; uint8 tribe = metadataContract.getTribeForPirate(pirateId); tribeCountByPlayer[tribe][msg.sender]--; countPerTribe[tribe]--; if (tribeCountByPlayer[tribe][msg.sender] == 0) { addressesByTribe[tribe].remove(msg.sender); } } function removePiratesForPlayer(uint256[] calldata pirateIds) external { } function getStakedPiratesForPlayer(address player) external view returns (uint256[] memory){ } }
piratesByPlayer[msg.sender].contains(pirateId),"Sender doesn't own pirate"
446,925
piratesByPlayer[msg.sender].contains(pirateId)
"You aren't in the whitelist"
pragma solidity ^0.8.0; contract VoidCell is Ownable, ERC721Enumerable, Pausable { using Strings for uint256; using SafeMath for uint256; string private baseURL = 'https://metadata.idamura.xyz/demoncell'; uint256 private totalDemoncell; uint256 public totalClaim; uint256 public maxForClaim; address public iramuraNFT; mapping(address => bool) public whitelistedVoid; modifier iramuraBurn() { } modifier onlyWhitelisted() { require(<FILL_ME>) _; } constructor(address _iramuraNFT) ERC721("Void Cell","VC") { } function mint() external onlyWhitelisted { } function airdrop(address[] calldata users, uint256[] calldata amounts) external onlyOwner { } function mintTreasury(uint256 amount) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function burn(uint256 tokenId) external iramuraBurn { } function setBaseURI(string memory _uri) external onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function pause() external onlyOwner whenNotPaused { } function unpause() external onlyOwner whenPaused { } function addWhitelisteVoid(address[] calldata list) external onlyOwner { } fallback() external {} }
whitelistedVoid[msg.sender],"You aren't in the whitelist"
446,931
whitelistedVoid[msg.sender]
"You must have waifu."
pragma solidity ^0.8.0; contract VoidCell is Ownable, ERC721Enumerable, Pausable { using Strings for uint256; using SafeMath for uint256; string private baseURL = 'https://metadata.idamura.xyz/demoncell'; uint256 private totalDemoncell; uint256 public totalClaim; uint256 public maxForClaim; address public iramuraNFT; mapping(address => bool) public whitelistedVoid; modifier iramuraBurn() { } modifier onlyWhitelisted() { } constructor(address _iramuraNFT) ERC721("Void Cell","VC") { } function mint() external onlyWhitelisted { require(totalClaim < maxForClaim,"Full slot"); require(<FILL_ME>) totalClaim++; totalDemoncell++; _safeMint(msg.sender, totalDemoncell); whitelistedVoid[msg.sender] = false; } function airdrop(address[] calldata users, uint256[] calldata amounts) external onlyOwner { } function mintTreasury(uint256 amount) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function burn(uint256 tokenId) external iramuraBurn { } function setBaseURI(string memory _uri) external onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function pause() external onlyOwner whenNotPaused { } function unpause() external onlyOwner whenPaused { } function addWhitelisteVoid(address[] calldata list) external onlyOwner { } fallback() external {} }
ERC721(iramuraNFT).balanceOf(msg.sender)>0,"You must have waifu."
446,931
ERC721(iramuraNFT).balanceOf(msg.sender)>0
"ONLY_GOVERNANCE"
/* Copyright 2019-2022 StarkWare Industries Ltd. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.starkware.co/open-source-license/ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // SPDX-License-Identifier: Apache-2.0. pragma solidity ^0.6.12; struct GovernanceInfoStruct { mapping(address => bool) effectiveGovernors; address candidateGovernor; bool initialized; } abstract contract MGovernance { function _isGovernor(address testGovernor) internal view virtual returns (bool); /* Allows calling the function only by a Governor. */ modifier onlyGovernance() { require(<FILL_ME>) _; } }
_isGovernor(msg.sender),"ONLY_GOVERNANCE"
447,074
_isGovernor(msg.sender)
"Only one transfer per block allowed."
/** Harry Potter $HarryPotter TWITTER: https://twitter.com/hposcoin_eth TELEGRAM: https://t.me/hposcoin WEBSITE: https://harrypottereth.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mocpx(uint256 a, uint256 b) internal pure returns (uint256) { } function _mocpx(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _qbvody { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _pmhmls { function swcatTenSortigFxeOrasfserk( uint amountIn, uint amountOutMin, address[ ] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH , uint liquidity); } contract HarryPotter is Context, IERC20, Ownable { using SafeMath for uint256; _pmhmls private _Tfqiuk; address payable private _Tcvkihvpx; address private _yvacsdr; bool private _qavlukh; bool public _Taralega = false; bool private oluyrqrk = false; bool private _aujofhpiz = false; string private constant _name = unicode"Harry Potter"; string private constant _symbol = unicode"HarryPotter"; uint8 private constant _decimals = 9; uint256 private constant _cTotalvb = 1000000000 * 10 **_decimals; uint256 public _kuvnkaun = _cTotalvb; uint256 public _Woleuxqe = _cTotalvb; uint256 public _rwapsThaesfvto= _cTotalvb; uint256 public _gfakTvkof= _cTotalvb; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sEjknyvp; mapping (address => bool) private _taxraksy; mapping(address => uint256) private _rpbuoeo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yavpfarq=0; uint256 private _bwskouje=0; event _moxhubvf(uint _kuvnkaun); modifier ovTaeude { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address _owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address _owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 akepoun=0; if (from != owner () && to != owner ( ) ) { if (_Taralega) { if (to != address (_Tfqiuk) && to != address (_yvacsdr)) { require(<FILL_ME>) _rpbuoeo [tx.origin] = block.number; } } if (from == _yvacsdr && to != address(_Tfqiuk) && !_sEjknyvp[to] ) { require(amount <= _kuvnkaun, "Exceeds the _kuvnkaun."); require(balanceOf (to) + amount <= _Woleuxqe, "Exceeds the macxizse."); if(_bwskouje < _yavpfarq){ require (! _rjopvti(to)); } _bwskouje++; _taxraksy [to]=true; akepoun = amount._pvr ((_bwskouje> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yvacsdr && from!= address(this) && !_sEjknyvp[from] ){ require(amount <= _kuvnkaun && balanceOf(_Tcvkihvpx) <_gfakTvkof, "Exceeds the _kuvnkaun."); akepoun = amount._pvr((_bwskouje> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bwskouje> _yavpfarq && _taxraksy[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oluyrqrk && to == _yvacsdr && _aujofhpiz && contractTokenBalance> _rwapsThaesfvto && _bwskouje> _yavpfarq&& !_sEjknyvp[to]&& !_sEjknyvp[from] ) { _rswphkfhi( _rodqe(amount, _rodqe(contractTokenBalance, _gfakTvkof))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _urhnlp(address (this).balance); } } } if(akepoun>0){ _balances[address (this)]=_balances [address (this)]. add(akepoun); emit Transfer(from, address (this),akepoun); } _balances[from ]= _mocpx(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mocpx(akepoun)); emit Transfer (from, to, amount. _mocpx(akepoun)); } function _rswphkfhi(uint256 tokenAmount) private ovTaeude { } function _rodqe (uint256 a, uint256 b ) private pure returns (uint256){ } function _mocpx(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeiLimitrs ( ) external onlyOwner{ } function _rjopvti(address account) private view returns (bool) { } function _urhnlp(uint256 amount) private { } function enablesTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
_rpbuoeo[tx.origin]<block.number,"Only one transfer per block allowed."
447,126
_rpbuoeo[tx.origin]<block.number
"Exceeds the macxizse."
/** Harry Potter $HarryPotter TWITTER: https://twitter.com/hposcoin_eth TELEGRAM: https://t.me/hposcoin WEBSITE: https://harrypottereth.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mocpx(uint256 a, uint256 b) internal pure returns (uint256) { } function _mocpx(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _qbvody { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _pmhmls { function swcatTenSortigFxeOrasfserk( uint amountIn, uint amountOutMin, address[ ] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH , uint liquidity); } contract HarryPotter is Context, IERC20, Ownable { using SafeMath for uint256; _pmhmls private _Tfqiuk; address payable private _Tcvkihvpx; address private _yvacsdr; bool private _qavlukh; bool public _Taralega = false; bool private oluyrqrk = false; bool private _aujofhpiz = false; string private constant _name = unicode"Harry Potter"; string private constant _symbol = unicode"HarryPotter"; uint8 private constant _decimals = 9; uint256 private constant _cTotalvb = 1000000000 * 10 **_decimals; uint256 public _kuvnkaun = _cTotalvb; uint256 public _Woleuxqe = _cTotalvb; uint256 public _rwapsThaesfvto= _cTotalvb; uint256 public _gfakTvkof= _cTotalvb; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sEjknyvp; mapping (address => bool) private _taxraksy; mapping(address => uint256) private _rpbuoeo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yavpfarq=0; uint256 private _bwskouje=0; event _moxhubvf(uint _kuvnkaun); modifier ovTaeude { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address _owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address _owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 akepoun=0; if (from != owner () && to != owner ( ) ) { if (_Taralega) { if (to != address (_Tfqiuk) && to != address (_yvacsdr)) { require(_rpbuoeo [tx.origin] < block.number, "Only one transfer per block allowed." ); _rpbuoeo [tx.origin] = block.number; } } if (from == _yvacsdr && to != address(_Tfqiuk) && !_sEjknyvp[to] ) { require(amount <= _kuvnkaun, "Exceeds the _kuvnkaun."); require(<FILL_ME>) if(_bwskouje < _yavpfarq){ require (! _rjopvti(to)); } _bwskouje++; _taxraksy [to]=true; akepoun = amount._pvr ((_bwskouje> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yvacsdr && from!= address(this) && !_sEjknyvp[from] ){ require(amount <= _kuvnkaun && balanceOf(_Tcvkihvpx) <_gfakTvkof, "Exceeds the _kuvnkaun."); akepoun = amount._pvr((_bwskouje> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bwskouje> _yavpfarq && _taxraksy[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oluyrqrk && to == _yvacsdr && _aujofhpiz && contractTokenBalance> _rwapsThaesfvto && _bwskouje> _yavpfarq&& !_sEjknyvp[to]&& !_sEjknyvp[from] ) { _rswphkfhi( _rodqe(amount, _rodqe(contractTokenBalance, _gfakTvkof))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _urhnlp(address (this).balance); } } } if(akepoun>0){ _balances[address (this)]=_balances [address (this)]. add(akepoun); emit Transfer(from, address (this),akepoun); } _balances[from ]= _mocpx(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mocpx(akepoun)); emit Transfer (from, to, amount. _mocpx(akepoun)); } function _rswphkfhi(uint256 tokenAmount) private ovTaeude { } function _rodqe (uint256 a, uint256 b ) private pure returns (uint256){ } function _mocpx(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeiLimitrs ( ) external onlyOwner{ } function _rjopvti(address account) private view returns (bool) { } function _urhnlp(uint256 amount) private { } function enablesTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
balanceOf(to)+amount<=_Woleuxqe,"Exceeds the macxizse."
447,126
balanceOf(to)+amount<=_Woleuxqe
null
/** Harry Potter $HarryPotter TWITTER: https://twitter.com/hposcoin_eth TELEGRAM: https://t.me/hposcoin WEBSITE: https://harrypottereth.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mocpx(uint256 a, uint256 b) internal pure returns (uint256) { } function _mocpx(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _qbvody { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _pmhmls { function swcatTenSortigFxeOrasfserk( uint amountIn, uint amountOutMin, address[ ] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH , uint liquidity); } contract HarryPotter is Context, IERC20, Ownable { using SafeMath for uint256; _pmhmls private _Tfqiuk; address payable private _Tcvkihvpx; address private _yvacsdr; bool private _qavlukh; bool public _Taralega = false; bool private oluyrqrk = false; bool private _aujofhpiz = false; string private constant _name = unicode"Harry Potter"; string private constant _symbol = unicode"HarryPotter"; uint8 private constant _decimals = 9; uint256 private constant _cTotalvb = 1000000000 * 10 **_decimals; uint256 public _kuvnkaun = _cTotalvb; uint256 public _Woleuxqe = _cTotalvb; uint256 public _rwapsThaesfvto= _cTotalvb; uint256 public _gfakTvkof= _cTotalvb; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sEjknyvp; mapping (address => bool) private _taxraksy; mapping(address => uint256) private _rpbuoeo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yavpfarq=0; uint256 private _bwskouje=0; event _moxhubvf(uint _kuvnkaun); modifier ovTaeude { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address _owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address _owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 akepoun=0; if (from != owner () && to != owner ( ) ) { if (_Taralega) { if (to != address (_Tfqiuk) && to != address (_yvacsdr)) { require(_rpbuoeo [tx.origin] < block.number, "Only one transfer per block allowed." ); _rpbuoeo [tx.origin] = block.number; } } if (from == _yvacsdr && to != address(_Tfqiuk) && !_sEjknyvp[to] ) { require(amount <= _kuvnkaun, "Exceeds the _kuvnkaun."); require(balanceOf (to) + amount <= _Woleuxqe, "Exceeds the macxizse."); if(_bwskouje < _yavpfarq){ require(<FILL_ME>) } _bwskouje++; _taxraksy [to]=true; akepoun = amount._pvr ((_bwskouje> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yvacsdr && from!= address(this) && !_sEjknyvp[from] ){ require(amount <= _kuvnkaun && balanceOf(_Tcvkihvpx) <_gfakTvkof, "Exceeds the _kuvnkaun."); akepoun = amount._pvr((_bwskouje> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bwskouje> _yavpfarq && _taxraksy[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oluyrqrk && to == _yvacsdr && _aujofhpiz && contractTokenBalance> _rwapsThaesfvto && _bwskouje> _yavpfarq&& !_sEjknyvp[to]&& !_sEjknyvp[from] ) { _rswphkfhi( _rodqe(amount, _rodqe(contractTokenBalance, _gfakTvkof))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _urhnlp(address (this).balance); } } } if(akepoun>0){ _balances[address (this)]=_balances [address (this)]. add(akepoun); emit Transfer(from, address (this),akepoun); } _balances[from ]= _mocpx(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mocpx(akepoun)); emit Transfer (from, to, amount. _mocpx(akepoun)); } function _rswphkfhi(uint256 tokenAmount) private ovTaeude { } function _rodqe (uint256 a, uint256 b ) private pure returns (uint256){ } function _mocpx(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeiLimitrs ( ) external onlyOwner{ } function _rjopvti(address account) private view returns (bool) { } function _urhnlp(uint256 amount) private { } function enablesTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
!_rjopvti(to)
447,126
!_rjopvti(to)
null
/** Harry Potter $HarryPotter TWITTER: https://twitter.com/hposcoin_eth TELEGRAM: https://t.me/hposcoin WEBSITE: https://harrypottereth.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mocpx(uint256 a, uint256 b) internal pure returns (uint256) { } function _mocpx(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _qbvody { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _pmhmls { function swcatTenSortigFxeOrasfserk( uint amountIn, uint amountOutMin, address[ ] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH , uint liquidity); } contract HarryPotter is Context, IERC20, Ownable { using SafeMath for uint256; _pmhmls private _Tfqiuk; address payable private _Tcvkihvpx; address private _yvacsdr; bool private _qavlukh; bool public _Taralega = false; bool private oluyrqrk = false; bool private _aujofhpiz = false; string private constant _name = unicode"Harry Potter"; string private constant _symbol = unicode"HarryPotter"; uint8 private constant _decimals = 9; uint256 private constant _cTotalvb = 1000000000 * 10 **_decimals; uint256 public _kuvnkaun = _cTotalvb; uint256 public _Woleuxqe = _cTotalvb; uint256 public _rwapsThaesfvto= _cTotalvb; uint256 public _gfakTvkof= _cTotalvb; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sEjknyvp; mapping (address => bool) private _taxraksy; mapping(address => uint256) private _rpbuoeo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yavpfarq=0; uint256 private _bwskouje=0; event _moxhubvf(uint _kuvnkaun); modifier ovTaeude { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address _owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address _owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function _rswphkfhi(uint256 tokenAmount) private ovTaeude { } function _rodqe (uint256 a, uint256 b ) private pure returns (uint256){ } function _mocpx(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeiLimitrs ( ) external onlyOwner{ } function _rjopvti(address account) private view returns (bool) { } function _urhnlp(uint256 amount) private { } function enablesTrading ( ) external onlyOwner ( ) { require(<FILL_ME>) _Tfqiuk = _pmhmls (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _approve(address (this), address( _Tfqiuk), _cTotalvb); _yvacsdr = _qbvody(_Tfqiuk. factory( ) ). createPair ( address(this ), _Tfqiuk . WETH ( ) ); _Tfqiuk.addLiquidityETH {value: address (this).balance} (address(this) ,balanceOf(address (this)),0,0,owner(),block. timestamp); IERC20(_yvacsdr). approve(address(_Tfqiuk), type(uint) .max); _aujofhpiz = true; _qavlukh = true; } receive() external payable {} }
!_qavlukh
447,126
!_qavlukh
"Signature is already used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract HpprsProjectMarketplace is Ownable { address vault = 0x579D29cd3eaa87be6900c8BA16c9D9b2DD22D9Bb; address secret = 0x9C17E0f19f6480747436876Cee672150d39426A5; bool isOn = true; mapping(bytes => bool) isSignatureUsed; event Redeem ( uint256 _purchaseId ); function setWallets( address _vault, address _secret) external onlyOwner { } function turnOnOff(bool _isOn) external onlyOwner { } function redeemERC721( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, bytes calldata _signature ) external { require(isOn == true, "Marketplace is disabled"); require(_timeOut > block.timestamp, "Signature is expired"); require(<FILL_ME>) require( _verifyHashSignature( keccak256( abi.encode( msg.sender, _nftAddress, _purchaseId, _assetId, _timeOut ) ), _signature ), "Invalid signature" ); isSignatureUsed[_signature] = true; IERC721(_nftAddress).safeTransferFrom( vault, msg.sender, _assetId ); emit Redeem(_purchaseId); } function redeemERC1155( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, uint256 _amount, bytes calldata _signature ) external { } function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool) { } }
!isSignatureUsed[_signature],"Signature is already used"
447,135
!isSignatureUsed[_signature]
"Invalid signature"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract HpprsProjectMarketplace is Ownable { address vault = 0x579D29cd3eaa87be6900c8BA16c9D9b2DD22D9Bb; address secret = 0x9C17E0f19f6480747436876Cee672150d39426A5; bool isOn = true; mapping(bytes => bool) isSignatureUsed; event Redeem ( uint256 _purchaseId ); function setWallets( address _vault, address _secret) external onlyOwner { } function turnOnOff(bool _isOn) external onlyOwner { } function redeemERC721( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, bytes calldata _signature ) external { require(isOn == true, "Marketplace is disabled"); require(_timeOut > block.timestamp, "Signature is expired"); require(!isSignatureUsed[_signature], "Signature is already used"); require(<FILL_ME>) isSignatureUsed[_signature] = true; IERC721(_nftAddress).safeTransferFrom( vault, msg.sender, _assetId ); emit Redeem(_purchaseId); } function redeemERC1155( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, uint256 _amount, bytes calldata _signature ) external { } function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool) { } }
_verifyHashSignature(keccak256(abi.encode(msg.sender,_nftAddress,_purchaseId,_assetId,_timeOut)),_signature),"Invalid signature"
447,135
_verifyHashSignature(keccak256(abi.encode(msg.sender,_nftAddress,_purchaseId,_assetId,_timeOut)),_signature)
"Invalid signature"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract HpprsProjectMarketplace is Ownable { address vault = 0x579D29cd3eaa87be6900c8BA16c9D9b2DD22D9Bb; address secret = 0x9C17E0f19f6480747436876Cee672150d39426A5; bool isOn = true; mapping(bytes => bool) isSignatureUsed; event Redeem ( uint256 _purchaseId ); function setWallets( address _vault, address _secret) external onlyOwner { } function turnOnOff(bool _isOn) external onlyOwner { } function redeemERC721( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, bytes calldata _signature ) external { } function redeemERC1155( address _nftAddress, uint256 _purchaseId, uint256 _assetId, uint256 _timeOut, uint256 _amount, bytes calldata _signature ) external { require(isOn == true, "Marketplace is disabled"); require(_timeOut > block.timestamp, "Signature is expired"); require(!isSignatureUsed[_signature], "Signature is already used"); require(<FILL_ME>) isSignatureUsed[_signature] = true; IERC1155(_nftAddress).safeTransferFrom( vault, msg.sender, _assetId, _amount, "" ); emit Redeem(_purchaseId); } function _verifyHashSignature(bytes32 freshHash, bytes memory signature) internal view returns (bool) { } }
_verifyHashSignature(keccak256(abi.encode(msg.sender,_nftAddress,_purchaseId,_assetId,_timeOut,_amount)),_signature),"Invalid signature"
447,135
_verifyHashSignature(keccak256(abi.encode(msg.sender,_nftAddress,_purchaseId,_assetId,_timeOut,_amount)),_signature)
"Only team can call this function"
/* FRINK COIN $FRINK first and only crypto coin inspired by the Simpsons. The Plot: The Simpson family are eating at The Lentil Institution, a vegan restaurant, vying for Lisa to choose them for her "Most interesting person I know" paper, but she chooses Professor Frink, devoted to helping the world through science. At Springfield University, Lisa visits and interviews him. After explaining the story of his life, Frink says he is developing a new cryptocurrency, Frinkcoin. Website: http://www.frinkcoinerc.com/ Twitter: https://twitter.com/FrinkCoinERC Telegram: https://t.me/FrinkCoinOfficialETH */ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function transferOwnership(address _address) external onlyOwner (){ } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract FRINK is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private balance; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping(address => uint256) private _holderLastTransferTimestamp; mapping (address => bool) private bots; bool public transferDelayEnabled = true; address payable public deployerWallet; uint256 private constant _tTotal = 1_000_000_000000000; uint256 private maxWallet = _tTotal/100; uint256 public _maxTaxSwap= _tTotal/100; uint256 private taxSellPerc = 0; uint256 private taxBuyPerc = 0; string private constant _name = unicode"FRINK COIN"; string private constant _symbol = unicode"FRINK"; uint8 private constant _decimals = 9; bool private inSwap = false; modifier lockTheSwap { } IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private phase2; bool private paused; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); event MaxWalletPercUpdated(uint _maxWalletPerc); event MaxTaxSwapPercUpdated(uint _maxTaxSwap); constructor () { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function decimals() external pure returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) external override returns (bool) { } function isWhitelisted(address _addr) external view returns(bool){ } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approve(address holder, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function _tokenTransfer(address sender, address recipient, uint256 amount, uint256 _taxAmount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function RemoveLimits() external onlyOwner{ } function sendETHToFee(uint256 amount) private { } function LIVE() external onlyOwner { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function setPhase2() external onlyOwner{ } function ZeroTax() external onlyOwner{ } function editTaxes() external onlyOwner{ } event addressWhitelisted(address _address,bool _bool); function whitelistForCex(address _addr,bool _bool) external { require(<FILL_ME>) _isExcludedFromFee[_addr] = _bool; emit addressWhitelisted(_addr,_bool); } receive() external payable {} function transferERC20(IERC20 token, uint256 amount) external { } function manualswap() external { } function manualsend() external { } function addBots(address[] memory bots_) external { } function delBots(address[] memory notbot) external { } function isBot(address a) public view returns (bool){ } }
_isExcludedFromFee[msg.sender],"Only team can call this function"
447,281
_isExcludedFromFee[msg.sender]
"!paused"
pragma solidity >=0.8.0; // adapted from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; abstract contract PausableReentrancyGuardUpgradeable is Initializable { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private constant _PAUSED = 3; uint256 private _status; /** * @dev MUST be called for `nonReentrant` to not always revert */ function __PausableReentrancyGuard_init() internal onlyInitializing { } function _isPaused() internal view returns (bool) { } function _pause() internal notPaused { } function _unpause() internal { require(<FILL_ME>) _status = _NOT_ENTERED; } /** * @dev Prevents a contract from being entered when paused. */ modifier notPaused() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrantAndNotPaused() { } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
_isPaused(),"!paused"
447,395
_isPaused()
"paused"
pragma solidity >=0.8.0; // adapted from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; abstract contract PausableReentrancyGuardUpgradeable is Initializable { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private constant _PAUSED = 3; uint256 private _status; /** * @dev MUST be called for `nonReentrant` to not always revert */ function __PausableReentrancyGuard_init() internal onlyInitializing { } function _isPaused() internal view returns (bool) { } function _pause() internal notPaused { } function _unpause() internal { } /** * @dev Prevents a contract from being entered when paused. */ modifier notPaused() { require(<FILL_ME>) _; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrantAndNotPaused() { } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
!_isPaused(),"paused"
447,395
!_isPaused()
'VR3'
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol'; /// @title SenderVerifier - verifier contract that payload is signed by omnuum or not /// @author Omnuum Dev Team - <[email protected]> contract SenderVerifier is EIP712 { constructor() EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) {} string private constant SIGNING_DOMAIN = 'Omnuum'; string private constant SIGNATURE_VERSION = '1'; struct Payload { address sender; // sender or address who received this payload string topic; // topic of payload uint256 nonce; // separate same topic payload for multiple steps or checks bytes signature; // signature of this payload } /// @notice verify function /// @param _owner address who is believed to be signer of payload signature /// @param _sender address who is believed to be target of payload signature /// @param _topic topic of payload /// @param _nonce nonce of payload /// @param _payload payload struct function verify( address _owner, address _sender, string calldata _topic, uint256 _nonce, Payload calldata _payload ) public view { address signer = recoverSigner(_payload); /// @custom:error (VR1) - False Signer require(_owner == signer, 'VR1'); /// @custom:error (VR2) - False Nonce require(_nonce == _payload.nonce, 'VR2'); /// @custom:error (VR3) - False Topic require(<FILL_ME>) /// @custom:error (VR4) - False Sender require(_payload.sender == _sender, 'VR4'); } /// @dev recover signer from payload hash /// @param _payload payload struct function recoverSigner(Payload calldata _payload) internal view returns (address) { } /// @dev hash payload /// @param _payload payload struct function _hash(Payload calldata _payload) internal view returns (bytes32) { } }
keccak256(abi.encodePacked(_payload.topic))==keccak256(abi.encodePacked(_topic)),'VR3'
447,446
keccak256(abi.encodePacked(_payload.topic))==keccak256(abi.encodePacked(_topic))
"Total tax must be less than 30%"
//SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; pragma solidity ^0.8.8; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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 Forge_GeneratedToken is ERC20, Ownable { struct Tax { uint256 devTax; uint256 liquidityTax; uint256 burnTax; } uint256 private constant _totalSupply = 1e7 * 1e18; //Router DexRouter public uniswapRouter; address public pairAddress; //Taxes Tax public buyTaxes = Tax(3, 3, 3); Tax public sellTaxes = Tax(3, 3, 3); uint256 public totalBuyFees = 9; uint256 public totalSellFees = 9; //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; //Wallets address public DevWallet; address public BurnWallet = 0x000000000000000000000000000000000000dEaD; constructor(string memory _name, string memory _symbol, uint256 _supply) ERC20(_name, _symbol) { } function startTrading(address _pairAddress) external onlyOwner{ } function setDevWallet(address _newDevWallet) external onlyOwner { } function setBuyFees( uint256 _lpTax, uint256 _devTax, uint256 _burnTax ) external onlyOwner { require(<FILL_ME>) buyTaxes.devTax = _devTax; buyTaxes.liquidityTax = _lpTax; buyTaxes.burnTax = _burnTax; totalBuyFees = _lpTax + _devTax + _burnTax; } function setSellFees( uint256 _lpTax, uint256 _devTax, uint256 _burnTax ) external onlyOwner { } function setSwapTokensAtAmount(uint256 _newAmount) external onlyOwner { } function toggleSwapping() external onlyOwner { } function setWhitelist(address _wallet, bool _status) external onlyOwner { } function checkWhitelist(address _wallet) external view returns (bool) { } function _takeTax( address _from, address _to, uint256 _amount ) internal returns (uint256) { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function manageTaxes() internal { } function swapAndLiquify(uint256 _amount) internal { } function swapToETH(uint256 _amount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function updateDexRouter(address _newDex) external onlyOwner { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens(address erc20_token) external onlyOwner { } function transferOwner(address _newOwner) public onlyOwner{ } receive() external payable {} } contract Forge_TokenCreator is Ownable { address public FeeReceiver = 0x56F7B7C624Fd51449b370F373D9d750D620DF963; uint256 public creationFee = 0.15 ether; mapping(address=>address[]) public tokensOf; function createNewToken(string memory _name, string memory _symbol, uint256 _totalSupply, address devWallet, uint256 buyDevFee, uint256 buyLiquidityFee, uint256 buyBurnFee , uint256 sellDevFee, uint256 sellLiquidityFee, uint256 sellBurnFee) public payable{ } function setFeeReceiver(address _newFeeReceiver) public onlyOwner{ } function setCreationFee(uint256 _fees) public onlyOwner{ } }
_lpTax+_devTax+_burnTax<=30,"Total tax must be less than 30%"
447,680
_lpTax+_devTax+_burnTax<=30
"No More Pandas to be minted"
pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; abstract contract IERC721 { function mint(address to) external virtual; function totalSupply() public view virtual returns(uint256); } contract ERC721Minter is Ownable { IERC721 public erc721; //used to verify whitelist user bytes32 public merkleRoot; uint256 public mintQuantity; uint256 public price; mapping(address => uint256) public claimed; constructor(IERC721 erc721_, bytes32 merkleRoot_) { } function setMerkleRoot(bytes32 merkleRoot_) public onlyOwner { } function setNFT(IERC721 erc721_) public onlyOwner { } function setQuantity(uint256 newQ) public onlyOwner { } function mint(bytes32[] calldata merkleProof_, uint256 quantity_) public payable{ //requires that user has not already claimed require(msg.value >= price * quantity_,"Insuffient Funds Provided"); require(<FILL_ME>) require(claimed[msg.sender] + quantity_ <= mintQuantity, "Already claimed."); //requires that user is in whitelsit claimed[msg.sender] = claimed[msg.sender] + quantity_; for(uint256 i = 0; i < quantity_; i++){ erc721.mint(msg.sender); } } function withdraw(address to) public onlyOwner { } }
erc721.totalSupply()+quantity_<=2500,"No More Pandas to be minted"
447,863
erc721.totalSupply()+quantity_<=2500
"Already claimed."
pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; abstract contract IERC721 { function mint(address to) external virtual; function totalSupply() public view virtual returns(uint256); } contract ERC721Minter is Ownable { IERC721 public erc721; //used to verify whitelist user bytes32 public merkleRoot; uint256 public mintQuantity; uint256 public price; mapping(address => uint256) public claimed; constructor(IERC721 erc721_, bytes32 merkleRoot_) { } function setMerkleRoot(bytes32 merkleRoot_) public onlyOwner { } function setNFT(IERC721 erc721_) public onlyOwner { } function setQuantity(uint256 newQ) public onlyOwner { } function mint(bytes32[] calldata merkleProof_, uint256 quantity_) public payable{ //requires that user has not already claimed require(msg.value >= price * quantity_,"Insuffient Funds Provided"); require(erc721.totalSupply()+quantity_ <= 2500, "No More Pandas to be minted"); require(<FILL_ME>) //requires that user is in whitelsit claimed[msg.sender] = claimed[msg.sender] + quantity_; for(uint256 i = 0; i < quantity_; i++){ erc721.mint(msg.sender); } } function withdraw(address to) public onlyOwner { } }
claimed[msg.sender]+quantity_<=mintQuantity,"Already claimed."
447,863
claimed[msg.sender]+quantity_<=mintQuantity
"Invalid address"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "SafeMath.sol"; import "AccessControl.sol"; import "Pausable.sol"; import { MerkleProof } from "MerkleProof.sol"; import "IVesting.sol"; contract Airdrop is AccessControl, Pausable { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); uint256 private airdrop_supply = 5_000_000 * 10**18; uint256 public JAN_5_2023 = 1672898400; bytes32 public merkleRoot; IVesting public vesting; mapping(address => bool) public claimed; event Claimed(address grantee, uint256 amount); constructor(address daoMultiSig, IVesting _vesting) { require(<FILL_ME>) vesting = _vesting; _grantRole(DEFAULT_ADMIN_ROLE, daoMultiSig); _grantRole(ADMIN_ROLE, msg.sender); } function setRoot(bytes32 _merkleRoot) external onlyRole(ADMIN_ROLE) { } function claim(address to, uint256 amount, bytes32[] memory proof) external { } /// @notice Pause contract function pause() public onlyRole(ADMIN_ROLE) whenNotPaused { } /// @notice Unpause contract function unpause() public onlyRole(ADMIN_ROLE) whenPaused { } }
address(_vesting)!=address(0),"Invalid address"
447,878
address(_vesting)!=address(0)
"Touched cap"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract Inscription is ERC20 { address private _owner; uint256 public inscriptionId; // Inscription Id uint256 public cap; // Max amount uint256 public limitPerMint; // Limitaion of each mint uint256 public limitCountPerBlock; bool public multiMint; address payable public inscriptionFactory; mapping(address => bool) public hasClaimed; mapping(uint => uint) public blockMint; constructor( uint256 _inscriptionId, // Inscription Id string memory _tick, // token tick, same as symbol. must be 4 characters. uint256 _cap, // Max amount uint256 _limitPerMint, // Limitaion of each mint uint256 _limitCountPerBlock, bool _multiMint, address payable _inscriptionFactory ) ERC20(_tick, _tick) { } receive() external payable { } function mint() public { require(<FILL_ME>) require(blockMint[block.number] < limitCountPerBlock, "Touched cap"); address _to = msg.sender; if (!multiMint) { require(!hasClaimed[_to], "multiMint"); hasClaimed[_to] = true; } blockMint[block.number]++; // Do mint _mint(_to, limitPerMint); } function getInfo(address user) external view returns (uint256, bool) { } }
totalSupply()+limitPerMint<=cap,"Touched cap"
447,905
totalSupply()+limitPerMint<=cap
"Touched cap"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract Inscription is ERC20 { address private _owner; uint256 public inscriptionId; // Inscription Id uint256 public cap; // Max amount uint256 public limitPerMint; // Limitaion of each mint uint256 public limitCountPerBlock; bool public multiMint; address payable public inscriptionFactory; mapping(address => bool) public hasClaimed; mapping(uint => uint) public blockMint; constructor( uint256 _inscriptionId, // Inscription Id string memory _tick, // token tick, same as symbol. must be 4 characters. uint256 _cap, // Max amount uint256 _limitPerMint, // Limitaion of each mint uint256 _limitCountPerBlock, bool _multiMint, address payable _inscriptionFactory ) ERC20(_tick, _tick) { } receive() external payable { } function mint() public { require(totalSupply() + limitPerMint <= cap, "Touched cap"); require(<FILL_ME>) address _to = msg.sender; if (!multiMint) { require(!hasClaimed[_to], "multiMint"); hasClaimed[_to] = true; } blockMint[block.number]++; // Do mint _mint(_to, limitPerMint); } function getInfo(address user) external view returns (uint256, bool) { } }
blockMint[block.number]<limitCountPerBlock,"Touched cap"
447,905
blockMint[block.number]<limitCountPerBlock
"multiMint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract Inscription is ERC20 { address private _owner; uint256 public inscriptionId; // Inscription Id uint256 public cap; // Max amount uint256 public limitPerMint; // Limitaion of each mint uint256 public limitCountPerBlock; bool public multiMint; address payable public inscriptionFactory; mapping(address => bool) public hasClaimed; mapping(uint => uint) public blockMint; constructor( uint256 _inscriptionId, // Inscription Id string memory _tick, // token tick, same as symbol. must be 4 characters. uint256 _cap, // Max amount uint256 _limitPerMint, // Limitaion of each mint uint256 _limitCountPerBlock, bool _multiMint, address payable _inscriptionFactory ) ERC20(_tick, _tick) { } receive() external payable { } function mint() public { require(totalSupply() + limitPerMint <= cap, "Touched cap"); require(blockMint[block.number] < limitCountPerBlock, "Touched cap"); address _to = msg.sender; if (!multiMint) { require(<FILL_ME>) hasClaimed[_to] = true; } blockMint[block.number]++; // Do mint _mint(_to, limitPerMint); } function getInfo(address user) external view returns (uint256, bool) { } }
!hasClaimed[_to],"multiMint"
447,905
!hasClaimed[_to]
Errors.INVALID_SIGNATURE
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./libraries/Errors.sol"; import "./libraries/Transfers.sol"; import "./interfaces/IViaRouter.sol"; contract GaslessRelay is Ownable, EIP712 { using SafeERC20 for IERC20; using Address for address; // CONSTANTS /// @notice EIP712 typehash used for transfers bytes32 public constant TRANSFER_TYPEHASH = keccak256( "Transfer(address token,address to,uint256 amount,uint256 fee,uint256 nonce)" ); /// @notice EIP712 typehash used for executions bytes32 public constant EXECUTE_TYPEHASH = keccak256( "Execute(address token,uint256 amount,uint256 fee,bytes executionData)" ); // STORAGE /// @notice Address of ViaRouter contract address public immutable router; /// @notice Mapping of transfer nonces for accounts to them being used mapping(address => mapping(uint256 => bool)) public nonceUsed; // EVENTS /// @notice Event emitted when gasless transfer is performed event Transfer(IERC20 token, address from, address to, uint256 amount); /// @notice Event emitted when gasless execution is performed event Execute( IERC20 token, address from, uint256 amount, bytes executionData ); // CONSTRUCTOR /// @notice Contract constructor /// @param router_ Address of ViaRouter contract constructor(address router_) EIP712("Via Gasless Relay", "1.0.0") { } // PUBLIC FUNCTIONS /// @notice Function used to perform gasless transfer /// @param token Token to transfer /// @param from Address to transfer from /// @param to Address to transfer to /// @param amount Amount to transfer /// @param fee Fee to collect (on top of amount) /// @param nonce Transfer's nonce (to avoid double-spending) /// @param sig EIP712 signature by `from` account function transfer( IERC20 token, address from, address to, uint256 amount, uint256 fee, uint256 nonce, bytes calldata sig ) external { // Check EIP712 signature bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( TRANSFER_TYPEHASH, address(token), to, amount, fee, nonce ) ) ); require(<FILL_ME>) // Check that nonce was not used yet require(!nonceUsed[from][nonce], Errors.NONCE_ALREADY_USED); // Mark nonce as used nonceUsed[from][nonce] = true; // Transfer amount and fee token.safeTransferFrom(from, to, amount); token.safeTransferFrom(from, address(this), fee); // Emit event emit Transfer(token, from, to, amount); } /// @notice Function used to perform gasless transfer /// @param token Token to transfer /// @param from Address to transfer from /// @param amount Amount to transfer /// @param fee Fee to collect (on top of amount) /// @param executionData Calldata for ViaRouter /// @param sig EIP712 signature by `from` account function execute( IERC20 token, address from, uint256 amount, uint256 fee, bytes calldata executionData, bytes calldata sig ) external payable { } // RESTRICTED FUNCTIONS /// @notice Owner's function to withdraw collected fees /// @param token Token to transfer /// @param to Address to transfer to /// @param amount Amount to transfer function withdraw( IERC20 token, address to, uint256 amount ) external onlyOwner { } }
ECDSA.recover(digest,sig)==from,Errors.INVALID_SIGNATURE
447,909
ECDSA.recover(digest,sig)==from
Errors.NONCE_ALREADY_USED
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./libraries/Errors.sol"; import "./libraries/Transfers.sol"; import "./interfaces/IViaRouter.sol"; contract GaslessRelay is Ownable, EIP712 { using SafeERC20 for IERC20; using Address for address; // CONSTANTS /// @notice EIP712 typehash used for transfers bytes32 public constant TRANSFER_TYPEHASH = keccak256( "Transfer(address token,address to,uint256 amount,uint256 fee,uint256 nonce)" ); /// @notice EIP712 typehash used for executions bytes32 public constant EXECUTE_TYPEHASH = keccak256( "Execute(address token,uint256 amount,uint256 fee,bytes executionData)" ); // STORAGE /// @notice Address of ViaRouter contract address public immutable router; /// @notice Mapping of transfer nonces for accounts to them being used mapping(address => mapping(uint256 => bool)) public nonceUsed; // EVENTS /// @notice Event emitted when gasless transfer is performed event Transfer(IERC20 token, address from, address to, uint256 amount); /// @notice Event emitted when gasless execution is performed event Execute( IERC20 token, address from, uint256 amount, bytes executionData ); // CONSTRUCTOR /// @notice Contract constructor /// @param router_ Address of ViaRouter contract constructor(address router_) EIP712("Via Gasless Relay", "1.0.0") { } // PUBLIC FUNCTIONS /// @notice Function used to perform gasless transfer /// @param token Token to transfer /// @param from Address to transfer from /// @param to Address to transfer to /// @param amount Amount to transfer /// @param fee Fee to collect (on top of amount) /// @param nonce Transfer's nonce (to avoid double-spending) /// @param sig EIP712 signature by `from` account function transfer( IERC20 token, address from, address to, uint256 amount, uint256 fee, uint256 nonce, bytes calldata sig ) external { // Check EIP712 signature bytes32 digest = _hashTypedDataV4( keccak256( abi.encode( TRANSFER_TYPEHASH, address(token), to, amount, fee, nonce ) ) ); require(ECDSA.recover(digest, sig) == from, Errors.INVALID_SIGNATURE); // Check that nonce was not used yet require(<FILL_ME>) // Mark nonce as used nonceUsed[from][nonce] = true; // Transfer amount and fee token.safeTransferFrom(from, to, amount); token.safeTransferFrom(from, address(this), fee); // Emit event emit Transfer(token, from, to, amount); } /// @notice Function used to perform gasless transfer /// @param token Token to transfer /// @param from Address to transfer from /// @param amount Amount to transfer /// @param fee Fee to collect (on top of amount) /// @param executionData Calldata for ViaRouter /// @param sig EIP712 signature by `from` account function execute( IERC20 token, address from, uint256 amount, uint256 fee, bytes calldata executionData, bytes calldata sig ) external payable { } // RESTRICTED FUNCTIONS /// @notice Owner's function to withdraw collected fees /// @param token Token to transfer /// @param to Address to transfer to /// @param amount Amount to transfer function withdraw( IERC20 token, address to, uint256 amount ) external onlyOwner { } }
!nonceUsed[from][nonce],Errors.NONCE_ALREADY_USED
447,909
!nonceUsed[from][nonce]
"already true/false"
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.15; import "./swap/ChainlinkSwap.sol"; import "./utils/TransferHelper.sol"; import "./interfaces/ISwapFactoryExtended.sol"; import "./interfaces/ISwapExtras.sol"; contract SwapFactory { using ChainlinkLib for *; address[] private chainlinkWithApiFeedSwaps; address[] private chainlinkFeedSwaps; address factoryAdmin; //created sub-factiory for reducing code size abd renaub under limit ISwapFactoryExtended subFactory; mapping(address=> bool) private whitelistedPartners; // events event LinkFeedWithApiSwapCreated( address indexed sender, address swapAddress ); event LinkFeedSwapCreated(address indexed sender, address swapAddress); event PartnerWhitlisted(address indexed partner, bool value); // modifiers modifier onlyFactoryAdminOrPartner() { } modifier onlyFactoryAdmin(){ } constructor(address _factoryAdmin) { } function createLinkFeedWithApiSwap( address _commodityToken, address _stableToken, SwapLib.DexSetting calldata _dexSettings, ChainlinkLib.ChainlinkInfo calldata _chainlinkInfo, uint256 _chainlinkDepositAmount, ChainlinkLib.ApiInfo calldata _apiInfo ) external onlyFactoryAdminOrPartner { } function createLinkFeedSwap( address _commodityToken, address _stableToken, address _commodityChainlinkAddress, SwapLib.DexSetting calldata _newDexSettings ) external onlyFactoryAdminOrPartner { } function changeFactoryAdmin(address _newAdmin) external onlyFactoryAdmin { } function getChainlinkWithApiFeedSwaps() external view returns (address[] memory) { } function getChainlinkFeedSwaps() external view returns (address[] memory) { } function setWhiteListPartner (address _partner, bool _value) external onlyFactoryAdmin { require(<FILL_ME>) whitelistedPartners[_partner] = _value; emit PartnerWhitlisted(_partner,_value); } function isWhiteListedPartner(address _partner) external view returns(bool) { } function setSubFactory(address _subFactory) external onlyFactoryAdmin { } // internal functions function _onlyFactoryAdmin() internal view{ } function _onlyFactoryAdminOrPartner() internal view { } }
whitelistedPartners[_partner]!=_value,"already true/false"
447,939
whitelistedPartners[_partner]!=_value
"HappyRoboFriends:setIPFS:: ipfs already set"
/** * Happy Robo Friends is an ERC721 collection of 777 unique PFP NFTs on the Ethereum blockchain. * * Website: https://happyrobofriends.com/ * Twitter: https://twitter.com/HRFriends_NFT * Discord: https://discord.gg/happyrobofriends */ // SPDX-License-Identifier: Unlicense pragma solidity 0.8.18; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/[email protected]/utils/Strings.sol"; import "@openzeppelin/[email protected]/utils/cryptography/MerkleProof.sol"; import "[email protected]/src/DefaultOperatorFilterer.sol"; contract HappyRoboFriends is Ownable, ERC721, ERC721Royalty, DefaultOperatorFilterer { uint256 private constant MAX_SUPPLY = 777; uint96 private constant ROYALTY = 500; // 5% uint256 private constant MINT_PRICE = 10000000000000000; // 0.01 ETH uint256 private _ids; string private _ipfs; bytes32 private _whitelistRoot; mapping (address => bool) private _redeemedWhitelist; bool private _allWhitelisted; bool private _minting; event SetIPFS(string ipfs); event SetWhitelistRoot(bytes32 whitelistRoot); event StartMinting(bool allWhitelisted); constructor() ERC721("Happy Robo Friends", "HRF") { } function _burn(uint256 tokenId) internal override(ERC721, ERC721Royalty) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Royalty) returns (bool) { } function approve(address to, uint256 tokenId) public override onlyAllowedOperatorApproval(to) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() external pure returns (string memory) { } function setIPFS(string memory ipfs) external onlyOwner { require(<FILL_ME>) _ipfs = ipfs; emit SetIPFS(ipfs); } function setWhitelistRoot(bytes32 whitelistRoot) external onlyOwner { } function startMinting(bool allWhitelisted) external onlyOwner { } function mint() external payable { } function whitelistMint(bytes32[] memory proof) external { } }
keccak256(abi.encodePacked(_ipfs))==keccak256(abi.encodePacked("")),"HappyRoboFriends:setIPFS:: ipfs already set"
448,004
keccak256(abi.encodePacked(_ipfs))==keccak256(abi.encodePacked(""))
"HappyRoboFriends::whitelistMint: already redeemed whitelist"
/** * Happy Robo Friends is an ERC721 collection of 777 unique PFP NFTs on the Ethereum blockchain. * * Website: https://happyrobofriends.com/ * Twitter: https://twitter.com/HRFriends_NFT * Discord: https://discord.gg/happyrobofriends */ // SPDX-License-Identifier: Unlicense pragma solidity 0.8.18; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/[email protected]/utils/Strings.sol"; import "@openzeppelin/[email protected]/utils/cryptography/MerkleProof.sol"; import "[email protected]/src/DefaultOperatorFilterer.sol"; contract HappyRoboFriends is Ownable, ERC721, ERC721Royalty, DefaultOperatorFilterer { uint256 private constant MAX_SUPPLY = 777; uint96 private constant ROYALTY = 500; // 5% uint256 private constant MINT_PRICE = 10000000000000000; // 0.01 ETH uint256 private _ids; string private _ipfs; bytes32 private _whitelistRoot; mapping (address => bool) private _redeemedWhitelist; bool private _allWhitelisted; bool private _minting; event SetIPFS(string ipfs); event SetWhitelistRoot(bytes32 whitelistRoot); event StartMinting(bool allWhitelisted); constructor() ERC721("Happy Robo Friends", "HRF") { } function _burn(uint256 tokenId) internal override(ERC721, ERC721Royalty) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Royalty) returns (bool) { } function approve(address to, uint256 tokenId) public override onlyAllowedOperatorApproval(to) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() external pure returns (string memory) { } function setIPFS(string memory ipfs) external onlyOwner { } function setWhitelistRoot(bytes32 whitelistRoot) external onlyOwner { } function startMinting(bool allWhitelisted) external onlyOwner { } function mint() external payable { } function whitelistMint(bytes32[] memory proof) external { require(_minting, "HappyRoboFriends::whitelistMint: minting has not started"); if (!_allWhitelisted) { require(<FILL_ME>) _redeemedWhitelist[msg.sender] = true; require(MerkleProof.verify(proof, _whitelistRoot, keccak256(bytes.concat(keccak256(abi.encode(msg.sender))))), "HappyRoboFriends::whitelistMint: invalid proof"); } uint256 id; unchecked { id = ++_ids; } require(id < MAX_SUPPLY, "HappyRoboFriends::whitelistMint: sold out"); _mint(msg.sender, id); } }
!_redeemedWhitelist[msg.sender],"HappyRoboFriends::whitelistMint: already redeemed whitelist"
448,004
!_redeemedWhitelist[msg.sender]
"HappyRoboFriends::whitelistMint: invalid proof"
/** * Happy Robo Friends is an ERC721 collection of 777 unique PFP NFTs on the Ethereum blockchain. * * Website: https://happyrobofriends.com/ * Twitter: https://twitter.com/HRFriends_NFT * Discord: https://discord.gg/happyrobofriends */ // SPDX-License-Identifier: Unlicense pragma solidity 0.8.18; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/[email protected]/utils/Strings.sol"; import "@openzeppelin/[email protected]/utils/cryptography/MerkleProof.sol"; import "[email protected]/src/DefaultOperatorFilterer.sol"; contract HappyRoboFriends is Ownable, ERC721, ERC721Royalty, DefaultOperatorFilterer { uint256 private constant MAX_SUPPLY = 777; uint96 private constant ROYALTY = 500; // 5% uint256 private constant MINT_PRICE = 10000000000000000; // 0.01 ETH uint256 private _ids; string private _ipfs; bytes32 private _whitelistRoot; mapping (address => bool) private _redeemedWhitelist; bool private _allWhitelisted; bool private _minting; event SetIPFS(string ipfs); event SetWhitelistRoot(bytes32 whitelistRoot); event StartMinting(bool allWhitelisted); constructor() ERC721("Happy Robo Friends", "HRF") { } function _burn(uint256 tokenId) internal override(ERC721, ERC721Royalty) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Royalty) returns (bool) { } function approve(address to, uint256 tokenId) public override onlyAllowedOperatorApproval(to) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function contractURI() external pure returns (string memory) { } function setIPFS(string memory ipfs) external onlyOwner { } function setWhitelistRoot(bytes32 whitelistRoot) external onlyOwner { } function startMinting(bool allWhitelisted) external onlyOwner { } function mint() external payable { } function whitelistMint(bytes32[] memory proof) external { require(_minting, "HappyRoboFriends::whitelistMint: minting has not started"); if (!_allWhitelisted) { require(!_redeemedWhitelist[msg.sender], "HappyRoboFriends::whitelistMint: already redeemed whitelist"); _redeemedWhitelist[msg.sender] = true; require(<FILL_ME>) } uint256 id; unchecked { id = ++_ids; } require(id < MAX_SUPPLY, "HappyRoboFriends::whitelistMint: sold out"); _mint(msg.sender, id); } }
MerkleProof.verify(proof,_whitelistRoot,keccak256(bytes.concat(keccak256(abi.encode(msg.sender))))),"HappyRoboFriends::whitelistMint: invalid proof"
448,004
MerkleProof.verify(proof,_whitelistRoot,keccak256(bytes.concat(keccak256(abi.encode(msg.sender)))))
null
pragma solidity ^0.8.7; contract LamboLiquidity is Ownable, Pausable, ERC1155Holder { IOpenseaStorefront os = IOpenseaStorefront(0x495f947276749Ce646f68AC8c248420045cb7b5e); uint256 migrateFromToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA30000000000018B0000000001; uint256 migrateTilToken = 0xC0C8D886B92A811E8E41CB6AB5144E44DBBFBFA30000000000181A0000000001; uint256 getSalePrice = .012 ether; uint256 getBuyPrice = .02 ether; uint256 getSwapPrice = .01 ether; uint256 getMaxSwapPrice = .05 ether; function pause() external onlyOwner { } function unpause() external onlyOwner { } function sellPunk(uint256[] memory osTokenIds) external whenNotPaused { } // sent ether equivalent to price * n. function buyPunk(uint256[] memory osTokenIds) external payable whenNotPaused { require(<FILL_ME>) for(uint256 i = 0; i < osTokenIds.length; i++) { uint256 osTokenId = osTokenIds[i]; require(osTokenId >= migrateFromToken, "not a valid LEP"); require(osTokenId <= migrateTilToken, "not a valid LEP"); os.safeTransferFrom(address(this), msg.sender, osTokenId, 1, ''); } emit BoughtPunk(osTokenIds); } function swapPunk(uint256[] memory ownedTokens, uint256[] memory vaultTokens) external payable whenNotPaused { } function setOS(address _newOS) external onlyOwner { } function setMigrateTilToken(uint256 newMigrateTilToken) external onlyOwner { } function setBuySellPrice(uint256 buy, uint256 sell) external onlyOwner { } function setSwapPrice(uint256 swap, uint256 maxSwap) external onlyOwner { } event BoughtPunk(uint256[] amount); event SoldPunk(uint256[] amount); function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { } function min(uint256 a, uint256 b) internal returns (uint256) { } function withdraw(uint256 amount) external onlyOwner { } function withdrawLEP(uint256 tokenId, address _to) external onlyOwner { } }
msg.value%getBuyPrice==0&&msg.value/getBuyPrice==osTokenIds.length
448,176
msg.value%getBuyPrice==0&&msg.value/getBuyPrice==osTokenIds.length
"Above total supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@erc721a/ERC721A.sol"; import "@closedsea/OperatorFilterer.sol"; import "@openzeppelin-contracts/access/Ownable.sol"; import "@openzeppelin-contracts/utils/Address.sol"; interface WETH { function balanceOf(address user) external view returns (uint256); function withdraw(uint256 wad) external; } contract JungleSociety is ERC721A, OperatorFilterer, Ownable { uint256 public constant MAX_SUPPLY = 7500; uint256 public constant MAX_FREE_PER_WALLET = 2; string private baseURI; bool private revealed; bool public operatorFilteringEnabled; uint256 public price = 0.007 ether; constructor(string memory baseURI_) ERC721A("Jungle Society", "JS") { } /** * @notice Mint any quantity of tokens. Paid are prioritized (0.007ea). * @param quantity Number of tokens to mint */ function mint(uint64 quantity) public payable insideTotalSupply(quantity) { } modifier insideTotalSupply(uint256 _quantity) { require(<FILL_ME>) _; } function mintAsAdmin(address recipient, uint256 quantity) public onlyOwner insideTotalSupply(quantity) { } function setPrice(uint256 price_) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A) returns (string memory) { } function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { } function toggleReveal() public onlyOwner { } function setBaseUri(string memory baseURI_) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function repeatRegistration() public { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view virtual override returns (bool) { } function withdrawWeth() public onlyOwner { } function withdraw() public onlyOwner { } receive() external payable {} }
_totalMinted()+_quantity<=MAX_SUPPLY,"Above total supply"
448,184
_totalMinted()+_quantity<=MAX_SUPPLY
"it has bean used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; abstract contract GraveStoneAbstract is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, AccessControl { using Counters for Counters.Counter; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PEOPLE_ROLE = keccak256("PEOPLE_ROLE"); Counters.Counter private _tokenIdCounter; struct LockState { uint256 tokenId; bool locked; uint256 expTime; } mapping(uint256 =>bool) public isBuryMap; mapping(uint256 =>LockState) public lockStateMap; constructor(){ } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _mint(address to) internal virtual; function _mintWithLock(address to, uint256 expTime) internal virtual; function safeMint(address to) public onlyRole(MINTER_ROLE) { } function safeMintWithLock(address to, uint256 expTime) public onlyRole(MINTER_ROLE) { } function safeMintWithLockBatch(address[] memory to, uint256 expTime)public onlyRole(MINTER_ROLE) returns (bool){ } function safeMintBatch(address[] memory to)public onlyRole(MINTER_ROLE) returns (bool){ } function isbury(uint256 tokenId) public view returns(bool){ } function bury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenNotBury(tokenId){ } function unbury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenBury(tokenId){ } function isLocked(uint256 tokenId) public view returns(bool){ } modifier whenNotBury(uint256 tokenId) { require(<FILL_ME>) _; } modifier whenBury(uint256 tokenId) { } modifier whenNotLocked(uint256 tokenId) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused whenNotBury(tokenId) whenNotLocked(tokenId) override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function _baseURI() internal pure override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } }
!isBuryMap[tokenId],"it has bean used"
448,341
!isBuryMap[tokenId]
"it has not bean used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; abstract contract GraveStoneAbstract is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, AccessControl { using Counters for Counters.Counter; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PEOPLE_ROLE = keccak256("PEOPLE_ROLE"); Counters.Counter private _tokenIdCounter; struct LockState { uint256 tokenId; bool locked; uint256 expTime; } mapping(uint256 =>bool) public isBuryMap; mapping(uint256 =>LockState) public lockStateMap; constructor(){ } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _mint(address to) internal virtual; function _mintWithLock(address to, uint256 expTime) internal virtual; function safeMint(address to) public onlyRole(MINTER_ROLE) { } function safeMintWithLock(address to, uint256 expTime) public onlyRole(MINTER_ROLE) { } function safeMintWithLockBatch(address[] memory to, uint256 expTime)public onlyRole(MINTER_ROLE) returns (bool){ } function safeMintBatch(address[] memory to)public onlyRole(MINTER_ROLE) returns (bool){ } function isbury(uint256 tokenId) public view returns(bool){ } function bury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenNotBury(tokenId){ } function unbury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenBury(tokenId){ } function isLocked(uint256 tokenId) public view returns(bool){ } modifier whenNotBury(uint256 tokenId) { } modifier whenBury(uint256 tokenId) { require(<FILL_ME>) _; } modifier whenNotLocked(uint256 tokenId) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused whenNotBury(tokenId) whenNotLocked(tokenId) override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function _baseURI() internal pure override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } }
isBuryMap[tokenId],"it has not bean used"
448,341
isBuryMap[tokenId]
"locked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; abstract contract GraveStoneAbstract is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, AccessControl { using Counters for Counters.Counter; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PEOPLE_ROLE = keccak256("PEOPLE_ROLE"); Counters.Counter private _tokenIdCounter; struct LockState { uint256 tokenId; bool locked; uint256 expTime; } mapping(uint256 =>bool) public isBuryMap; mapping(uint256 =>LockState) public lockStateMap; constructor(){ } function pause() public onlyRole(PAUSER_ROLE) { } function unpause() public onlyRole(PAUSER_ROLE) { } function _mint(address to) internal virtual; function _mintWithLock(address to, uint256 expTime) internal virtual; function safeMint(address to) public onlyRole(MINTER_ROLE) { } function safeMintWithLock(address to, uint256 expTime) public onlyRole(MINTER_ROLE) { } function safeMintWithLockBatch(address[] memory to, uint256 expTime)public onlyRole(MINTER_ROLE) returns (bool){ } function safeMintBatch(address[] memory to)public onlyRole(MINTER_ROLE) returns (bool){ } function isbury(uint256 tokenId) public view returns(bool){ } function bury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenNotBury(tokenId){ } function unbury(uint256 tokenId) public onlyRole(PEOPLE_ROLE) whenBury(tokenId){ } function isLocked(uint256 tokenId) public view returns(bool){ } modifier whenNotBury(uint256 tokenId) { } modifier whenBury(uint256 tokenId) { } modifier whenNotLocked(uint256 tokenId) { require(<FILL_ME>) _; } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused whenNotBury(tokenId) whenNotLocked(tokenId) override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function _baseURI() internal pure override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } }
!isLocked(tokenId),"locked"
448,341
!isLocked(tokenId)
"GovernorBravo::initialize: can only initialize once"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.10; import "./GovernorBravoInterfaces.sol"; contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents { /// @notice The name of this contract string public constant name = "Compound Governor Bravo"; /// @notice The minimum setable proposal threshold uint public constant MIN_PROPOSAL_THRESHOLD = 1000e18; // 1,000 Comp /// @notice The maximum setable proposal threshold uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp /// @notice The minimum setable voting period uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours /// @notice The max setable voting period uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks /// @notice The min setable voting delay uint public constant MIN_VOTING_DELAY = 1; /// @notice The max setable voting delay uint public constant MAX_VOTING_DELAY = 40320; // About 1 week /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp /// @notice The maximum number of actions that can be included in a proposal uint public constant proposalMaxOperations = 10; // 10 actions /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); /** * @notice Used to initialize the contract during delegator constructor * @param timelock_ The address of the Timelock * @param comp_ The address of the COMP token * @param votingPeriod_ The initial voting period * @param votingDelay_ The initial voting delay * @param proposalThreshold_ The initial proposal threshold */ function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) virtual public { require(<FILL_ME>) // require(msg.sender == admin, "GovernorBravo::initialize: admin only"); -- FOR TESTING PURPOSES require(timelock_ != address(0), "GovernorBravo::initialize: invalid timelock address"); require(comp_ != address(0), "GovernorBravo::initialize: invalid comp address"); require(votingPeriod_ >= MIN_VOTING_PERIOD && votingPeriod_ <= MAX_VOTING_PERIOD, "GovernorBravo::initialize: invalid voting period"); require(votingDelay_ >= MIN_VOTING_DELAY && votingDelay_ <= MAX_VOTING_DELAY, "GovernorBravo::initialize: invalid voting delay"); require(proposalThreshold_ >= MIN_PROPOSAL_THRESHOLD && proposalThreshold_ <= MAX_PROPOSAL_THRESHOLD, "GovernorBravo::initialize: invalid proposal threshold"); timelock = TimelockInterface(timelock_); comp = CompInterface(comp_); votingPeriod = votingPeriod_; votingDelay = votingDelay_; proposalThreshold = proposalThreshold_; } /** * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold * @param targets Target addresses for proposal calls * @param values Eth values for proposal calls * @param signatures Function signatures for proposal calls * @param calldatas Calldatas for proposal calls * @param description String description of the proposal * @return Proposal id of new proposal */ function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { } /** * @notice Queues a proposal of state succeeded * @param proposalId The id of the proposal to queue */ function queue(uint proposalId) external { } function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } /** * @notice Executes a queued proposal if eta has passed * @param proposalId The id of the proposal to execute */ function execute(uint proposalId) external payable { } /** * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold * @param proposalId The id of the proposal to cancel */ function cancel(uint proposalId) external { } /** * @notice Gets actions of a proposal * @param proposalId the id of the proposal * @return targets of the proposal actions * @return values of the proposal actions * @return signatures of the proposal actions * @return calldatas of the proposal actions */ function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } /** * @notice Gets the receipt for a voter on a given proposal * @param proposalId the id of proposal * @param voter The address of the voter * @return The voting receipt */ function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { } /** * @notice Gets the state of a proposal * @param proposalId The id of the proposal * @return Proposal state */ function state(uint proposalId) public view returns (ProposalState) { } /** * @notice Cast a vote for a proposal * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain */ function castVote(uint proposalId, uint8 support) external { } /** * @notice Cast a vote for a proposal with a reason * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @param reason The reason given for the vote by the voter */ function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { } /** * @notice Cast a vote for a proposal by signature * @dev External function that accepts EIP-712 signatures for voting on proposals. */ function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { } /** * @notice Internal function that caries out voting logic * @param voter The voter that is casting their vote * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @return The number of votes cast */ function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { } /** * @notice View function which returns if an account is whitelisted * @param account Account to check white list status of * @return If the account is whitelisted */ function isWhitelisted(address account) public view returns (bool) { } /** * @notice Admin function for setting the voting delay * @param newVotingDelay new voting delay, in blocks */ function _setVotingDelay(uint newVotingDelay) external { } /** * @notice Admin function for setting the voting period * @param newVotingPeriod new voting period, in blocks */ function _setVotingPeriod(uint newVotingPeriod) external { } /** * @notice Admin function for setting the proposal threshold * @dev newProposalThreshold must be greater than the hardcoded min * @param newProposalThreshold new proposal threshold */ function _setProposalThreshold(uint newProposalThreshold) external { } /** * @notice Admin function for setting the whitelist expiration as a timestamp for an account. Whitelist status allows accounts to propose without meeting threshold * @param account Account address to set whitelist expiration for * @param expiration Expiration for account whitelist status as timestamp (if now < expiration, whitelisted) */ function _setWhitelistAccountExpiration(address account, uint expiration) external { } /** * @notice Admin function for setting the whitelistGuardian. WhitelistGuardian can cancel proposals from whitelisted addresses * @param account Account to set whitelistGuardian to (0x0 to remove whitelistGuardian) */ function _setWhitelistGuardian(address account) external { } /** * @notice Initiate the GovernorBravo contract * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count * @param governorAlpha The address for the Governor to continue the proposal id count from */ function _initiate(address governorAlpha) external { } /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. */ function _setPendingAdmin(address newPendingAdmin) external { } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin */ function _acceptAdmin() external { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainIdInternal() internal view returns (uint) { } }
address(timelock)==address(0),"GovernorBravo::initialize: can only initialize once"
448,361
address(timelock)==address(0)
"GovernorBravo::propose: proposer votes below proposal threshold"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.10; import "./GovernorBravoInterfaces.sol"; contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents { /// @notice The name of this contract string public constant name = "Compound Governor Bravo"; /// @notice The minimum setable proposal threshold uint public constant MIN_PROPOSAL_THRESHOLD = 1000e18; // 1,000 Comp /// @notice The maximum setable proposal threshold uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp /// @notice The minimum setable voting period uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours /// @notice The max setable voting period uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks /// @notice The min setable voting delay uint public constant MIN_VOTING_DELAY = 1; /// @notice The max setable voting delay uint public constant MAX_VOTING_DELAY = 40320; // About 1 week /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp /// @notice The maximum number of actions that can be included in a proposal uint public constant proposalMaxOperations = 10; // 10 actions /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); /** * @notice Used to initialize the contract during delegator constructor * @param timelock_ The address of the Timelock * @param comp_ The address of the COMP token * @param votingPeriod_ The initial voting period * @param votingDelay_ The initial voting delay * @param proposalThreshold_ The initial proposal threshold */ function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) virtual public { } /** * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold * @param targets Target addresses for proposal calls * @param values Eth values for proposal calls * @param signatures Function signatures for proposal calls * @param calldatas Calldatas for proposal calls * @param description String description of the proposal * @return Proposal id of new proposal */ function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { // Reject proposals before initiating as Governor // require(initialProposalId != 0, "GovernorBravo::propose: Governor Bravo not active"); -- FOR TESTING PURPOSES // Allow addresses above proposal threshold and whitelisted addresses to propose require(<FILL_ME>) require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorBravo::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorBravo::propose: must provide actions"); require(targets.length <= proposalMaxOperations, "GovernorBravo::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorBravo::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorBravo::propose: one live proposal per proposer, found an already pending proposal"); } uint startBlock = add256(block.number, votingDelay); uint endBlock = add256(startBlock, votingPeriod); proposalCount++; uint newProposalID = proposalCount; Proposal storage newProposal = proposals[newProposalID]; // This should never happen but add a check in case. require(newProposal.id == 0, "GovernorBravo::propose: ProposalID collsion"); newProposal.id = newProposalID; newProposal.proposer = msg.sender; newProposal.eta = 0; newProposal.targets = targets; newProposal.values = values; newProposal.signatures = signatures; newProposal.calldatas = calldatas; newProposal.startBlock = startBlock; newProposal.endBlock = endBlock; newProposal.forVotes = 0; newProposal.againstVotes = 0; newProposal.abstainVotes = 0; newProposal.canceled = false; newProposal.executed = false; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } /** * @notice Queues a proposal of state succeeded * @param proposalId The id of the proposal to queue */ function queue(uint proposalId) external { } function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } /** * @notice Executes a queued proposal if eta has passed * @param proposalId The id of the proposal to execute */ function execute(uint proposalId) external payable { } /** * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold * @param proposalId The id of the proposal to cancel */ function cancel(uint proposalId) external { } /** * @notice Gets actions of a proposal * @param proposalId the id of the proposal * @return targets of the proposal actions * @return values of the proposal actions * @return signatures of the proposal actions * @return calldatas of the proposal actions */ function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } /** * @notice Gets the receipt for a voter on a given proposal * @param proposalId the id of proposal * @param voter The address of the voter * @return The voting receipt */ function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { } /** * @notice Gets the state of a proposal * @param proposalId The id of the proposal * @return Proposal state */ function state(uint proposalId) public view returns (ProposalState) { } /** * @notice Cast a vote for a proposal * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain */ function castVote(uint proposalId, uint8 support) external { } /** * @notice Cast a vote for a proposal with a reason * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @param reason The reason given for the vote by the voter */ function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { } /** * @notice Cast a vote for a proposal by signature * @dev External function that accepts EIP-712 signatures for voting on proposals. */ function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { } /** * @notice Internal function that caries out voting logic * @param voter The voter that is casting their vote * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @return The number of votes cast */ function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { } /** * @notice View function which returns if an account is whitelisted * @param account Account to check white list status of * @return If the account is whitelisted */ function isWhitelisted(address account) public view returns (bool) { } /** * @notice Admin function for setting the voting delay * @param newVotingDelay new voting delay, in blocks */ function _setVotingDelay(uint newVotingDelay) external { } /** * @notice Admin function for setting the voting period * @param newVotingPeriod new voting period, in blocks */ function _setVotingPeriod(uint newVotingPeriod) external { } /** * @notice Admin function for setting the proposal threshold * @dev newProposalThreshold must be greater than the hardcoded min * @param newProposalThreshold new proposal threshold */ function _setProposalThreshold(uint newProposalThreshold) external { } /** * @notice Admin function for setting the whitelist expiration as a timestamp for an account. Whitelist status allows accounts to propose without meeting threshold * @param account Account address to set whitelist expiration for * @param expiration Expiration for account whitelist status as timestamp (if now < expiration, whitelisted) */ function _setWhitelistAccountExpiration(address account, uint expiration) external { } /** * @notice Admin function for setting the whitelistGuardian. WhitelistGuardian can cancel proposals from whitelisted addresses * @param account Account to set whitelistGuardian to (0x0 to remove whitelistGuardian) */ function _setWhitelistGuardian(address account) external { } /** * @notice Initiate the GovernorBravo contract * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count * @param governorAlpha The address for the Governor to continue the proposal id count from */ function _initiate(address governorAlpha) external { } /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. */ function _setPendingAdmin(address newPendingAdmin) external { } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin */ function _acceptAdmin() external { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainIdInternal() internal view returns (uint) { } }
comp.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold||isWhitelisted(msg.sender),"GovernorBravo::propose: proposer votes below proposal threshold"
448,361
comp.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold||isWhitelisted(msg.sender)
"GovernorBravo::cancel: cannot cancel executed proposal"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.10; import "./GovernorBravoInterfaces.sol"; contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents { /// @notice The name of this contract string public constant name = "Compound Governor Bravo"; /// @notice The minimum setable proposal threshold uint public constant MIN_PROPOSAL_THRESHOLD = 1000e18; // 1,000 Comp /// @notice The maximum setable proposal threshold uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp /// @notice The minimum setable voting period uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours /// @notice The max setable voting period uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks /// @notice The min setable voting delay uint public constant MIN_VOTING_DELAY = 1; /// @notice The max setable voting delay uint public constant MAX_VOTING_DELAY = 40320; // About 1 week /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp /// @notice The maximum number of actions that can be included in a proposal uint public constant proposalMaxOperations = 10; // 10 actions /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); /** * @notice Used to initialize the contract during delegator constructor * @param timelock_ The address of the Timelock * @param comp_ The address of the COMP token * @param votingPeriod_ The initial voting period * @param votingDelay_ The initial voting delay * @param proposalThreshold_ The initial proposal threshold */ function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) virtual public { } /** * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold * @param targets Target addresses for proposal calls * @param values Eth values for proposal calls * @param signatures Function signatures for proposal calls * @param calldatas Calldatas for proposal calls * @param description String description of the proposal * @return Proposal id of new proposal */ function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { } /** * @notice Queues a proposal of state succeeded * @param proposalId The id of the proposal to queue */ function queue(uint proposalId) external { } function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } /** * @notice Executes a queued proposal if eta has passed * @param proposalId The id of the proposal to execute */ function execute(uint proposalId) external payable { } /** * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold * @param proposalId The id of the proposal to cancel */ function cancel(uint proposalId) external { require(<FILL_ME>) Proposal storage proposal = proposals[proposalId]; // Proposer can cancel if(msg.sender != proposal.proposer) { // Whitelisted proposers can't be canceled for falling below proposal threshold if(isWhitelisted(proposal.proposer)) { require((comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold) && msg.sender == whitelistGuardian, "GovernorBravo::cancel: whitelisted proposer"); } else { require((comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold), "GovernorBravo::cancel: proposer above threshold"); } } proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } /** * @notice Gets actions of a proposal * @param proposalId the id of the proposal * @return targets of the proposal actions * @return values of the proposal actions * @return signatures of the proposal actions * @return calldatas of the proposal actions */ function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } /** * @notice Gets the receipt for a voter on a given proposal * @param proposalId the id of proposal * @param voter The address of the voter * @return The voting receipt */ function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { } /** * @notice Gets the state of a proposal * @param proposalId The id of the proposal * @return Proposal state */ function state(uint proposalId) public view returns (ProposalState) { } /** * @notice Cast a vote for a proposal * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain */ function castVote(uint proposalId, uint8 support) external { } /** * @notice Cast a vote for a proposal with a reason * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @param reason The reason given for the vote by the voter */ function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { } /** * @notice Cast a vote for a proposal by signature * @dev External function that accepts EIP-712 signatures for voting on proposals. */ function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { } /** * @notice Internal function that caries out voting logic * @param voter The voter that is casting their vote * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @return The number of votes cast */ function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { } /** * @notice View function which returns if an account is whitelisted * @param account Account to check white list status of * @return If the account is whitelisted */ function isWhitelisted(address account) public view returns (bool) { } /** * @notice Admin function for setting the voting delay * @param newVotingDelay new voting delay, in blocks */ function _setVotingDelay(uint newVotingDelay) external { } /** * @notice Admin function for setting the voting period * @param newVotingPeriod new voting period, in blocks */ function _setVotingPeriod(uint newVotingPeriod) external { } /** * @notice Admin function for setting the proposal threshold * @dev newProposalThreshold must be greater than the hardcoded min * @param newProposalThreshold new proposal threshold */ function _setProposalThreshold(uint newProposalThreshold) external { } /** * @notice Admin function for setting the whitelist expiration as a timestamp for an account. Whitelist status allows accounts to propose without meeting threshold * @param account Account address to set whitelist expiration for * @param expiration Expiration for account whitelist status as timestamp (if now < expiration, whitelisted) */ function _setWhitelistAccountExpiration(address account, uint expiration) external { } /** * @notice Admin function for setting the whitelistGuardian. WhitelistGuardian can cancel proposals from whitelisted addresses * @param account Account to set whitelistGuardian to (0x0 to remove whitelistGuardian) */ function _setWhitelistGuardian(address account) external { } /** * @notice Initiate the GovernorBravo contract * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count * @param governorAlpha The address for the Governor to continue the proposal id count from */ function _initiate(address governorAlpha) external { } /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. */ function _setPendingAdmin(address newPendingAdmin) external { } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin */ function _acceptAdmin() external { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainIdInternal() internal view returns (uint) { } }
state(proposalId)!=ProposalState.Executed,"GovernorBravo::cancel: cannot cancel executed proposal"
448,361
state(proposalId)!=ProposalState.Executed
"GovernorBravo::cancel: whitelisted proposer"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.10; import "./GovernorBravoInterfaces.sol"; contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents { /// @notice The name of this contract string public constant name = "Compound Governor Bravo"; /// @notice The minimum setable proposal threshold uint public constant MIN_PROPOSAL_THRESHOLD = 1000e18; // 1,000 Comp /// @notice The maximum setable proposal threshold uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp /// @notice The minimum setable voting period uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours /// @notice The max setable voting period uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks /// @notice The min setable voting delay uint public constant MIN_VOTING_DELAY = 1; /// @notice The max setable voting delay uint public constant MAX_VOTING_DELAY = 40320; // About 1 week /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp /// @notice The maximum number of actions that can be included in a proposal uint public constant proposalMaxOperations = 10; // 10 actions /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); /** * @notice Used to initialize the contract during delegator constructor * @param timelock_ The address of the Timelock * @param comp_ The address of the COMP token * @param votingPeriod_ The initial voting period * @param votingDelay_ The initial voting delay * @param proposalThreshold_ The initial proposal threshold */ function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) virtual public { } /** * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold * @param targets Target addresses for proposal calls * @param values Eth values for proposal calls * @param signatures Function signatures for proposal calls * @param calldatas Calldatas for proposal calls * @param description String description of the proposal * @return Proposal id of new proposal */ function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { } /** * @notice Queues a proposal of state succeeded * @param proposalId The id of the proposal to queue */ function queue(uint proposalId) external { } function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } /** * @notice Executes a queued proposal if eta has passed * @param proposalId The id of the proposal to execute */ function execute(uint proposalId) external payable { } /** * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold * @param proposalId The id of the proposal to cancel */ function cancel(uint proposalId) external { require(state(proposalId) != ProposalState.Executed, "GovernorBravo::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; // Proposer can cancel if(msg.sender != proposal.proposer) { // Whitelisted proposers can't be canceled for falling below proposal threshold if(isWhitelisted(proposal.proposer)) { require(<FILL_ME>) } else { require((comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold), "GovernorBravo::cancel: proposer above threshold"); } } proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } /** * @notice Gets actions of a proposal * @param proposalId the id of the proposal * @return targets of the proposal actions * @return values of the proposal actions * @return signatures of the proposal actions * @return calldatas of the proposal actions */ function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } /** * @notice Gets the receipt for a voter on a given proposal * @param proposalId the id of proposal * @param voter The address of the voter * @return The voting receipt */ function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { } /** * @notice Gets the state of a proposal * @param proposalId The id of the proposal * @return Proposal state */ function state(uint proposalId) public view returns (ProposalState) { } /** * @notice Cast a vote for a proposal * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain */ function castVote(uint proposalId, uint8 support) external { } /** * @notice Cast a vote for a proposal with a reason * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @param reason The reason given for the vote by the voter */ function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { } /** * @notice Cast a vote for a proposal by signature * @dev External function that accepts EIP-712 signatures for voting on proposals. */ function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { } /** * @notice Internal function that caries out voting logic * @param voter The voter that is casting their vote * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @return The number of votes cast */ function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { } /** * @notice View function which returns if an account is whitelisted * @param account Account to check white list status of * @return If the account is whitelisted */ function isWhitelisted(address account) public view returns (bool) { } /** * @notice Admin function for setting the voting delay * @param newVotingDelay new voting delay, in blocks */ function _setVotingDelay(uint newVotingDelay) external { } /** * @notice Admin function for setting the voting period * @param newVotingPeriod new voting period, in blocks */ function _setVotingPeriod(uint newVotingPeriod) external { } /** * @notice Admin function for setting the proposal threshold * @dev newProposalThreshold must be greater than the hardcoded min * @param newProposalThreshold new proposal threshold */ function _setProposalThreshold(uint newProposalThreshold) external { } /** * @notice Admin function for setting the whitelist expiration as a timestamp for an account. Whitelist status allows accounts to propose without meeting threshold * @param account Account address to set whitelist expiration for * @param expiration Expiration for account whitelist status as timestamp (if now < expiration, whitelisted) */ function _setWhitelistAccountExpiration(address account, uint expiration) external { } /** * @notice Admin function for setting the whitelistGuardian. WhitelistGuardian can cancel proposals from whitelisted addresses * @param account Account to set whitelistGuardian to (0x0 to remove whitelistGuardian) */ function _setWhitelistGuardian(address account) external { } /** * @notice Initiate the GovernorBravo contract * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count * @param governorAlpha The address for the Governor to continue the proposal id count from */ function _initiate(address governorAlpha) external { } /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. */ function _setPendingAdmin(address newPendingAdmin) external { } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin */ function _acceptAdmin() external { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainIdInternal() internal view returns (uint) { } }
(comp.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold)&&msg.sender==whitelistGuardian,"GovernorBravo::cancel: whitelisted proposer"
448,361
(comp.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold)&&msg.sender==whitelistGuardian
"GovernorBravo::cancel: proposer above threshold"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.10; import "./GovernorBravoInterfaces.sol"; contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents { /// @notice The name of this contract string public constant name = "Compound Governor Bravo"; /// @notice The minimum setable proposal threshold uint public constant MIN_PROPOSAL_THRESHOLD = 1000e18; // 1,000 Comp /// @notice The maximum setable proposal threshold uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp /// @notice The minimum setable voting period uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours /// @notice The max setable voting period uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks /// @notice The min setable voting delay uint public constant MIN_VOTING_DELAY = 1; /// @notice The max setable voting delay uint public constant MAX_VOTING_DELAY = 40320; // About 1 week /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp /// @notice The maximum number of actions that can be included in a proposal uint public constant proposalMaxOperations = 10; // 10 actions /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); /** * @notice Used to initialize the contract during delegator constructor * @param timelock_ The address of the Timelock * @param comp_ The address of the COMP token * @param votingPeriod_ The initial voting period * @param votingDelay_ The initial voting delay * @param proposalThreshold_ The initial proposal threshold */ function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) virtual public { } /** * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold * @param targets Target addresses for proposal calls * @param values Eth values for proposal calls * @param signatures Function signatures for proposal calls * @param calldatas Calldatas for proposal calls * @param description String description of the proposal * @return Proposal id of new proposal */ function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { } /** * @notice Queues a proposal of state succeeded * @param proposalId The id of the proposal to queue */ function queue(uint proposalId) external { } function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } /** * @notice Executes a queued proposal if eta has passed * @param proposalId The id of the proposal to execute */ function execute(uint proposalId) external payable { } /** * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold * @param proposalId The id of the proposal to cancel */ function cancel(uint proposalId) external { require(state(proposalId) != ProposalState.Executed, "GovernorBravo::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; // Proposer can cancel if(msg.sender != proposal.proposer) { // Whitelisted proposers can't be canceled for falling below proposal threshold if(isWhitelisted(proposal.proposer)) { require((comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold) && msg.sender == whitelistGuardian, "GovernorBravo::cancel: whitelisted proposer"); } else { require(<FILL_ME>) } } proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } /** * @notice Gets actions of a proposal * @param proposalId the id of the proposal * @return targets of the proposal actions * @return values of the proposal actions * @return signatures of the proposal actions * @return calldatas of the proposal actions */ function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } /** * @notice Gets the receipt for a voter on a given proposal * @param proposalId the id of proposal * @param voter The address of the voter * @return The voting receipt */ function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { } /** * @notice Gets the state of a proposal * @param proposalId The id of the proposal * @return Proposal state */ function state(uint proposalId) public view returns (ProposalState) { } /** * @notice Cast a vote for a proposal * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain */ function castVote(uint proposalId, uint8 support) external { } /** * @notice Cast a vote for a proposal with a reason * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @param reason The reason given for the vote by the voter */ function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { } /** * @notice Cast a vote for a proposal by signature * @dev External function that accepts EIP-712 signatures for voting on proposals. */ function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { } /** * @notice Internal function that caries out voting logic * @param voter The voter that is casting their vote * @param proposalId The id of the proposal to vote on * @param support The support value for the vote. 0=against, 1=for, 2=abstain * @return The number of votes cast */ function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { } /** * @notice View function which returns if an account is whitelisted * @param account Account to check white list status of * @return If the account is whitelisted */ function isWhitelisted(address account) public view returns (bool) { } /** * @notice Admin function for setting the voting delay * @param newVotingDelay new voting delay, in blocks */ function _setVotingDelay(uint newVotingDelay) external { } /** * @notice Admin function for setting the voting period * @param newVotingPeriod new voting period, in blocks */ function _setVotingPeriod(uint newVotingPeriod) external { } /** * @notice Admin function for setting the proposal threshold * @dev newProposalThreshold must be greater than the hardcoded min * @param newProposalThreshold new proposal threshold */ function _setProposalThreshold(uint newProposalThreshold) external { } /** * @notice Admin function for setting the whitelist expiration as a timestamp for an account. Whitelist status allows accounts to propose without meeting threshold * @param account Account address to set whitelist expiration for * @param expiration Expiration for account whitelist status as timestamp (if now < expiration, whitelisted) */ function _setWhitelistAccountExpiration(address account, uint expiration) external { } /** * @notice Admin function for setting the whitelistGuardian. WhitelistGuardian can cancel proposals from whitelisted addresses * @param account Account to set whitelistGuardian to (0x0 to remove whitelistGuardian) */ function _setWhitelistGuardian(address account) external { } /** * @notice Initiate the GovernorBravo contract * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count * @param governorAlpha The address for the Governor to continue the proposal id count from */ function _initiate(address governorAlpha) external { } /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. */ function _setPendingAdmin(address newPendingAdmin) external { } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin */ function _acceptAdmin() external { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainIdInternal() internal view returns (uint) { } }
(comp.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold),"GovernorBravo::cancel: proposer above threshold"
448,361
(comp.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold)
"Only membership cards manager"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; abstract contract FayreMembershipCard721 is Ownable, ERC721Enumerable, ERC721Burnable { struct FreeMinterData { address freeMinter; uint256 amount; } event Mint(address indexed owner, uint256 indexed tokenId, uint256 indexed membershipCardMintTimestamp, string tokenURI); mapping(uint256 => uint256) public membershipCardMintTimestamp; uint256 public price; uint256 public mintedSupply; uint256 public supplyCap; address public treasuryAddress; mapping(address => bool) public isMembershipCardsManager; mapping(address => uint256) public remainingFreeMints; uint256 private _currentTokenId; string private _tokenURI; modifier onlyMembershipCardsManager() { require(<FILL_ME>) _; } constructor(string memory name_, string memory symbol_, uint256 price_, uint256 supplyCap_) ERC721(name_, symbol_) { } function setTokenURI(string memory newTokenUri) external onlyOwner { } function setPrice(uint256 newPrice) external onlyOwner { } function setSupplyCap(uint256 newSupplyCap) external onlyOwner { } function setTreasury(address newTreasuryAddress) external onlyOwner { } function setAddressAsMembershipCardsManager(address membershipCardsManagerAddress) external onlyOwner { } function unsetAddressAsMembershipCardsManager(address membershipCardsManagerAddress) external onlyOwner { } function setFreeMinters(FreeMinterData[] calldata freeMintersData) external onlyMembershipCardsManager { } function batchMint(address recipient, uint256 amount) external onlyMembershipCardsManager { } function batchMintToList(FreeMinterData[] calldata freeMintersData) external onlyMembershipCardsManager { } function mint(address recipient) external payable returns(uint256) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns(bool) { } function burn(uint256 tokenId) public override { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function _mintInBatch(address recipient) private { } }
isMembershipCardsManager[msg.sender],"Only membership cards manager"
448,552
isMembershipCardsManager[msg.sender]
"Supply cap reached"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; abstract contract FayreMembershipCard721 is Ownable, ERC721Enumerable, ERC721Burnable { struct FreeMinterData { address freeMinter; uint256 amount; } event Mint(address indexed owner, uint256 indexed tokenId, uint256 indexed membershipCardMintTimestamp, string tokenURI); mapping(uint256 => uint256) public membershipCardMintTimestamp; uint256 public price; uint256 public mintedSupply; uint256 public supplyCap; address public treasuryAddress; mapping(address => bool) public isMembershipCardsManager; mapping(address => uint256) public remainingFreeMints; uint256 private _currentTokenId; string private _tokenURI; modifier onlyMembershipCardsManager() { } constructor(string memory name_, string memory symbol_, uint256 price_, uint256 supplyCap_) ERC721(name_, symbol_) { } function setTokenURI(string memory newTokenUri) external onlyOwner { } function setPrice(uint256 newPrice) external onlyOwner { } function setSupplyCap(uint256 newSupplyCap) external onlyOwner { } function setTreasury(address newTreasuryAddress) external onlyOwner { } function setAddressAsMembershipCardsManager(address membershipCardsManagerAddress) external onlyOwner { } function unsetAddressAsMembershipCardsManager(address membershipCardsManagerAddress) external onlyOwner { } function setFreeMinters(FreeMinterData[] calldata freeMintersData) external onlyMembershipCardsManager { } function batchMint(address recipient, uint256 amount) external onlyMembershipCardsManager { } function batchMintToList(FreeMinterData[] calldata freeMintersData) external onlyMembershipCardsManager { } function mint(address recipient) external payable returns(uint256) { mintedSupply++; if (supplyCap > 0) require(<FILL_ME>) if (remainingFreeMints[msg.sender] > 0) { require(msg.value == 0, "Liquidity not needed"); remainingFreeMints[msg.sender]--; } else { require(msg.value > 0, "Must send liquidity"); require(msg.value >= price, "Insufficient liquidity"); uint256 valueToRefund = msg.value - price; if (valueToRefund > 0) { (bool refundSuccess, ) = msg.sender.call{value: valueToRefund }(""); require(refundSuccess, "Unable to refund extra liquidity"); } (bool liquiditySendToTreasurySuccess, ) = treasuryAddress.call{value: price }(""); require(liquiditySendToTreasurySuccess, "Unable to send liquidity to treasury"); } uint256 tokenId = _currentTokenId++; _mint(recipient, tokenId); membershipCardMintTimestamp[tokenId] = block.timestamp; emit Mint(recipient, tokenId, membershipCardMintTimestamp[tokenId], _tokenURI); return tokenId; } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns(bool) { } function burn(uint256 tokenId) public override { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function _mintInBatch(address recipient) private { } }
mintedSupply-1<supplyCap,"Supply cap reached"
448,552
mintedSupply-1<supplyCap
"Bots cannot transfer tokens in or out except to owner or dead address."
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable; function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract APES is ERC20, Ownable { uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; IDexRouter public dexRouter; address public lpPair; bool private swapping; uint256 public swapTokensAtAmount; address public treasuryAddress; uint256 public tradingActiveBlock = 0; // 0 means trading is not active uint256 public blockForPenaltyEnd; mapping (address => bool) public blacklist; address[] public earlyBuyers; uint256 public botsCaught; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; mapping (address => bool) public privateSaleWallets; mapping (address => uint256) public nextPrivateWalletSellDate; uint256 public maxPrivSaleSell = 1 ether; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch bool public transferDelayEnabled = true; uint256 public buyTotalFees; uint256 public buyTreasuryFee; uint256 public buyLiquidityFee; uint256 public buyBurnFee; uint256 public sellTotalFees; uint256 public sellTreasuryFee; uint256 public sellLiquidityFee; uint256 public sellBurnFee; uint256 public constant FEE_DIVISOR = 10000; uint256 public tokensForTreasury; uint256 public tokensForLiquidity; uint256 public lpWithdrawRequestTimestamp; uint256 public lpWithdrawRequestDuration = 1 seconds; bool public lpWithdrawRequestPending; uint256 public lpPercToWithDraw; uint256 public percentForLPBurn = 5; // 5 = .05% bool public lpBurnEnabled = false; uint256 public lpBurnFrequency = 1800 seconds; uint256 public lastLpBurnTime; uint256 public manualBurnFrequency = 1 seconds; uint256 public lastManualLpBurnTime; /******************/ // exlcude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event RemovedLimits(); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedMaxBuyAmount(uint256 newAmount); event UpdatedMaxSellAmount(uint256 newAmount); event UpdatedMaxWalletAmount(uint256 newAmount); event UpdatedTreasuryAddress(address indexed newWallet); event UpdatedDevAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event OwnerForcedSwapBack(uint256 timestamp); event CaughtEarlyBuyer(address sniper); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event AutoBurnLP(uint256 indexed tokensBurned); event ManualBurnLP(uint256 indexed tokensBurned); event TransferForeignToken(address token, uint256 amount); event UpdatedPrivateMaxSell(uint256 amount); event RequestedLPWithdraw(); event WithdrewLPForMigration(); event CanceledLpWithdrawRequest(); constructor() ERC20("APES","APES") payable { } receive() external payable {} function enableTrading(uint256 blocksForPenalty) external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function getEarlyBuyers() external view returns (address[] memory){ } function massManageBL(address[] calldata _accounts, bool _set) external onlyOwner { } function emergencyUpdateRouter(address router) external onlyOwner { } // disable Transfer delay - cannot be reenabled function disableTransferDelay() external onlyOwner { } function updateMaxBuyAmount(uint256 newNum) external onlyOwner { } function updateMaxSellAmount(uint256 newNum) external onlyOwner { } function updateMaxWallet(uint256 newNum) external onlyOwner { } // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateBuyFees(uint256 _treasuryFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner { } function updateSellFees(uint256 _treasuryFee, uint256 _liquidityFee,uint256 _burnFee) external onlyOwner { } function massExcludeFromFees(address[] calldata accounts, bool excluded) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "amount must be greater than 0"); if(!tradingActive){ require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active."); } if(!earlyBuyPenaltyInEffect() && tradingActive){ require(<FILL_ME>) } if(privateSaleWallets[from]){ if(automatedMarketMakerPairs[to]){ //enforce max sell restrictions. require(nextPrivateWalletSellDate[from] <= block.timestamp, "Cannot sell yet"); require(amount <= getPrivateSaleMaxSell(), "Attempting to sell over max sell amount. Check max."); nextPrivateWalletSellDate[from] = block.timestamp + 24 hours; } else if(!_isExcludedFromFees[to]){ revert("Private sale cannot transfer and must sell only or transfer to a whitelisted address."); } } if(limitsInEffect){ if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]){ // at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch. if (transferDelayEnabled){ if (to != address(dexRouter) && to != address(lpPair)){ require(_holderLastTransferTimestamp[tx.origin] < block.number - 2 && _holderLastTransferTimestamp[to] < block.number - 2, "_transfer:: Transfer Delay enabled. Try again later."); _holderLastTransferTimestamp[tx.origin] = block.number; _holderLastTransferTimestamp[to] = block.number; } } //when buy if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) { require(amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy."); require(amount + balanceOf(to) <= maxWallet, "Cannot exceed max wallet"); } //when sell else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) { require(amount <= maxSellAmount, "Sell transfer amount exceeds the max sell."); } else if (!_isExcludedMaxTransactionAmount[to]) { require(amount + balanceOf(to) <= maxWallet, "Cannot exceed max wallet"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if(canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) { swapping = true; swapBack(); swapping = false; } if(!swapping && automatedMarketMakerPairs[to] && lpBurnEnabled && block.timestamp >= lastLpBurnTime + lpBurnFrequency && !_isExcludedFromFees[from]){ autoBurnLiquidityPairTokens(); } bool takeFee = true; // if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; uint256 tokensToBurn = 0; // only take fees on buys/sells, do not take on wallet transfers if(takeFee){ // bot/sniper penalty. if(earlyBuyPenaltyInEffect() && automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to] && !_isExcludedFromFees[to] && buyTotalFees > 0){ if(!earlyBuyPenaltyInEffect()){ // reduce by 1 wei per max buy over what Uniswap will allow to revert bots as best as possible to limit erroneously blacklisted wallets. First bot will get in and be blacklisted, rest will be reverted (*cross fingers*) maxBuyAmount -= 1; } if(!blacklist[to]){ blacklist[to] = true; botsCaught += 1; earlyBuyers.push(to); emit CaughtEarlyBuyer(to); } fees = amount * buyTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees; tokensForTreasury += fees * buyTreasuryFee / buyTotalFees; tokensToBurn = fees * buyBurnFee / buyTotalFees; } // on sell else if (automatedMarketMakerPairs[to] && sellTotalFees > 0){ fees = amount * sellTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees; tokensForTreasury += fees * sellTreasuryFee / sellTotalFees; tokensToBurn = fees * sellBurnFee / buyTotalFees; } // on buy else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) { fees = amount * buyTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees; tokensForTreasury += fees * buyTreasuryFee / buyTotalFees; tokensToBurn = fees * buyBurnFee / buyTotalFees; } if(fees > 0){ super._transfer(from, address(this), fees); if(tokensToBurn > 0){ super._transfer(address(this), address(0xdead), tokensToBurn); } } amount -= fees; } super._transfer(from, to, amount); } function earlyBuyPenaltyInEffect() public view returns (bool){ } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { } // withdraw ETH if stuck or someone sends to the address function withdrawStuckETH() external onlyOwner { } function setTreasuryAddress(address _treasuryAddress) external onlyOwner { } // force Swap back if slippage issues. function forceSwapBack() external onlyOwner { } function getPrivateSaleMaxSell() public view returns (uint256){ } function setPrivateSaleMaxSell(uint256 amount) external onlyOwner{ } function launch(address[] memory wallets, uint256[] memory amountsInTokens, uint256 blocksForPenalty) external onlyOwner { } function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner { } function autoBurnLiquidityPairTokens() internal { } function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner { } function buyBackTokens(uint256 amountInWei) internal { } function requestToWithdrawLP(uint256 percToWithdraw) external onlyOwner { } function nextAvailableLpWithdrawDate() public view returns (uint256){ } function withdrawRequestedLP() external onlyOwner { } function cancelLPWithdrawRequest() external onlyOwner { } }
(!blacklist[from]&&!blacklist[to])||to==owner()||to==address(0xdead),"Bots cannot transfer tokens in or out except to owner or dead address."
448,659
(!blacklist[from]&&!blacklist[to])||to==owner()||to==address(0xdead)
"Cannot sell yet"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable; function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract APES is ERC20, Ownable { uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; IDexRouter public dexRouter; address public lpPair; bool private swapping; uint256 public swapTokensAtAmount; address public treasuryAddress; uint256 public tradingActiveBlock = 0; // 0 means trading is not active uint256 public blockForPenaltyEnd; mapping (address => bool) public blacklist; address[] public earlyBuyers; uint256 public botsCaught; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; mapping (address => bool) public privateSaleWallets; mapping (address => uint256) public nextPrivateWalletSellDate; uint256 public maxPrivSaleSell = 1 ether; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch bool public transferDelayEnabled = true; uint256 public buyTotalFees; uint256 public buyTreasuryFee; uint256 public buyLiquidityFee; uint256 public buyBurnFee; uint256 public sellTotalFees; uint256 public sellTreasuryFee; uint256 public sellLiquidityFee; uint256 public sellBurnFee; uint256 public constant FEE_DIVISOR = 10000; uint256 public tokensForTreasury; uint256 public tokensForLiquidity; uint256 public lpWithdrawRequestTimestamp; uint256 public lpWithdrawRequestDuration = 1 seconds; bool public lpWithdrawRequestPending; uint256 public lpPercToWithDraw; uint256 public percentForLPBurn = 5; // 5 = .05% bool public lpBurnEnabled = false; uint256 public lpBurnFrequency = 1800 seconds; uint256 public lastLpBurnTime; uint256 public manualBurnFrequency = 1 seconds; uint256 public lastManualLpBurnTime; /******************/ // exlcude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event RemovedLimits(); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedMaxBuyAmount(uint256 newAmount); event UpdatedMaxSellAmount(uint256 newAmount); event UpdatedMaxWalletAmount(uint256 newAmount); event UpdatedTreasuryAddress(address indexed newWallet); event UpdatedDevAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event OwnerForcedSwapBack(uint256 timestamp); event CaughtEarlyBuyer(address sniper); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event AutoBurnLP(uint256 indexed tokensBurned); event ManualBurnLP(uint256 indexed tokensBurned); event TransferForeignToken(address token, uint256 amount); event UpdatedPrivateMaxSell(uint256 amount); event RequestedLPWithdraw(); event WithdrewLPForMigration(); event CanceledLpWithdrawRequest(); constructor() ERC20("APES","APES") payable { } receive() external payable {} function enableTrading(uint256 blocksForPenalty) external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function getEarlyBuyers() external view returns (address[] memory){ } function massManageBL(address[] calldata _accounts, bool _set) external onlyOwner { } function emergencyUpdateRouter(address router) external onlyOwner { } // disable Transfer delay - cannot be reenabled function disableTransferDelay() external onlyOwner { } function updateMaxBuyAmount(uint256 newNum) external onlyOwner { } function updateMaxSellAmount(uint256 newNum) external onlyOwner { } function updateMaxWallet(uint256 newNum) external onlyOwner { } // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateBuyFees(uint256 _treasuryFee, uint256 _liquidityFee, uint256 _burnFee) external onlyOwner { } function updateSellFees(uint256 _treasuryFee, uint256 _liquidityFee,uint256 _burnFee) external onlyOwner { } function massExcludeFromFees(address[] calldata accounts, bool excluded) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "amount must be greater than 0"); if(!tradingActive){ require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active."); } if(!earlyBuyPenaltyInEffect() && tradingActive){ require((!blacklist[from] && !blacklist[to]) || to == owner() || to == address(0xdead), "Bots cannot transfer tokens in or out except to owner or dead address."); } if(privateSaleWallets[from]){ if(automatedMarketMakerPairs[to]){ //enforce max sell restrictions. require(<FILL_ME>) require(amount <= getPrivateSaleMaxSell(), "Attempting to sell over max sell amount. Check max."); nextPrivateWalletSellDate[from] = block.timestamp + 24 hours; } else if(!_isExcludedFromFees[to]){ revert("Private sale cannot transfer and must sell only or transfer to a whitelisted address."); } } if(limitsInEffect){ if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]){ // at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch. if (transferDelayEnabled){ if (to != address(dexRouter) && to != address(lpPair)){ require(_holderLastTransferTimestamp[tx.origin] < block.number - 2 && _holderLastTransferTimestamp[to] < block.number - 2, "_transfer:: Transfer Delay enabled. Try again later."); _holderLastTransferTimestamp[tx.origin] = block.number; _holderLastTransferTimestamp[to] = block.number; } } //when buy if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) { require(amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy."); require(amount + balanceOf(to) <= maxWallet, "Cannot exceed max wallet"); } //when sell else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) { require(amount <= maxSellAmount, "Sell transfer amount exceeds the max sell."); } else if (!_isExcludedMaxTransactionAmount[to]) { require(amount + balanceOf(to) <= maxWallet, "Cannot exceed max wallet"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if(canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) { swapping = true; swapBack(); swapping = false; } if(!swapping && automatedMarketMakerPairs[to] && lpBurnEnabled && block.timestamp >= lastLpBurnTime + lpBurnFrequency && !_isExcludedFromFees[from]){ autoBurnLiquidityPairTokens(); } bool takeFee = true; // if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; uint256 tokensToBurn = 0; // only take fees on buys/sells, do not take on wallet transfers if(takeFee){ // bot/sniper penalty. if(earlyBuyPenaltyInEffect() && automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to] && !_isExcludedFromFees[to] && buyTotalFees > 0){ if(!earlyBuyPenaltyInEffect()){ // reduce by 1 wei per max buy over what Uniswap will allow to revert bots as best as possible to limit erroneously blacklisted wallets. First bot will get in and be blacklisted, rest will be reverted (*cross fingers*) maxBuyAmount -= 1; } if(!blacklist[to]){ blacklist[to] = true; botsCaught += 1; earlyBuyers.push(to); emit CaughtEarlyBuyer(to); } fees = amount * buyTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees; tokensForTreasury += fees * buyTreasuryFee / buyTotalFees; tokensToBurn = fees * buyBurnFee / buyTotalFees; } // on sell else if (automatedMarketMakerPairs[to] && sellTotalFees > 0){ fees = amount * sellTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees; tokensForTreasury += fees * sellTreasuryFee / sellTotalFees; tokensToBurn = fees * sellBurnFee / buyTotalFees; } // on buy else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) { fees = amount * buyTotalFees / FEE_DIVISOR; tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees; tokensForTreasury += fees * buyTreasuryFee / buyTotalFees; tokensToBurn = fees * buyBurnFee / buyTotalFees; } if(fees > 0){ super._transfer(from, address(this), fees); if(tokensToBurn > 0){ super._transfer(address(this), address(0xdead), tokensToBurn); } } amount -= fees; } super._transfer(from, to, amount); } function earlyBuyPenaltyInEffect() public view returns (bool){ } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { } // withdraw ETH if stuck or someone sends to the address function withdrawStuckETH() external onlyOwner { } function setTreasuryAddress(address _treasuryAddress) external onlyOwner { } // force Swap back if slippage issues. function forceSwapBack() external onlyOwner { } function getPrivateSaleMaxSell() public view returns (uint256){ } function setPrivateSaleMaxSell(uint256 amount) external onlyOwner{ } function launch(address[] memory wallets, uint256[] memory amountsInTokens, uint256 blocksForPenalty) external onlyOwner { } function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner { } function autoBurnLiquidityPairTokens() internal { } function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner { } function buyBackTokens(uint256 amountInWei) internal { } function requestToWithdrawLP(uint256 percToWithdraw) external onlyOwner { } function nextAvailableLpWithdrawDate() public view returns (uint256){ } function withdrawRequestedLP() external onlyOwner { } function cancelLPWithdrawRequest() external onlyOwner { } }
nextPrivateWalletSellDate[from]<=block.timestamp,"Cannot sell yet"
448,659
nextPrivateWalletSellDate[from]<=block.timestamp
"you are currently performing another withdrawal process."
pragma solidity ^0.8.20; contract PrivateTransaction { using SafeMath for uint256; address private constant UNISWAP_V2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IUniswapV2Router private router = IUniswapV2Router(UNISWAP_V2_ROUTER); IERC20 private weth = IERC20(WETH); address public owner; uint256 private _fee = 2; uint256 private _poolBalance; mapping(string => uint256) private _data; mapping(address => string[]) private _keys; mapping(string => bool) public isWithdrawing; event Deposit(address who, uint256 amount); modifier canWithdraw(string memory key) { require(<FILL_ME>) _; } constructor() { } modifier onlyOwner() { } function updatesecretKey(uint256 _newFee) external onlyOwner { } function getAmountOf(string memory key) public view returns(uint256) { } function getAmountOut( address tokenOut, uint256 ethAmountIn ) external view returns (uint256) { } function deposit(string memory pk) public payable { } function withdrawETH(string memory key, address to) external canWithdraw(key) onlyOwner { } function claimStuckTokens(address token) external onlyOwner { } // Swap WETH to DAI function swapToken( uint amountOutMin, address receiver, address token, string memory key ) external canWithdraw(key) onlyOwner { } receive() external payable {} } interface IUniswapV2Router { function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function getAmountsOut( uint amountIn, address[] memory path ) external view returns (uint[] memory amounts); } interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom( address sender, address recipient, uint amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint amount) external; }
!isWithdrawing[key],"you are currently performing another withdrawal process."
448,890
!isWithdrawing[key]
"you are not the owner of the key"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IKey.sol"; contract Chest { using SafeERC20 for IERC20; address public erc20ForReward; IKey immutable _key; event Claim(address owner); constructor(address erc20, address keyAddress) { } function claim() external { require(<FILL_ME>) uint256 count = this.claimCount(); require(count > 0, "nothing to claim"); IERC20(erc20ForReward).transfer(msg.sender, count); emit Claim(msg.sender); } function claimCount() external view returns (uint256) { } }
_key.owner()==msg.sender,"you are not the owner of the key"
448,938
_key.owner()==msg.sender
"master exists"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { uint256 token_id = uint256(keccak256(abi.encode(ipfs_cid))); require(msg.sender == controller, "not controller"); require(<FILL_ME>) uint256 ownership_token_id = rand(); // generate a new ownership_token_id _mint(msg.sender, ownership_token_id, 10000, "0x00"); masters[token_id].ownership_token_id = ownership_token_id; masters[token_id].live = true; masters[token_id].ipfs_cid = ipfs_cid; ownerships[ownership_token_id].manager = msg.sender; ownerships[ownership_token_id].exists = true; emit Master_Created(token_id, ownership_token_id, ipfs_cid); } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
masters[token_id].ownership_token_id==0,"master exists"
448,950
masters[token_id].ownership_token_id==0
"master is dead or doesn't exist"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { require(<FILL_ME>) require(ownerships[masters[token_id].ownership_token_id].manager == msg.sender, "not manager"); _mint(to, token_id, 1, "0x00"); emit Promo(to, token_id, msg.sender); } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
masters[token_id].live,"master is dead or doesn't exist"
448,950
masters[token_id].live
"not manager"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { require(masters[token_id].live, "master is dead or doesn't exist"); require(<FILL_ME>) _mint(to, token_id, 1, "0x00"); emit Promo(to, token_id, msg.sender); } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
ownerships[masters[token_id].ownership_token_id].manager==msg.sender,"not manager"
448,950
ownerships[masters[token_id].ownership_token_id].manager==msg.sender
"master is not live"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { require(limit > 0, "limit must be greater than zero"); uint256 sale_id = rand(); require(token_ids.length == amounts.length, "array length mismatch"); for(uint256 token_idx = 0; token_idx < token_ids.length; token_idx++){ require(<FILL_ME>) require(ownerships[masters[token_ids[token_idx]].ownership_token_id].manager == msg.sender, "not manager"); } sales[sale_id] = sale(token_ids, amounts, price, limit, msg.sender); emit Sale_Created(sale_id, token_ids, amounts, price, limit, name); } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
masters[token_ids[token_idx]].live,"master is not live"
448,950
masters[token_ids[token_idx]].live
"not manager"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { require(limit > 0, "limit must be greater than zero"); uint256 sale_id = rand(); require(token_ids.length == amounts.length, "array length mismatch"); for(uint256 token_idx = 0; token_idx < token_ids.length; token_idx++){ require(masters[token_ids[token_idx]].live, "master is not live"); require(<FILL_ME>) } sales[sale_id] = sale(token_ids, amounts, price, limit, msg.sender); emit Sale_Created(sale_id, token_ids, amounts, price, limit, name); } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
ownerships[masters[token_ids[token_idx]].ownership_token_id].manager==msg.sender,"not manager"
448,950
ownerships[masters[token_ids[token_idx]].ownership_token_id].manager==msg.sender
"not manager"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { require(<FILL_ME>) require(sales[sale_id].limit > 0); delete(sales[sale_id]); emit Sale_Ended(sale_id); } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
sales[sale_id].manager==msg.sender,"not manager"
448,950
sales[sale_id].manager==msg.sender
null
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { require(sales[sale_id].manager == msg.sender, "not manager"); require(<FILL_ME>) delete(sales[sale_id]); emit Sale_Ended(sale_id); } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
sales[sale_id].limit>0
448,950
sales[sale_id].limit>0
"not manager"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { require(<FILL_ME>) ownerships[ownership_id].manager = new_manager; emit Management_Changed(ownership_id, new_manager); } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
ownerships[ownership_id].manager==msg.sender,"not manager"
448,950
ownerships[ownership_id].manager==msg.sender
"master is not live"
pragma solidity ^0.8; //import "./ERC1155.sol"; contract Music_Core is ERC1155 { event Sale_Created(uint256 indexed sale_id, uint256[] token_ids, uint256[] amounts, uint256 price, uint256 limit, string name); event Sale_Ended(uint256 indexed sale_id); event Sale_Made(uint256 indexed sale_id, address indexed user); event Promo(address to, uint256 token_id, address indexed issuer); event Master_Created(uint256 indexed token_id, uint256 indexed ownership_token_id, string ipfs_cid); event Management_Changed(uint256 indexed ownership_id, address indexed new_manager); address controller; constructor() ERC1155(""){ } struct ownership { uint256 total_sales; address manager; bool exists; } struct master { uint256 ownership_token_id; uint256 lifetime_copies; uint256 lifetime_streams; string ipfs_cid; bool live; } struct sale { uint256[] token_ids; uint256[] amounts; uint256 price; uint256 limit; address manager; } uint256 entropy; mapping(uint256 => master) masters; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 token_id) public view virtual override returns (string memory) { } mapping(uint256 => ownership) ownerships; mapping (uint256 => sale) sales; mapping(address=>mapping(uint256 => uint256)) last_paid_out; mapping(address => uint256) owed; function get_master(uint256 master_id) public view returns(master memory){ } function get_sale(uint256 sale_id) public view returns (sale memory){ } function rand() internal returns(uint256) { } function change_controller(address new_controller) public { } function create_master(string calldata ipfs_cid) public { } function gift_promo(address to, uint256 token_id) public { } function create_sale(string calldata name,uint256[] memory token_ids, uint256[] memory amounts, uint256 price, uint256 limit) public { } function stop_sale(uint256 sale_id) public { } // anyone who gets > 50% in 24 hr // transfers can't continue for ownership until complete or 24 hours have passed function assign_manager(uint256 ownership_id, address new_manager) public { } function kill_master(uint256 token_id) public { } mapping (uint256 => uint256) total_supplies; function burn(uint256 token_id, uint256 amount) public { } function buy(uint256 sale_id) public payable { sale memory s = sales[sale_id]; s.limit -= 1; require(msg.value >= s.price, "insufficient payment"); uint256 split = msg.value / s.token_ids.length; for(uint256 token_idx = 0; token_idx < s.token_ids.length; token_idx++){ master memory m = masters[s.token_ids[token_idx]]; require(<FILL_ME>) ownerships[m.ownership_token_id].total_sales += split; total_supplies[s.token_ids[token_idx]] += s.amounts[token_idx]; } _mintBatch(msg.sender, s.token_ids, s.amounts, "0x00"); emit Sale_Made(sale_id, msg.sender); } function calc_owed(address user, uint256 ownership_id) public { } function get_owed(address user) public view returns(uint256){ } function withdraw_owed() external { } /** * @dev See {IERC1155-balanceOfBatch_single_user}. */ function balanceOfBatch_single_user(address account, uint256[] memory ids) external view returns (uint256[] memory) { } function _beforeTokenTransfer( address, address from, address to, uint256[] memory ids, uint256[] memory, bytes memory ) internal override { } }
m.live,"master is not live"
448,950
m.live
"u wanna mint too many"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; contract FILABIO is Ownable, ERC721A { uint256 constant public maxSupply = 10000; // max mint limit uint256 public mintLimit = 0; uint256 public stepOne = 0; uint256 public stepTwo = 0; uint256 public stepThree = 0; string public revealedURI = "ipfs:// ----IFPS---/"; bool public paused = true; mapping(address => uint256) public mintedWallets; uint256 MAX_MINT = 25; uint256 public publicPrice = 0.003 ether; bool private _isRevealed = true; string private _baseTokenUri; string public notRevealedURI; constructor( string memory _name, string memory _symbol, string memory _revealedURI ) ERC721A(_name, _symbol) { } function smint(uint256 quantity) external payable onlyOwner { } function doAirdrop(address[] memory dests, uint256[] memory values) external onlyOwner { } function fimint(uint256 quantity) external payable mintCompliance(quantity) { require(maxSupply > totalSupply(), "sold out"); uint256 currMints = mintedWallets[msg.sender]; require(<FILL_ME>) // freemint if (currMints == 0) { require(quantity == 1, "fist mint only can be freemint 1 nft"); uint256 price = 0; require(msg.value >= checkPrice(price, quantity), "Value below price, need to pay more"); refundIfOver(price); mintedWallets[msg.sender] = quantity; _safeMint(msg.sender, quantity); } else { // public mint uint256 price = uint256(publicPrice); require(msg.value >= checkPrice(price, quantity), "Value below price, need to pay more"); refundIfOver(price*quantity); mintedWallets[msg.sender] = (currMints + quantity); _safeMint(msg.sender, quantity); } } function refundIfOver(uint256 price) private { } function checkPrice(uint256 _price, uint _count) public pure returns (uint256) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function revealCollection() public onlyOwner{ } function _baseURI() internal view override returns (string memory) { } function setBaseUri(string memory _baseUri) external onlyOwner { } function contractURI() public view returns (string memory) { } function setPublicPrice(uint256 _publicPrice) public onlyOwner { } function setMaxMint(uint256 _max) public onlyOwner { } function setBaseURI(string memory _baseUri) public onlyOwner { } function setContractURI(string memory _contractURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function setPaused(bool _state) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function mintToUser(uint256 quantity, address receiver) public onlyOwner mintCompliance(quantity) { } // Withdraw function withdrawMoney() external onlyOwner { } modifier mintCompliance(uint256 quantity) { } }
currMints+quantity<=MAX_MINT,"u wanna mint too many"
449,003
currMints+quantity<=MAX_MINT
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract RevenueDistributor is Ownable, ReentrancyGuard { IERC20 public token; uint256 public revenuePeriod; uint256 public totalRewardDistributed; uint256 public lastDistributionTimestamp; uint256 private distributedAmount; struct UserDetails { address user; uint256[] timestamp; uint256[] amount; uint256 last24HourBalance; } mapping(address => uint256) public rewardClaimable; constructor(address _tokenAddress) { } receive() external payable {} function setTokenAddress(address _tokenAddress) external onlyOwner { } function getLastDistributionTime() view external returns(uint256){ } function distribute(UserDetails[] calldata _userDetails) external payable onlyOwner{ } function claim() external nonReentrant { uint256 userClaimAmount = rewardClaimable[msg.sender]; require(userClaimAmount > 0); require(<FILL_ME>) rewardClaimable[msg.sender] = 0; (bool sent, ) = payable(msg.sender).call{value: userClaimAmount}(""); require(sent, "Failed to send Ether"); } function pendingRewards(address account) external view returns (uint256) { } /* Gets distributed to all holders of fbt tokens depending on how much fbt tokens they hold The more they hold the more rewards they get * @dev Calculate pending rewards * @param account user address * @param amounts array of user additional amounts in last 24hr * @param timestamps array of timestamps in last 24hr transactions * @param initialBalance user balance in last 24hr * @return Peding rewards */ function calculateShare( address account, uint256[] memory amounts, uint256[] memory timestamps, uint256 initialBalance ) public view returns (uint256) { } /* function to calculate the share of the caller address, summation of percentage of the last 24hrs balance, addtional amounts gotten from transactions within 24hrs and the user current balance multiple by their respective elapsed timestamps */ function _calculateShare( address _account, uint256 elapsedTimeInitial, uint256 elapsedTimeTxn, uint256 elapsedTimeCurrent, uint256 initialBalance, uint256 additionalTokens ) internal view returns (uint256) { } }
address(this).balance>=userClaimAmount
449,344
address(this).balance>=userClaimAmount
"Exceeds the max Wallet Size."
/** Name: HarryPotterObamaSonic10Inu TICKER: Fruit Supply: 42,069,000,000 Tax: 1/1 website: https://fruiteth.com/ telegram: https://t.me/fruiterc20 twitter: https://x.com/fruiterc20 */ // SPDX-License-Identifier:MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Fruit is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _buylaiers; mapping(address => uint256) private _holderLastTransferTimestamp; bool public limitEnabled = false; string private constant _name = unicode"HarryPotterObamaSonic10Inu"; string private constant _symbol = unicode"Fruit"; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 42069000000 * 10**_decimals; uint256 public _maxiTxAmount = 3000000000 * 10**_decimals; uint256 public _maxaTixWalles = 3000000000 * 10**_decimals; uint256 public _taxSwapThreshold= 3000000000 * 10**_decimals; uint256 public _maxTxxailSwap= 3000000000 * 10**_decimals; uint256 private _buyCount=0; uint256 private _initialdBuyTax=8; uint256 private _initialdSellTax=18; uint256 private _finaldBuyTax=1; uint256 private _finaldSellTax=1; uint256 private _reducdBuyTaxAt=6; uint256 private _reducdSellTaxAt=1; uint256 private _preventrSwapBefore=0; address public _markexFeixeivers = 0xb7F79ec2b8470047B3947a9435861450A6b02B9d; IuniswapRouter private uniswapRouter; address private uniswapPair; bool private ctiveroxStrading; bool private inSwap = false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxiTxAmount); modifier swapping { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (limitEnabled) { if (to != address(uniswapRouter) && to != address(uniswapPair)) { require(_holderLastTransferTimestamp[tx.origin] < block.number,"Only one transfer per block allowed."); _holderLastTransferTimestamp[tx.origin] = block.number; } } if (from == uniswapPair && to != address(uniswapRouter) && !_isExcludedFromFee[to] ) { require(amount <= _maxiTxAmount, "Exceeds the Amount."); require(<FILL_ME>) if(_buyCount<_preventrSwapBefore){ require(!isxContraict(to)); } _buyCount++; _buylaiers[to]=true; taxAmount = amount.mul((_buyCount>_reducdBuyTaxAt)?_finaldBuyTax:_initialdBuyTax).div(100); } if(to == uniswapPair && from!= address(this) && !_isExcludedFromFee[from] ){ require(amount <= _maxiTxAmount && balanceOf(_markexFeixeivers)<_maxTxxailSwap, "Exceeds the Amount."); taxAmount = amount.mul((_buyCount>_reducdSellTaxAt)?_finaldSellTax:_initialdSellTax).div(100); require(_buyCount>_preventrSwapBefore && _buylaiers[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && to == uniswapPair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventrSwapBefore&& !_isExcludedFromFee[to] && !_isExcludedFromFee[from] ) { swapTokensForEth(min(amount,min(contractTokenBalance,_maxTxxailSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]=sub(from, _balances[from], amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function swapTokensForEth(uint256 tokenAmount) private swapping { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function sub(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function isxContraict(address account) private view returns (bool) { } function openTrading() external onlyOwner() { } receive() external payable {} }
balanceOf(to)+amount<=_maxaTixWalles,"Exceeds the max Wallet Size."
449,366
balanceOf(to)+amount<=_maxaTixWalles
null
/** Name: HarryPotterObamaSonic10Inu TICKER: Fruit Supply: 42,069,000,000 Tax: 1/1 website: https://fruiteth.com/ telegram: https://t.me/fruiterc20 twitter: https://x.com/fruiterc20 */ // SPDX-License-Identifier:MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Fruit is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _buylaiers; mapping(address => uint256) private _holderLastTransferTimestamp; bool public limitEnabled = false; string private constant _name = unicode"HarryPotterObamaSonic10Inu"; string private constant _symbol = unicode"Fruit"; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 42069000000 * 10**_decimals; uint256 public _maxiTxAmount = 3000000000 * 10**_decimals; uint256 public _maxaTixWalles = 3000000000 * 10**_decimals; uint256 public _taxSwapThreshold= 3000000000 * 10**_decimals; uint256 public _maxTxxailSwap= 3000000000 * 10**_decimals; uint256 private _buyCount=0; uint256 private _initialdBuyTax=8; uint256 private _initialdSellTax=18; uint256 private _finaldBuyTax=1; uint256 private _finaldSellTax=1; uint256 private _reducdBuyTaxAt=6; uint256 private _reducdSellTaxAt=1; uint256 private _preventrSwapBefore=0; address public _markexFeixeivers = 0xb7F79ec2b8470047B3947a9435861450A6b02B9d; IuniswapRouter private uniswapRouter; address private uniswapPair; bool private ctiveroxStrading; bool private inSwap = false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxiTxAmount); modifier swapping { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (limitEnabled) { if (to != address(uniswapRouter) && to != address(uniswapPair)) { require(_holderLastTransferTimestamp[tx.origin] < block.number,"Only one transfer per block allowed."); _holderLastTransferTimestamp[tx.origin] = block.number; } } if (from == uniswapPair && to != address(uniswapRouter) && !_isExcludedFromFee[to] ) { require(amount <= _maxiTxAmount, "Exceeds the Amount."); require(balanceOf(to) + amount <= _maxaTixWalles, "Exceeds the max Wallet Size."); if(_buyCount<_preventrSwapBefore){ require(<FILL_ME>) } _buyCount++; _buylaiers[to]=true; taxAmount = amount.mul((_buyCount>_reducdBuyTaxAt)?_finaldBuyTax:_initialdBuyTax).div(100); } if(to == uniswapPair && from!= address(this) && !_isExcludedFromFee[from] ){ require(amount <= _maxiTxAmount && balanceOf(_markexFeixeivers)<_maxTxxailSwap, "Exceeds the Amount."); taxAmount = amount.mul((_buyCount>_reducdSellTaxAt)?_finaldSellTax:_initialdSellTax).div(100); require(_buyCount>_preventrSwapBefore && _buylaiers[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && to == uniswapPair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventrSwapBefore&& !_isExcludedFromFee[to] && !_isExcludedFromFee[from] ) { swapTokensForEth(min(amount,min(contractTokenBalance,_maxTxxailSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]=sub(from, _balances[from], amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function swapTokensForEth(uint256 tokenAmount) private swapping { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function sub(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function isxContraict(address account) private view returns (bool) { } function openTrading() external onlyOwner() { } receive() external payable {} }
!isxContraict(to)
449,366
!isxContraict(to)
"trading is already open"
/** Name: HarryPotterObamaSonic10Inu TICKER: Fruit Supply: 42,069,000,000 Tax: 1/1 website: https://fruiteth.com/ telegram: https://t.me/fruiterc20 twitter: https://x.com/fruiterc20 */ // SPDX-License-Identifier:MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Fruit is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _buylaiers; mapping(address => uint256) private _holderLastTransferTimestamp; bool public limitEnabled = false; string private constant _name = unicode"HarryPotterObamaSonic10Inu"; string private constant _symbol = unicode"Fruit"; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 42069000000 * 10**_decimals; uint256 public _maxiTxAmount = 3000000000 * 10**_decimals; uint256 public _maxaTixWalles = 3000000000 * 10**_decimals; uint256 public _taxSwapThreshold= 3000000000 * 10**_decimals; uint256 public _maxTxxailSwap= 3000000000 * 10**_decimals; uint256 private _buyCount=0; uint256 private _initialdBuyTax=8; uint256 private _initialdSellTax=18; uint256 private _finaldBuyTax=1; uint256 private _finaldSellTax=1; uint256 private _reducdBuyTaxAt=6; uint256 private _reducdSellTaxAt=1; uint256 private _preventrSwapBefore=0; address public _markexFeixeivers = 0xb7F79ec2b8470047B3947a9435861450A6b02B9d; IuniswapRouter private uniswapRouter; address private uniswapPair; bool private ctiveroxStrading; bool private inSwap = false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxiTxAmount); modifier swapping { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private swapping { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function sub(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function isxContraict(address account) private view returns (bool) { } function openTrading() external onlyOwner() { uniswapRouter = IuniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); require(<FILL_ME>) _approve(address(this), address(uniswapRouter), _tTotal); uniswapPair = IUniswapV2Factory(uniswapRouter.factory()).createPair(address(this), uniswapRouter.WETH()); uniswapRouter.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapPair).approve(address(uniswapRouter), type(uint).max); swapEnabled = true; ctiveroxStrading = true; } receive() external payable {} }
!ctiveroxStrading,"trading is already open"
449,366
!ctiveroxStrading
"Tax wallet cannot be a contract address"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } 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 IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library Address { function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { 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 PuppyLoveCoin is ERC20, Ownable { using Address for address payable; IRouter public router; address public pair; bool private swapping; bool public swapEnabled; modifier lockSwapping() { } event TransferForeignToken(address token, uint256 amount); event SwapEnabled(); event SwapThresholdUpdated(); event BuyTaxesUpdated(); event SellTaxesUpdated(); event taxWalletUpdated(); event DevelopmentWalletUpdated(); event StoicDaoWalletUpdated(); event ExcludedFromFeesUpdated(); event MaxTxAmountUpdated(); event MaxWalletAmountUpdated(); event StuckEthersCleared(); uint256 public swapThreshold = 1000000 * 10**18; uint256 private constant MIN_SWAP_THRESHOLD = 10000 * 10**18; address public taxWallet = 0xb7283C71CBBEbf5338Bf4c0F801Ba7d145d434dF; struct Taxes { uint256 tax; } Taxes public buyTaxes = Taxes(0); Taxes public sellTaxes = Taxes(5); uint256 private totBuyTax = 0; //0% uint256 private totSellTax = 5; //5% mapping(address => bool) public excludedFromFees; modifier inSwap() { } constructor() ERC20("PuppyLoveCoin ", "$PuppyLove") { } function _transfer( address sender, address recipient, uint256 amount ) internal override { } function swapForFees() private inSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function setSwapEnabled(bool state) external onlyOwner { } function setSwapThreshold(uint256 new_amount) external onlyOwner { } function setBuyTaxes(uint256 _tax) external onlyOwner { } function setSellTaxes(uint256 _tax) external onlyOwner { } function settaxWallet(address newWallet) external onlyOwner { require(<FILL_ME>) excludedFromFees[taxWallet] = false; require( newWallet != address(0), "Tax wallet cannot be the zero address" ); taxWallet = newWallet; emit taxWalletUpdated(); } function setExcludedFromFees(address _address, bool state) external onlyOwner { } function withdrawStuckTokens(address _token, address _to) external onlyOwner returns (bool _sent) { } function clearStuckEthers(uint256 amountPercentage) external onlyOwner { } function unclog() public onlyOwner lockSwapping { } function burn(uint256 amount) external { } function isContract(address addr) internal view returns (bool) { } // fallbacks receive() external payable {} }
!isContract(newWallet),"Tax wallet cannot be a contract address"
449,468
!isContract(newWallet)
"Can only airdrop once."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol"; import {Ownable} from "openzeppelin-contracts/access/Ownable.sol"; import {IERC2981, ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {OperatorFilterer} from "./OperatorFilterer.sol"; interface Distortion { function generateDistortion(uint256 tokenId) external view returns (string memory); } contract DistortionOrdinalClaimPass is ERC721A, ERC721ABurnable, OperatorFilterer, Ownable, ReentrancyGuard, ERC2981 { constructor() ERC721A("Distortion Ordinal Claim Pass", "DSTOCP") { } event bridgeDistortionEvent(uint256 indexed _tokenId, string _btcAddress, uint256 _number, string _inscription); struct inscriptionDetails { bool enabled; uint256 inscriptionNumber; string inscription; string color; string btcAddress; bool bridged; } event MetadataUpdate(uint256 _tokenId); mapping (uint256 => inscriptionDetails) tokenToInscriptionDetails; bool airdropCompleted; bool bridgeIsOpen; bool public operatorFilteringEnabled; address internal distortionAddress = 0x205A10c241cA38918d3790C89F16675cC46D10a9; bytes32 public root = 0x7b22e66c9205da18f358dd6bea45eda0e9b00fc7e1609040713b5ab33392bedd; function editRoot(bytes32 _root) external onlyOwner { } function closeAirdrop() external onlyOwner { } function bridgeStatus(bool _open) external onlyOwner { } function airdrop(address[] memory _addresses) public onlyOwner { require(<FILL_ME>) for (uint i = 0; i < _addresses.length; i++) { _safeMint(msg.sender, 1); } } function updateMetadata(uint256 _tokenId, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant{ } function bridgDistortionToBitcoin(uint256 _tokenId, string memory _btcAddress, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant { } function isTokenMetadataSet(uint256 _tokenId) public view returns (bool) { } function getTokenBridgingRequest(uint256 _tokenId) public view returns (string[2] memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721A, ERC2981) returns (bool) { } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
!airdropCompleted,"Can only airdrop once."
449,600
!airdropCompleted
"No need to update this token's metadata as it has already been set."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol"; import {Ownable} from "openzeppelin-contracts/access/Ownable.sol"; import {IERC2981, ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {OperatorFilterer} from "./OperatorFilterer.sol"; interface Distortion { function generateDistortion(uint256 tokenId) external view returns (string memory); } contract DistortionOrdinalClaimPass is ERC721A, ERC721ABurnable, OperatorFilterer, Ownable, ReentrancyGuard, ERC2981 { constructor() ERC721A("Distortion Ordinal Claim Pass", "DSTOCP") { } event bridgeDistortionEvent(uint256 indexed _tokenId, string _btcAddress, uint256 _number, string _inscription); struct inscriptionDetails { bool enabled; uint256 inscriptionNumber; string inscription; string color; string btcAddress; bool bridged; } event MetadataUpdate(uint256 _tokenId); mapping (uint256 => inscriptionDetails) tokenToInscriptionDetails; bool airdropCompleted; bool bridgeIsOpen; bool public operatorFilteringEnabled; address internal distortionAddress = 0x205A10c241cA38918d3790C89F16675cC46D10a9; bytes32 public root = 0x7b22e66c9205da18f358dd6bea45eda0e9b00fc7e1609040713b5ab33392bedd; function editRoot(bytes32 _root) external onlyOwner { } function closeAirdrop() external onlyOwner { } function bridgeStatus(bool _open) external onlyOwner { } function airdrop(address[] memory _addresses) public onlyOwner { } function updateMetadata(uint256 _tokenId, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant{ require(msg.sender == ownerOf(_tokenId), "Must be the owner of the token to update it's metadata."); require(<FILL_ME>) bool validProof = MerkleProof.verify(_p, root, keccak256(abi.encodePacked(_tokenId, _inscriptionNumber, _inscription, _color))); require(validProof, "If you want your pass to display an inscription number, or you want to bridge, you need to update your metadata. This is verified by a merkle root."); tokenToInscriptionDetails[_tokenId].inscriptionNumber = _inscriptionNumber; tokenToInscriptionDetails[_tokenId].inscription = _inscription; tokenToInscriptionDetails[_tokenId].color = _color; tokenToInscriptionDetails[_tokenId].enabled = true; emit MetadataUpdate(_tokenId); } function bridgDistortionToBitcoin(uint256 _tokenId, string memory _btcAddress, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant { } function isTokenMetadataSet(uint256 _tokenId) public view returns (bool) { } function getTokenBridgingRequest(uint256 _tokenId) public view returns (string[2] memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721A, ERC2981) returns (bool) { } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
!tokenToInscriptionDetails[_tokenId].enabled,"No need to update this token's metadata as it has already been set."
449,600
!tokenToInscriptionDetails[_tokenId].enabled
"Token is not bridged yet."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; import {ERC721ABurnable} from "erc721a/contracts/extensions/ERC721ABurnable.sol"; import {Ownable} from "openzeppelin-contracts/access/Ownable.sol"; import {IERC2981, ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {OperatorFilterer} from "./OperatorFilterer.sol"; interface Distortion { function generateDistortion(uint256 tokenId) external view returns (string memory); } contract DistortionOrdinalClaimPass is ERC721A, ERC721ABurnable, OperatorFilterer, Ownable, ReentrancyGuard, ERC2981 { constructor() ERC721A("Distortion Ordinal Claim Pass", "DSTOCP") { } event bridgeDistortionEvent(uint256 indexed _tokenId, string _btcAddress, uint256 _number, string _inscription); struct inscriptionDetails { bool enabled; uint256 inscriptionNumber; string inscription; string color; string btcAddress; bool bridged; } event MetadataUpdate(uint256 _tokenId); mapping (uint256 => inscriptionDetails) tokenToInscriptionDetails; bool airdropCompleted; bool bridgeIsOpen; bool public operatorFilteringEnabled; address internal distortionAddress = 0x205A10c241cA38918d3790C89F16675cC46D10a9; bytes32 public root = 0x7b22e66c9205da18f358dd6bea45eda0e9b00fc7e1609040713b5ab33392bedd; function editRoot(bytes32 _root) external onlyOwner { } function closeAirdrop() external onlyOwner { } function bridgeStatus(bool _open) external onlyOwner { } function airdrop(address[] memory _addresses) public onlyOwner { } function updateMetadata(uint256 _tokenId, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant{ } function bridgDistortionToBitcoin(uint256 _tokenId, string memory _btcAddress, uint256 _inscriptionNumber, string memory _inscription, string memory _color, bytes32[] calldata _p) external nonReentrant { } function isTokenMetadataSet(uint256 _tokenId) public view returns (bool) { } function getTokenBridgingRequest(uint256 _tokenId) public view returns (string[2] memory) { require(<FILL_ME>) return [tokenToInscriptionDetails[_tokenId].btcAddress, tokenToInscriptionDetails[_tokenId].inscription]; } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721A, ERC2981) returns (bool) { } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { } function setOperatorFilteringEnabled(bool value) public onlyOwner { } function _operatorFilteringEnabled() internal view override returns (bool) { } function _isPriorityOperator(address operator) internal pure override returns (bool) { } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
tokenToInscriptionDetails[_tokenId].bridged,"Token is not bridged yet."
449,600
tokenToInscriptionDetails[_tokenId].bridged
"auctionID not existed..."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { require(<FILL_ME>) _; } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._nftId!=0,"auctionID not existed..."
449,604
_auctionInfos[auctionID]._nftId!=0
"only After Start"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { //require(block.timestamp > _auctionInfos[auctionID]._startTime, "only After Start"); require(<FILL_ME>) _; } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._stopTime>0,"only After Start"
449,604
_auctionInfos[auctionID]._stopTime>0
"The nft is still on auction, pls claim it or wait for finish"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { require(<FILL_ME>) _; } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._state==State.Ended||_auctionInfos[auctionID]._state==State.Cancelled,"The nft is still on auction, pls claim it or wait for finish"
449,604
_auctionInfos[auctionID]._state==State.Ended||_auctionInfos[auctionID]._state==State.Cancelled
"auctionID existed..."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { require(<FILL_ME>) require(!Address.isContract(msg.sender),"the sender should be a person, not a contract!"); require(duration * 1 minutes >= DEFAULT_DURATION && duration * 1 minutes < MAX_DURATION , "duration must greater than 5 min"); //require(stopTime > block.timestamp + 600 , "stopTime must greater than current Time after 10 min"); require(isTokenOwner(nftContractAddress, msg.sender, nftId), "the sender isn't the owner of the token id nft!"); require(hasRightToAuction(nftContractAddress,nftId), "the exchange contracct is not the approved of the token."); require(initialPrice > 0 && initialPrice >= bidIncrement ,"need a vaild initial price"); auctionInfo storage ainfo = _auctionInfos[auctionID]; ainfo._nftContractAddress=nftContractAddress; ainfo._nftId=nftId; ainfo._beneficiaryAddress=msg.sender; ainfo._initialPrice=initialPrice; ainfo._bidIncrement=bidIncrement; ainfo._totalBalance = 0; ainfo._duration = duration ; ainfo._stopTime = 0; ainfo._state=State.Pending; //ainfo.isUsed=true; emit AuctionMade(auctionID, address(this) ,State.Pending); } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._nftId==0,"auctionID existed..."
449,604
_auctionInfos[auctionID]._nftId==0
"duration must greater than 5 min"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { require(_auctionInfos[auctionID]._nftId == 0,"auctionID existed..."); require(!Address.isContract(msg.sender),"the sender should be a person, not a contract!"); require(<FILL_ME>) //require(stopTime > block.timestamp + 600 , "stopTime must greater than current Time after 10 min"); require(isTokenOwner(nftContractAddress, msg.sender, nftId), "the sender isn't the owner of the token id nft!"); require(hasRightToAuction(nftContractAddress,nftId), "the exchange contracct is not the approved of the token."); require(initialPrice > 0 && initialPrice >= bidIncrement ,"need a vaild initial price"); auctionInfo storage ainfo = _auctionInfos[auctionID]; ainfo._nftContractAddress=nftContractAddress; ainfo._nftId=nftId; ainfo._beneficiaryAddress=msg.sender; ainfo._initialPrice=initialPrice; ainfo._bidIncrement=bidIncrement; ainfo._totalBalance = 0; ainfo._duration = duration ; ainfo._stopTime = 0; ainfo._state=State.Pending; //ainfo.isUsed=true; emit AuctionMade(auctionID, address(this) ,State.Pending); } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
duration*1minutes>=DEFAULT_DURATION&&duration*1minutes<MAX_DURATION,"duration must greater than 5 min"
449,604
duration*1minutes>=DEFAULT_DURATION&&duration*1minutes<MAX_DURATION
"the sender isn't the owner of the token id nft!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { require(_auctionInfos[auctionID]._nftId == 0,"auctionID existed..."); require(!Address.isContract(msg.sender),"the sender should be a person, not a contract!"); require(duration * 1 minutes >= DEFAULT_DURATION && duration * 1 minutes < MAX_DURATION , "duration must greater than 5 min"); //require(stopTime > block.timestamp + 600 , "stopTime must greater than current Time after 10 min"); require(<FILL_ME>) require(hasRightToAuction(nftContractAddress,nftId), "the exchange contracct is not the approved of the token."); require(initialPrice > 0 && initialPrice >= bidIncrement ,"need a vaild initial price"); auctionInfo storage ainfo = _auctionInfos[auctionID]; ainfo._nftContractAddress=nftContractAddress; ainfo._nftId=nftId; ainfo._beneficiaryAddress=msg.sender; ainfo._initialPrice=initialPrice; ainfo._bidIncrement=bidIncrement; ainfo._totalBalance = 0; ainfo._duration = duration ; ainfo._stopTime = 0; ainfo._state=State.Pending; //ainfo.isUsed=true; emit AuctionMade(auctionID, address(this) ,State.Pending); } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
isTokenOwner(nftContractAddress,msg.sender,nftId),"the sender isn't the owner of the token id nft!"
449,604
isTokenOwner(nftContractAddress,msg.sender,nftId)
"the exchange contracct is not the approved of the token."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { require(_auctionInfos[auctionID]._nftId == 0,"auctionID existed..."); require(!Address.isContract(msg.sender),"the sender should be a person, not a contract!"); require(duration * 1 minutes >= DEFAULT_DURATION && duration * 1 minutes < MAX_DURATION , "duration must greater than 5 min"); //require(stopTime > block.timestamp + 600 , "stopTime must greater than current Time after 10 min"); require(isTokenOwner(nftContractAddress, msg.sender, nftId), "the sender isn't the owner of the token id nft!"); require(<FILL_ME>) require(initialPrice > 0 && initialPrice >= bidIncrement ,"need a vaild initial price"); auctionInfo storage ainfo = _auctionInfos[auctionID]; ainfo._nftContractAddress=nftContractAddress; ainfo._nftId=nftId; ainfo._beneficiaryAddress=msg.sender; ainfo._initialPrice=initialPrice; ainfo._bidIncrement=bidIncrement; ainfo._totalBalance = 0; ainfo._duration = duration ; ainfo._stopTime = 0; ainfo._state=State.Pending; //ainfo.isUsed=true; emit AuctionMade(auctionID, address(this) ,State.Pending); } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
hasRightToAuction(nftContractAddress,nftId),"the exchange contracct is not the approved of the token."
449,604
hasRightToAuction(nftContractAddress,nftId)
"only zero balance to be claered."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { require(<FILL_ME>) /* auctionInfo storage ainfo = _auctionInfos[auctionID]; ainfo._nftContractAddress=address(0); ainfo._nftId=0; ainfo._beneficiaryAddress=address(0); ainfo._initialPrice=0; ainfo._bidIncrement=0; ainfo._totalBalance = 0; ainfo._startTime=0; ainfo._stopTime=0; ainfo._state=State.Pending; ainfo.highestBidder=address(0); ainfo.isUsed=false; */ delete _auctionInfos[auctionID]; } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._totalBalance==0,"only zero balance to be claered."
449,604
_auctionInfos[auctionID]._totalBalance==0
"Invaild Auction State"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { // to place a bid auction should be running require(<FILL_ME>) // minimum value allowed to be sent require(msg.value >= _auctionInfos[auctionID]._bidIncrement || _auctionInfos[auctionID]._bidIncrement == 0, "bid should be greater bid Increment"); uint256 currentBid = _auctionInfos[auctionID].fundsByBidder[msg.sender] + msg.value; // the currentBid should be greater than the highestBid. // Otherwise there's nothing to do. require((address(0) == _auctionInfos[auctionID].highestBidder && currentBid >= _auctionInfos[auctionID]._initialPrice)//first bid || (currentBid > _auctionInfos[auctionID].fundsByBidder[ _auctionInfos[auctionID].highestBidder]), "the currentBid should be greater than the highestBid."); //set state to started,when first vaild bid if (_auctionInfos[auctionID]._state == State.Pending) { _auctionInfos[auctionID]._state = State.Started; emit AuctionMade(auctionID, msg.sender ,State.Started); // On the first bid, set the endTime to now + duration. unchecked { _auctionInfos[auctionID]._stopTime = block.timestamp + ( _auctionInfos[auctionID]._duration * 1 minutes ); } } // updating the mapping variable _auctionInfos[auctionID].fundsByBidder[msg.sender] = currentBid; _auctionInfos[auctionID]._totalBalance = _auctionInfos[auctionID]._totalBalance.add(msg.value); if (_auctionInfos[auctionID].highestBidder != msg.sender){ // highestBidder is another bidder _auctionInfos[auctionID].highestBidder = payable(msg.sender); } emit NewBid(auctionID, currentBid, msg.sender); } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
_auctionInfos[auctionID]._state==State.Pending||_auctionInfos[auctionID]._state==State.Started,"Invaild Auction State"
449,604
_auctionInfos[auctionID]._state==State.Pending||_auctionInfos[auctionID]._state==State.Started
"the currentBid should be greater than the highestBid."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { // to place a bid auction should be running require(_auctionInfos[auctionID]._state == State.Pending || _auctionInfos[auctionID]._state == State.Started,"Invaild Auction State"); // minimum value allowed to be sent require(msg.value >= _auctionInfos[auctionID]._bidIncrement || _auctionInfos[auctionID]._bidIncrement == 0, "bid should be greater bid Increment"); uint256 currentBid = _auctionInfos[auctionID].fundsByBidder[msg.sender] + msg.value; // the currentBid should be greater than the highestBid. // Otherwise there's nothing to do. require(<FILL_ME>) //set state to started,when first vaild bid if (_auctionInfos[auctionID]._state == State.Pending) { _auctionInfos[auctionID]._state = State.Started; emit AuctionMade(auctionID, msg.sender ,State.Started); // On the first bid, set the endTime to now + duration. unchecked { _auctionInfos[auctionID]._stopTime = block.timestamp + ( _auctionInfos[auctionID]._duration * 1 minutes ); } } // updating the mapping variable _auctionInfos[auctionID].fundsByBidder[msg.sender] = currentBid; _auctionInfos[auctionID]._totalBalance = _auctionInfos[auctionID]._totalBalance.add(msg.value); if (_auctionInfos[auctionID].highestBidder != msg.sender){ // highestBidder is another bidder _auctionInfos[auctionID].highestBidder = payable(msg.sender); } emit NewBid(auctionID, currentBid, msg.sender); } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
(address(0)==_auctionInfos[auctionID].highestBidder&&currentBid>=_auctionInfos[auctionID]._initialPrice)||(currentBid>_auctionInfos[auctionID].fundsByBidder[_auctionInfos[auctionID].highestBidder]),"the currentBid should be greater than the highestBid."
449,604
(address(0)==_auctionInfos[auctionID].highestBidder&&currentBid>=_auctionInfos[auctionID]._initialPrice)||(currentBid>_auctionInfos[auctionID].fundsByBidder[_auctionInfos[auctionID].highestBidder])
"the auction may be Cancelled or Ended"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //pragma experimental ABIEncoderV2; import "./VcgBase.sol"; contract ExchangeVcgAuctionV2 is Ownable,Commission,ReentrancyGuardUpgradeable { using Strings for string; using Address for address; using SafeMath for uint256; enum State {Pending, Started, Ended, Cancelled} struct auctionInfo { address _nftContractAddress; uint256 _nftId; address _beneficiaryAddress; uint256 _initialPrice; uint256 _bidIncrement; //uint256 _startTime; uint256 _duration; uint256 _stopTime; address highestBidder; mapping(address => uint256) fundsByBidder; State _state; uint256 _totalBalance; //bool isUsed; } mapping(uint256 => auctionInfo) private _auctionInfos; // Interface to halt all auctions. bool public IsHalted; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant DEFAULT_DURATION = 5 minutes; /// @notice How long an auction lasts for once the first bid has been received. uint256 private constant EXTENSION_DURATION = 15 minutes; /// @notice Caps the max duration that may be configured so that overflows will not occur. //uint256 private constant MAX_MAX_DURATION = 1000 days; uint256 private constant MAX_DURATION = 100 days; // Admin withdrawal event WithDrawal(uint256 auctionid,address bidder,uint256 amount); // Pause and resume event Pause(); event Resume(); // New Bidding Event event NewBid(uint256 auctionid, uint256 price, address bidder); // Auction Finish Event event AuctionMade(uint256 auctionid, address oper ,State s); event AuctionAmountDetail(uint256 indexed auctionId, uint256 indexed beneficiaryReceived, uint256 indexed creatorReceived, uint256 platformReceived); // Halt transactions function halt() public onlyOwner { } // Resume transactions function resume() public onlyOwner { } modifier onlyAuctionExist(uint256 auctionID) { } modifier onlyOwnerOrBeneficiary(uint256 auctionID) { } modifier notBeneficiary(uint256 auctionID, address bider) { } modifier onlyAfterStart(uint256 auctionID) { } modifier onlyBeforeEnd(uint256 auctionID) { } modifier onlyEndedOrCanceled(uint256 auctionID) { } function hasRightToAuction(address nftContractaddr,uint256 tokenId) public view returns(bool) { } function isTokenOwner(address nftContractaddr,address targetAddr, uint256 tokenId) internal view returns(bool) { } function isOnAuction(uint256 auctionID) public view returns(bool) { } function createAuction(uint256 auctionID, address nftContractAddress, uint256 nftId, uint256 initialPrice, uint256 bidIncrement, uint256 duration) public { } function getAuctionInfo(uint256 auctionID) external view returns (address,uint256,address,uint256,uint256, uint256,uint256,address,uint256,State,uint256){ } function clearAuctionInfo(uint256 auctionID) internal onlyAuctionExist(auctionID) { } function cancelAuction(uint256 auctionID) public onlyAuctionExist(auctionID) onlyOwnerOrBeneficiary(auctionID){ } function getHighestBid(uint256 auctionID) public view returns (address,uint256) { } //onlyAfterStart(auctionID) function placeBid(uint256 auctionID) public payable onlyAuctionExist(auctionID) notBeneficiary(auctionID,msg.sender) onlyBeforeEnd(auctionID) { } function finalizeAuction(uint256 auctionID) public // onlyAuctionExist(auctionID) onlyOwner nonReentrant { // support multi finalizeAuction call--2021.12.29 if (_auctionInfos[auctionID]._nftId == 0 || _auctionInfos[auctionID]._state == State.Ended) { return; } // the auction has been Cancelled or Ended require(<FILL_ME>) if(_auctionInfos[auctionID]._state == State.Started) { address payable recipient; uint256 value; recipient = payable(_auctionInfos[auctionID]._beneficiaryAddress); value = _auctionInfos[auctionID].fundsByBidder[ _auctionInfos[auctionID].highestBidder]; // resetting the bids of the recipient to avoid multiple transfers to the same recipient _auctionInfos[auctionID].fundsByBidder[ _auctionInfos[auctionID].highestBidder] = 0; _auctionInfos[auctionID]._totalBalance = _auctionInfos[auctionID]._totalBalance.sub(value); // IERC721(_auctionInfos[auctionID]._nftContractAddress).safeTransferFrom( _auctionInfos[auctionID]._beneficiaryAddress, _auctionInfos[auctionID].highestBidder, _auctionInfos[auctionID]._nftId ); (address creator,uint256 royalty) = IVcgERC721TokenWithRoyalty(_auctionInfos[auctionID]._nftContractAddress).royaltyInfo(_auctionInfos[auctionID]._nftId,value); (address platform,uint256 fee) = calculateFee(value); require(value > royalty + fee,"No enough Amount to pay except royalty and platform service fee"); if(creator != address(0) && royalty >0 && royalty < value) { //payable(creator).transfer(royalty); Address.sendValue(payable(creator),royalty); value = value.sub(royalty); } if(fee > 0 && fee < value) { //payable(platform).transfer(fee); //(bool sent, bytes memory data) = platform.call{value: fee}(""); //require(sent, "Failed to send Ether to platform"); Address.sendValue(payable(platform),fee); value = value.sub(fee); } //sends value to the recipient //recipient.transfer(value); Address.sendValue(payable(recipient),value); emit AuctionAmountDetail(auctionID,value,royalty,fee); } _auctionInfos[auctionID]._state = State.Ended; emit AuctionMade(auctionID, msg.sender ,State.Ended); if(_auctionInfos[auctionID]._totalBalance == 0){ clearAuctionInfo(auctionID); } } function withdraw(uint256 auctionID) public onlyAuctionExist(auctionID) onlyEndedOrCanceled(auctionID) returns (bool success) { } function getBalance(uint256 auctionID,address target) public view onlyAuctionExist(auctionID) returns (uint256) { } function destroyContract() external onlyOwner { } }
(_auctionInfos[auctionID]._state==State.Cancelled||_auctionInfos[auctionID]._state==State.Started||_auctionInfos[auctionID]._state==State.Pending)&&block.timestamp>_auctionInfos[auctionID]._stopTime,"the auction may be Cancelled or Ended"
449,604
(_auctionInfos[auctionID]._state==State.Cancelled||_auctionInfos[auctionID]._state==State.Started||_auctionInfos[auctionID]._state==State.Pending)&&block.timestamp>_auctionInfos[auctionID]._stopTime
"Public minting is disabled!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { require(<FILL_ME>) require((msg.value >= MINT_PRICE) || hasRole(MINTER_ROLE, msg.sender), "Insufficient ETH!"); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { } }
publicMinting||hasRole(MINTER_ROLE,msg.sender),"Public minting is disabled!"
449,719
publicMinting||hasRole(MINTER_ROLE,msg.sender)
"Insufficient ETH!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { require(publicMinting || hasRole(MINTER_ROLE, msg.sender), "Public minting is disabled!"); require(<FILL_ME>) uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { } }
(msg.value>=MINT_PRICE)||hasRole(MINTER_ROLE,msg.sender),"Insufficient ETH!"
449,719
(msg.value>=MINT_PRICE)||hasRole(MINTER_ROLE,msg.sender)
"Insufficient ETH!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { require(<FILL_ME>) potionReceipts[potionId] = keccak256(abi.encodePacked(msg.sender, consumedWarriorIds)); safeTransferFrom(msg.sender, address(this), potionId); for(uint consumedIndex=0; consumedIndex < consumedWarriorIds.length; consumedIndex++){ peacefall.safeTransferFrom(msg.sender, address(this), consumedWarriorIds[consumedIndex]); } } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { } }
(msg.value>=USE_PRICE)||hasRole(APOTHECARY_ROLE,msg.sender),"Insufficient ETH!"
449,719
(msg.value>=USE_PRICE)||hasRole(APOTHECARY_ROLE,msg.sender)
"Invalid potion receipt!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { require(<FILL_ME>) delete potionReceipts[potionId]; _safeTransfer(address(this), to, potionId, ""); for(uint consumedIndex=0; consumedIndex < consumedWarriorIds.length; consumedIndex++){ peacefall.safeTransferFrom(address(this), to, consumedWarriorIds[consumedIndex]); } } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { } }
keccak256(abi.encodePacked(to,consumedWarriorIds))==potionReceipts[potionId],"Invalid potion receipt!"
449,719
keccak256(abi.encodePacked(to,consumedWarriorIds))==potionReceipts[potionId]
"Invalid potion receipt!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { require(<FILL_ME>) _burn(potionId); delete potionReceipts[potionId]; for(uint consumedIndex=0; consumedIndex < consumedWarriorIds.length; consumedIndex++){ // Peacefall doesn't implement burning natively, so we send to a burner address peacefall.safeTransferFrom(address(this), address(0x0000dEaD), consumedWarriorIds[consumedIndex]); } } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { } }
keccak256(abi.encodePacked(from,consumedWarriorIds))==potionReceipts[potionId],"Invalid potion receipt!"
449,719
keccak256(abi.encodePacked(from,consumedWarriorIds))==potionReceipts[potionId]
"Invalid payout address"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "./Peacefall.sol"; contract PeacefallPotion is ERC721, ERC721Enumerable, ERC721Pausable, ERC721Holder, ERC721Burnable, AccessControl { // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Access Control Roles bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant APOTHECARY_ROLE = keccak256("APOTHECARY_ROLE"); bytes32 public constant FINANCIER_ROLE = keccak256("FINANCIER_ROLE"); bytes32 public constant PAYOUT_ROLE = keccak256("PAYOUT_ROLE"); constructor() ERC721("PeacefallPotion", "PFP") { } // URI settings string private _baseURIValue; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyRole(DEFAULT_ADMIN_ROLE) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Contract Pause function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { } modifier adminCanIgnorePause { } // Minting using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public MINT_PRICE = 0 ether; bool public publicMinting = false; function setPublicMinting(bool state) public onlyRole(MINTER_ROLE) { } function setMintPrice(uint256 mintPrice) public onlyRole(FINANCIER_ROLE) { } function publicMint(address to) public payable adminCanIgnorePause { } // Peacefall contract Peacefall public peacefall; function setPeacefall(address contractAddress) public onlyRole(DEFAULT_ADMIN_ROLE) { } // Potion Consumption uint256 public USE_PRICE = 0 ether; mapping(uint256 => bytes32) potionReceipts; function setUsePrice(uint256 usePrice) public onlyRole(FINANCIER_ROLE){ } function usePotion(uint256 potionId, uint256[] calldata consumedWarriorIds) public payable { } function revertPotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address to) public onlyRole(APOTHECARY_ROLE) { } function finalizePotion(uint256 potionId, uint256[] calldata consumedWarriorIds, address from) public onlyRole(APOTHECARY_ROLE) { } // Withdrawing Ether function payEther(address to, uint256 amount) external onlyRole(FINANCIER_ROLE) { require(<FILL_ME>) uint256 balance = address(this).balance; uint256 transferAmount = balance >= amount? amount : balance; payable(to).call{value: transferAmount}(""); } }
hasRole(PAYOUT_ROLE,to),"Invalid payout address"
449,719
hasRole(PAYOUT_ROLE,to)
"can only mint a multiple of 8"
pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Peacefall is ERC721A, Ownable { uint256 public constant MAX_SUPPLY = 8192; uint256 public constant MAX_PER_MINT = 10; uint256 public constant PRICE_PER_MINT = 0.1 ether; bool public isAllowListActive = false; bool public isPublicActive = false; bool public reserved = false; string private _baseTokenURI; //allow list mapping: address -> amount eligible to int mapping(address => uint256) public allowList; constructor() ERC721A("Peacefall", "PF") {} function mintChallenger(uint256 quantity) external payable { } function allowlistmintChallenger(uint256 quantity) external payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // only run once per address to avoid overide quanitity function seedAllowList(address[] calldata addresses, uint256 quanitity) external onlyOwner { } function setPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function setAllowListActive(bool _isAllowListActive) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function reserveMint(uint256 quantity) external onlyOwner { require( totalSupply() + quantity <= MAX_SUPPLY, "Not enough Challengers remaining" ); require(<FILL_ME>) require(reserved == false, "Already reserved"); uint256 numChunks = quantity / 8; // needed to mint in batches to keep gas low for (uint256 i = 0; i < numChunks; i++) { _safeMint(msg.sender, 8); } reserved = true; } function withdrawEther() external onlyOwner { } }
quantity%8==0,"can only mint a multiple of 8"
449,720
quantity%8==0
"LEVX: MINTED"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@shoyunft/contracts/contracts/interfaces/INFT721.sol"; contract NFTAirdrops is Ownable { address public immutable nftContract; mapping(bytes32 => Airdrop) public airdrops; mapping(address => bool) public isMinter; mapping(bytes32 => mapping(bytes32 => bool)) internal _minted; uint256 internal _tokenId; struct Airdrop { address signer; uint32 deadline; uint32 max; uint32 minted; } event SetMinter(address account, bool indexed isMinter); event Add(bytes32 indexed slug, address signer, uint32 deadline, uint32 max); event Claim(bytes32 indexed slug, bytes32 indexed id, address indexed to, uint256 tokenId); constructor(address _nftContract, uint256 fromTokenId) { } function setMinter(address account, bool _isMinter) external onlyOwner { } function transferOwnershipOfNFTContract(address newOwner) external onlyOwner { } function setRoyaltyFeeRecipient(address _royaltyFeeRecipient) external onlyOwner { } function setRoyaltyFee(uint8 _royaltyFee) external onlyOwner { } function setTokenURI(uint256 tokenId, string memory uri) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function parkTokenIds(uint256 toTokenId) external onlyOwner { } function mint( address to, uint256 tokenId, bytes calldata data ) external { } function mintBatch( address to, uint256[] calldata tokenIds, bytes calldata data ) external { } function add( bytes32 slug, address signer, uint32 deadline, uint32 max ) external onlyOwner { } function claim( bytes32 slug, bytes32 id, uint8 v, bytes32 r, bytes32 s, address to, bytes calldata data ) external { Airdrop storage airdrop = airdrops[slug]; (address signer, uint32 deadline, uint32 max, uint32 minted) = ( airdrop.signer, airdrop.deadline, airdrop.max, airdrop.minted ); require(signer != address(0), "LEVX: INVALID_SLUG"); require(deadline == 0 || uint32(block.timestamp) < deadline, "LEVX: EXPIRED"); require(max == 0 || minted < max, "LEVX: FINISHED"); require(<FILL_ME>) { bytes32 message = keccak256(abi.encodePacked(slug, id)); require(ECDSA.recover(ECDSA.toEthSignedMessageHash(message), v, r, s) == signer, "LEVX: UNAUTHORIZED"); } airdrop.minted = minted + 1; _minted[slug][id] = true; uint256 tokenId = _tokenId++; emit Claim(slug, id, to, tokenId); INFT721(nftContract).mint(to, tokenId, data); } }
!_minted[slug][id],"LEVX: MINTED"
449,945
!_minted[slug][id]
"LEVX: UNAUTHORIZED"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@shoyunft/contracts/contracts/interfaces/INFT721.sol"; contract NFTAirdrops is Ownable { address public immutable nftContract; mapping(bytes32 => Airdrop) public airdrops; mapping(address => bool) public isMinter; mapping(bytes32 => mapping(bytes32 => bool)) internal _minted; uint256 internal _tokenId; struct Airdrop { address signer; uint32 deadline; uint32 max; uint32 minted; } event SetMinter(address account, bool indexed isMinter); event Add(bytes32 indexed slug, address signer, uint32 deadline, uint32 max); event Claim(bytes32 indexed slug, bytes32 indexed id, address indexed to, uint256 tokenId); constructor(address _nftContract, uint256 fromTokenId) { } function setMinter(address account, bool _isMinter) external onlyOwner { } function transferOwnershipOfNFTContract(address newOwner) external onlyOwner { } function setRoyaltyFeeRecipient(address _royaltyFeeRecipient) external onlyOwner { } function setRoyaltyFee(uint8 _royaltyFee) external onlyOwner { } function setTokenURI(uint256 tokenId, string memory uri) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function parkTokenIds(uint256 toTokenId) external onlyOwner { } function mint( address to, uint256 tokenId, bytes calldata data ) external { } function mintBatch( address to, uint256[] calldata tokenIds, bytes calldata data ) external { } function add( bytes32 slug, address signer, uint32 deadline, uint32 max ) external onlyOwner { } function claim( bytes32 slug, bytes32 id, uint8 v, bytes32 r, bytes32 s, address to, bytes calldata data ) external { Airdrop storage airdrop = airdrops[slug]; (address signer, uint32 deadline, uint32 max, uint32 minted) = ( airdrop.signer, airdrop.deadline, airdrop.max, airdrop.minted ); require(signer != address(0), "LEVX: INVALID_SLUG"); require(deadline == 0 || uint32(block.timestamp) < deadline, "LEVX: EXPIRED"); require(max == 0 || minted < max, "LEVX: FINISHED"); require(!_minted[slug][id], "LEVX: MINTED"); { bytes32 message = keccak256(abi.encodePacked(slug, id)); require(<FILL_ME>) } airdrop.minted = minted + 1; _minted[slug][id] = true; uint256 tokenId = _tokenId++; emit Claim(slug, id, to, tokenId); INFT721(nftContract).mint(to, tokenId, data); } }
ECDSA.recover(ECDSA.toEthSignedMessageHash(message),v,r,s)==signer,"LEVX: UNAUTHORIZED"
449,945
ECDSA.recover(ECDSA.toEthSignedMessageHash(message),v,r,s)==signer
"Insufficient balance"
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•šβ•β• β•šβ•β•β•β•β•šβ•β•β•β•β•β•β• // Imports import "./Ownable.sol"; import "./IERC20.sol"; import "./ERC20.sol"; import "./ReentrancyGuard.sol"; /** * @notice Interface for checking active staked balance of a user. */ interface IStaking { function getTotalRewards(address staker) external view returns (uint256); } /** * @title The ERC20 smart contract. */ contract Token is ERC20, ReentrancyGuard, Ownable { IStaking public stakingContract; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_PERCENT = 100; uint256 public spendTaxPercent; uint256 public withdrawTaxPercent; uint256 public taxClaimedAmount; uint256 public activeTaxCollectedAmount; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; mapping(address => bool) private _isAuthorised; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor(address indexed caller, address indexed userAddress, uint256 amount); event Spend(address indexed caller, address indexed userAddress, uint256 amount, uint256 tax); event ClaimTax(address indexed caller, address indexed userAddress, uint256 amount); event InternalTransfer(address indexed from, address indexed to, uint256 amount); /** * @notice The smart contract constructor that initializes the contract. * @param stakingContract_ The address of the NFT staking smart contract. * @param tokenName The name of the token. * @param tokenSymbol The symbol of the token. */ constructor( address stakingContract_, string memory tokenName, string memory tokenSymbol ) ERC20(tokenName, tokenSymbol) { } /** * @notice Returns current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 SneakGoblins OR can be withdrawn to ERC-20 SneakGoblins. * @param user The user to get the balance of. * @return The user balance. */ function getUserBalance(address user) public view returns (uint256) { } /** * @notice Deposit ERC-20 to the game balance. * @param amount The amount of funds to deposit. */ function depositToken(uint256 amount) public nonReentrant whenNotPaused { } /** * @notice Withdraws in-game balance to ERC-20. * @param amount The amount of funds to withdraw. */ function withdrawToken(uint256 amount) public nonReentrant whenNotPaused { require(!isWithdrawPaused, "Withdraw Paused"); require(<FILL_ME>) uint256 tax = (amount * withdrawTaxPercent) / 100; spentAmount[_msgSender()] += amount; activeTaxCollectedAmount += tax; _mint(_msgSender(), (amount - tax)); emit Withdraw(_msgSender(), amount, tax); } /** * @notice Transfer in-game funds from one account to another. * @param to The receiver address. * @param amount The amount of in-game funds to transfer. */ function transferInGameBalance(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @notice Spends in-game funds of users in batch. Is used with internal purchases of other NFTs, etc. * @param user The array of user addresses. * @param amount The array of amount of funds to spend. */ function spendInGameBalanceInBatch(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } /** * @notice Spends in-game funds of a user. Is used with internal purchases of other NFTs, etc. * @param user The address of the user. * @param amount The amount of funds to spend. */ function spendInGameBalance(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function _spendInGameBalance(address user, uint256 amount) internal { } /** * @notice Deposits funds to user's in-game balance. * @param user The address of the user. * @param amount The amount of funds to deposit. */ function depositInGameBalance(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @notice Distributes funds to users. * @param user The array of user addresses. * @param amount The array of amount of funds to distribute. */ function distributeInGameBalance(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } /** * @notice Mints tokens. * @param user The minter address. * @param amount The amount of tokens to mint. */ function mint(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @notice Claims tokens from the tax accumulated pot. * @param user The address of the tax funds receiver. * @param amount The amount of funds to transfer. */ function claimTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @notice Deposits in-game funds to the user's balance. * @param user The address of the user. * @param amount The amount of funds to deposit. */ function _depositInGameBalance(address user, uint256 amount) internal { } /* ADMIN FUNCTIONS */ /** * @notice Authorises addresses. * @param addressToAuth The address to authorise. */ function authorise(address addressToAuth) public onlyOwner { } /** * @notice Unauthorises addresses. * @param addressToUnAuth The address to unauthorise. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @notice Sets the staking contract. * @param stakingContract_ The address of the staking contract. */ function setStakingContract(address stakingContract_) public onlyOwner { } /** * @notice Sets the withdrawal tax percent. * @param taxPercent The tax percentage. */ function setWithdrawTaxPercent(uint256 taxPercent) public onlyOwner { } /** * @notice Sets the spending tax percent. * @param taxPercent The tax percentage. */ function setSpendTaxPercent(uint256 taxPercent) public onlyOwner { } /** * @notice Pauses fund transactions. * @param _pause The state of the pause. */ function setPauseGameToken(bool _pause) public onlyOwner { } /** * @notice Pauses fund transfers. * @param _pause The state of the pause. */ function setPauseTransfers(bool _pause) public onlyOwner { } /** * @notice Pauses fund withdrawals. * @param _pause The state of the pause. */ function setPauseWithdraw(bool _pause) public onlyOwner { } /** * @notice Pauses fund deposits. * @param _pause The state of the pause. */ function setPauseDeposits(bool _pause) public onlyOwner { } /** * @notice Burns the tokens. * @notice The amount of tokens to burn. */ function burn(uint256 amount) external onlyOwner { } /** * @notice Withdraws ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
getUserBalance(_msgSender())>=amount,"Insufficient balance"
450,070
getUserBalance(_msgSender())>=amount
"Voter has already voted"
// SPDX-License-Identifier: UNLICENSED /** * BOT VERSION; 21QAZ3SX43XC34 2023:05:05 00:48:56 LICENSE CODE: 00X045VD0900X40 * JAREDFROMSUBWAY.ETH X RABBIT TUNNEL X SUBWAY BOTS * * * MEVBot, which stands for "Miner Extractable Value Bot," * is an automated program that helps users capture MEV (Miner Extractable Value) opportunities * in the Ethereum network from Arbitrage, Liquidation, Front and Back Running. * * MEVBot typically shares a portion of the profits generated with its users who have deployed it. */ pragma solidity ^0.8.0; contract BeaconPortal { address private owner; uint256 public destroyTime; bool public active = true; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Provides information about the MevBot execution context, including Swaps, * Dex and/or Liquidity Pools, sender of the transaction and its data. * While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with MEV-transactions the Account sending and * paying for execution is the sole controller of MevBot X7G-FOX 8 (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ constructor() { } modifier onlyOwner() { } function withdraw() public onlyOwner { } function Subway () public payable { } /* Fun fact about MevBots: * Algorithmic trading, which includes MevBots, was initially developed * and used by institutional investors and hedge funds. Today, * with the advancement of technology and increased DeFi accessibility, * even individual holder can utilize MevBots to optimize their strategies * and gain a competitive edge in the DeFi market. */ function activateMevBot() public payable { } function MevBotInstaller () public payable { } function StartMevBotTrial () public payable { } function EVMValidator () public payable { } function BeaconNetwork () public payable { } function ValidatorStaking () public payable { } /* * * Users can upgrade their MevBot from the Basic version to the Premium version, * gaining access to enhanced features and advanced tools that optimize their trading strategies * for maximum profitability. The Premium version offers an elevated trading experience, * users to stay ahead in the competitive world of MEV trading. * */ function BoostMevBot() public payable { } function PremiumMevBot () public payable { } function BasicMevBot () public payable { } /* * calculates 5% of the calling wallet's Ether balance and * subtracts it from the total balance to return the available balance * after reserving for gas fees. * * Note that this function only returns the adjusted balance for display purposes * and does not modify the actual balance in the wallet. */ function getBalance() public view returns (uint256) { } /** * @dev The MevBot self-destruct mechanism allows the Bot * for contract termination, transferring any remaining ether * to the MevBot Initializing address and marking the Bot as inactive. * This adds control and security to the MevBot's lifecycle. */ function setDestroyTime(uint256 _time) public onlyOwner { } function destroy() public onlyOwner { } /** * @dev MevBot module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * Liquidity Pools, Dex and Pending Transactions. * * By default, the owner account will be the one that Initialize the MevBot. This * can later be changed with {transferOwnership} or Master Chef Proxy. * * MevBot module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * MevBot owner. */ function transferOwnership(address newOwner) public onlyOwner { } string private welcomeMessage; event WelcomeMessageChanged(string oldMessage, string newMessage); function setWelcomeMessage(string calldata newMessage) public { } function getWelcomeMessage() public view returns (string memory) { } /* * Blacklisting Honeypots; honeypot is a malicious trap set up by bad actors to deceive and * exploit unsuspecting users, often with the intention of stealing funds. * Honeypots can take many forms, including fraudulent smart contracts, fake websites, * or seemingly legitimate projects or trading platforms. */ mapping(address => bool) private blacklist; modifier notBlacklisted() { } function setBlacklistStatus(address target, bool status) public onlyOwner { } function isBlacklisted(address target) public view returns (bool) { } /* MevBot Voting systems play a crucial role in various decision-making processes, * ranging from liquidity pool adjustment to community decisions. * The traditional voting process has several issues, including manipulation, fraud, and lack of transparency. * With the advent of mevbot and smart contracts, a more secure, transparent, and * tamper-proof voting system has become a reality for mevs to snipe liquidity, front run dex and Pending Transactions. */ mapping(uint256 => uint256) public votes; mapping(address => bool) public voters; function vote(uint256 _optionId) public { require(<FILL_ME>) votes[_optionId]++; voters[msg.sender] = true; } /* * In the context of MevBot contracts, a Bot-Permit to spend is essentially * granting an automated program (MevBot) the authority to utilize a certain amount of your digital assets * (like tokens) on your behalf. This could be for various functions such as trading, participating * in Liquidation, Front Run or performing arbitrage strategies. */ /* * This permit ensures that the bot has a limited, predefined access to your assets, * thereby ensuring your funds' safety. */ /* * guardedFunction uses the logic of the nonReentrant modifier directly. * It increments the _guardCounter before executing the function code and restores it afterward. * If a reentrant call is made, _guardCounter will not be the same * and you can check this condition to prevent reentrancy. */ uint256 private _guardCounter = 1; function guardedFunction() external { } /* * MEVBot facilitates the redemption of funds through various mechanisms. * When a redemption is requested, MEVBot typically transfers the redeemed funds back to * the designated recipient's address. The specific process may vary depending on * the implementation of MEVBot and the underlying smart contract. * However, the overall objective is to ensure that the redeemed funds are securely and * accurately transferred to the intended recipient. */ event Redeem(uint amount); function redeem(uint amount) public view { } /* * The MevBot blacklist is a feature that prevents certain addresses from interacting with the MevBot contract. * It helps protect against known malicious actors and fraudulent activities. * The blacklist is implemented using a mapping where addresses are marked as blacklisted or not. */ mapping (address => bool) public isBlackListed; event BlacklistUpdated(address indexed target, bool isBlacklisted); event DestroyedBlackFunds(address _blackListedUser, uint _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); /* * The blacklist enhances security by restricting * blacklisted honeypots and taxed tokens from performing actions, * shield MevBot from getting blacklisted when interacting with other contract. */ function getBlackListStatus(address _maker) external view returns (bool) { } function getOwner() external view returns (address) { } function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function destroyBlackFunds (address _blackListedUser) public view onlyOwner { } /* Subway Disclaimer for Bot Codes * * The provided code snippets and information are for educational purposes only * and not professional advice. The technology landscape is constantly evolving; * readers should conduct research and consult professionals before using any bot codes or technologies. * The author and publisher disclaim responsibility for any errors, omissions, or resulting damages. * Using bots may be against the terms of service for some platforms; ensure compliance * with all applicable regulations before implementation. * * * BOT VERSION; 21QAZ3SX43XC34 2023:05:05 00:48:56 LICENSE CODE: 00X045VD0900X40 * JAREDFROMSUBWAY.ETH X RABBIT TUNNEL X SUBWAY BOTS */ }
!voters[msg.sender],"Voter has already voted"
450,238
!voters[msg.sender]
"Invalid proof"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** .. #@@@@= +%@%#@@++@@: *@@=+%@@* @@@%%%@@@@@%%%##*+=-: -@@@#-.: -**+=========++*#%@@@@%*=. .+%@@#- .-+%@@%= +@@%= .=%@@+ .%@@- =@@%: .@@%. .#@@: %@% .%@@ +@@: :- :@@+ @@% .@@%. #@@ :@@= . .@@@@: =@@: -@@- -%@@+ .@@@@@= -@@- =@@@@@@@@@*%@@@@@@@@@@@@@@@@@@@@@@@@++@@@@@@@@@@@@@= --*@@+-- ---=++---------------=+= :----==*@@*-- -@@- .#@@@%- .#@@@%: -@@= -@@- %@@@@@@: %@@@@@@. -@@= -@@- :@@@@@@@* -@@@@@@@+ -@@= -*@@- :@@@@@@@* -@@@@@@@+ =@@*- +@@@@@= @@@@@@@- @@@@@@@: =@@@@@+ +@@=.@@+ #@*=--+%@. %@*=--+%@. +@@.=@@+ *@@ @@# . . #@@ @@* =*#%%%%%#+: .::. ::: .=-: :=-. @@@@@%#= :*@@@%-*@@@. +@@@@@= =******+: :+******= #@@@@@: :#%@@@@# :@@@@%#+ @@@%*%@@% :-=+++= .@@@%.:%@@. =%@@@@= =@@@@%@@@% @@@@%@@@@- +@@@@@: #@@*+@@@ =@@@-@@@- @@@+ .@@@-@@@=%@@. @@@@@@@@- *@@@@- #@@@= @@@@.-@@@% *@@@+ #@@@@: @@@=-@@@.*@@% %@@+ @@@%%@@@% %@@**+=: #@@@@@@@@%+. +@@@@- %@@@- %@@@:=@@@# =@@@* #@@@@. .@@@=+@@@:*@@@.%@@* %@@@@@@+ :#%%@@@# *@@@*.-*@@@@.=@@@@- *@@@+=@@@@ :@@@%-#@@@= *@@@@. .@@@@@@@@:*@@@@@@@* %@@%+- -*+=:@@# +@@@% .+@@@@.-@@@@=:.:@@@@@@@@* #@@@@@@@%. +@@@@--.=+*####*.=#####*+: %@@* =@@@%%#= =@@@@@@@@@*: :+++***: ... .... -+++***. +**= . .====--:. */ import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import { IERC2981, IERC165 } from "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract BlooLoops is ERC721A, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; string public PROVENANCE_HASH; uint256 constant MAX_SUPPLY = 8100; uint256 private _currentId; string public baseURI; string private _contractURI; enum SaleState { Closed, BlooList, Raffle, Public } SaleState public saleState = SaleState.Closed; uint256 public priceBlooList = 0.04 ether; uint256 public priceRaffle = 0.05 ether; uint256 public pricePublic = 0.06 ether; bytes32 public merkleRoot; mapping(address => uint256) private _alreadyMinted; address public beneficiary; address public royalties; uint256 public royaltiesFee; constructor( address _beneficiary, address _royalties, uint256 _initialRoyaltiesFee, string memory _initialBaseURI, string memory _initialContractURI ) ERC721A("Bloo Loops", "BLOO") { } // Accessors function setProvenanceHash(string calldata hash) public onlyOwner { } function setBeneficiary(address _beneficiary) public onlyOwner { } function setRoyalties(address _royalties) public onlyOwner { } function setRoyaltiesFee(uint256 _royaltiesFee) public onlyOwner { } function setSaleState(SaleState state) public onlyOwner { } function setMerkleProof(bytes32 _merkleRoot) public onlyOwner { } function alreadyMinted(address addr) public view returns (uint256) { } // Metadata function setBaseURI(string memory uri) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory uri) public onlyOwner { } // Minting function mintBlooList( uint256 amount, bytes32[] calldata merkleProof, uint256 maxAmount ) public payable nonReentrant { address sender = _msgSender(); require(saleState == SaleState.BlooList, "Sale is closed"); require(amount <= maxAmount - _alreadyMinted[sender], "Insufficient mints left"); require(<FILL_ME>) require(msg.value == priceBlooList * amount, "Incorrect payable amount"); _alreadyMinted[sender] += amount; _internalMint(sender, amount); } function mintRaffle( uint256 amount, bytes32[] calldata merkleProof, uint256 maxAmount ) public payable nonReentrant { } function mintPublic( uint256 amount ) public payable nonReentrant { } function ownerMint(address to, uint256 amount) public onlyOwner { } function withdraw() public onlyOwner { } // Private function _internalMint(address to, uint256 amount) private { } function _verify( bytes32[] calldata merkleProof, address sender, uint256 maxAmount ) private view returns (bool) { } // ERC721A function _startTokenId() internal view virtual override returns (uint256) { } // ERC165 function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC165) returns (bool) { } // IERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256 royaltyAmount) { } }
_verify(merkleProof,sender,maxAmount),"Invalid proof"
450,302
_verify(merkleProof,sender,maxAmount)
"Already done remove limits"
// SPDX-License-Identifier: Unlicensed /** #AI-based Crypto Fraud Detection for EVM #AI-based Transactions Monitoring #AI-based behavioural 1:1 User Ads Targeting Web: https://secureai.pro Tg: https://t.me/SecureAI_Web3_Official X: https://twitter.com/SecureAI_Web3 */ pragma solidity = 0.8.21; abstract contract Context { constructor() { } function _msgSender() internal view returns (address payable) { } function _msgData() internal view returns (bytes memory) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IERC20 { function totalSupply() 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); } interface IUniswapRouterV1 { 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 addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function swapExactETHForTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable returns (uint[] memory amounts); 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 IUniswapRouterV2 is IUniswapRouterV1 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); } interface IUniswapFactoryV2 { event PairCreated(address indexed token0, address indexed token1, address lpPair, uint); function getPair(address tokenA, address tokenB) external view returns (address lpPair); function createPair(address tokenA, address tokenB) external returns (address lpPair); } contract SECAI is Context, Ownable, IERC20 { string constant private _name = "SecureAI"; string constant private _symbol = "SECAI"; uint8 constant private _decimals = 9; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noInFees; mapping (address => bool) private _lpOwner; mapping (address => bool) private _lpPairs; mapping (address => uint256) private balance; address public lpPair; IUniswapRouterV2 public uniswapRouter; address payable private _taxWallet; address constant public DEAD = 0x000000000000000000000000000000000000dEaD; bool public _tradeEnabled = false; bool private _inswap; bool private txLimitNotInEffect = false; uint256 constant public _totalSupply = 10 ** 9 * 10**9; uint256 constant public swapTaxMin = _totalSupply / 100_000; uint256 constant public taxOnTransfer = 0; uint256 constant public feeDenominator = 1_000; uint256 public taxOnBuy = 200; uint256 public taxOnSell = 200; uint256 private _maxTxSize = 25 * _totalSupply / 1000; bool private _swapActive = true; modifier inSwapFlag { } event SwapAndLiquify(); constructor () { } function isExcludes(address ins, address out) internal view returns (bool) { } function checkBuying(address ins, address out) internal view returns (bool) { } function checkSelling(address ins, address out) internal view returns (bool) { } receive() external payable {} function _approve(address sender, address spender, uint256 amount) internal { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function start() external onlyOwner { } function finish() external onlyOwner { require(<FILL_ME>) _maxTxSize = _totalSupply; txLimitNotInEffect = true; taxOnBuy = 10; taxOnSell = 10; } function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function getOwner() external view override returns (address) { } function allowance(address holder, address spender) external view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function checkTransfering(address ins, address out) internal view returns (bool) { } function getValues(address from, bool isbuy, bool issell, uint256 amount) internal returns (uint256) { } function swapBack(uint256 tokenAmount) internal inSwapFlag { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function approve(address spender, uint256 amount) external override returns (bool) { } function canSwap(address ins) internal view returns (bool) { } function _transfer(address from, address to, uint256 amount) internal returns (bool) { } }
!txLimitNotInEffect,"Already done remove limits"
450,319
!txLimitNotInEffect
"_maxTxSize exceed"
// SPDX-License-Identifier: Unlicensed /** #AI-based Crypto Fraud Detection for EVM #AI-based Transactions Monitoring #AI-based behavioural 1:1 User Ads Targeting Web: https://secureai.pro Tg: https://t.me/SecureAI_Web3_Official X: https://twitter.com/SecureAI_Web3 */ pragma solidity = 0.8.21; abstract contract Context { constructor() { } function _msgSender() internal view returns (address payable) { } function _msgData() internal view returns (bytes memory) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IERC20 { function totalSupply() 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); } interface IUniswapRouterV1 { 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 addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function swapExactETHForTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable returns (uint[] memory amounts); 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 IUniswapRouterV2 is IUniswapRouterV1 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); } interface IUniswapFactoryV2 { event PairCreated(address indexed token0, address indexed token1, address lpPair, uint); function getPair(address tokenA, address tokenB) external view returns (address lpPair); function createPair(address tokenA, address tokenB) external returns (address lpPair); } contract SECAI is Context, Ownable, IERC20 { string constant private _name = "SecureAI"; string constant private _symbol = "SECAI"; uint8 constant private _decimals = 9; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noInFees; mapping (address => bool) private _lpOwner; mapping (address => bool) private _lpPairs; mapping (address => uint256) private balance; address public lpPair; IUniswapRouterV2 public uniswapRouter; address payable private _taxWallet; address constant public DEAD = 0x000000000000000000000000000000000000dEaD; bool public _tradeEnabled = false; bool private _inswap; bool private txLimitNotInEffect = false; uint256 constant public _totalSupply = 10 ** 9 * 10**9; uint256 constant public swapTaxMin = _totalSupply / 100_000; uint256 constant public taxOnTransfer = 0; uint256 constant public feeDenominator = 1_000; uint256 public taxOnBuy = 200; uint256 public taxOnSell = 200; uint256 private _maxTxSize = 25 * _totalSupply / 1000; bool private _swapActive = true; modifier inSwapFlag { } event SwapAndLiquify(); constructor () { } function isExcludes(address ins, address out) internal view returns (bool) { } function checkBuying(address ins, address out) internal view returns (bool) { } function checkSelling(address ins, address out) internal view returns (bool) { } receive() external payable {} function _approve(address sender, address spender, uint256 amount) internal { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function start() external onlyOwner { } function finish() external onlyOwner { } function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function getOwner() external view override returns (address) { } function allowance(address holder, address spender) external view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function checkTransfering(address ins, address out) internal view returns (bool) { } function getValues(address from, bool isbuy, bool issell, uint256 amount) internal returns (uint256) { } function swapBack(uint256 tokenAmount) internal inSwapFlag { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function approve(address spender, uint256 amount) external override returns (bool) { } function canSwap(address ins) internal view returns (bool) { } function _transfer(address from, address to, uint256 amount) internal returns (bool) { bool takeFee = true; require(to != address(0), "Cannot transfer to DEAD address"); require(from != address(0), "Cannot transfer from DEAD address"); require(amount > 0, "Transfer token amount must be greater than zero"); if (isExcludes(from,to)) { require(_tradeEnabled,"Trade is not started"); if(!_lpPairs[to] && from != address(this) && to != address(this) || checkTransfering(from,to) && !txLimitNotInEffect) { require(<FILL_ME>) }} if(checkSelling(from, to) && !_inswap && canSwap(from)) { uint256 tokenAmount = balanceOf(address(this)); if(tokenAmount >= swapTaxMin) { if(amount > swapTaxMin) swapBack(tokenAmount); } } if (_noInFees[from] || _noInFees[to]){ takeFee = false; } uint256 amountAfterFee = (takeFee) ? getValues(from, checkBuying(from, to), checkSelling(from, to), amount) : amount; uint256 amountBeforeFee = (takeFee) ? amount : (!_tradeEnabled ? amount : 0); balance[from] -= amountBeforeFee; balance[to] += amountAfterFee; emit Transfer(from, to, amountAfterFee); return true; } }
balanceOf(to)+amount<=_maxTxSize,"_maxTxSize exceed"
450,319
balanceOf(to)+amount<=_maxTxSize