Address Contract Verified
Address
0x6f313ecc2a711da33ee97ed0386B9Fc49232CAf1
Balance
0 ETH
Nonce
1
Code Size
9611 bytes
Creator
0xD5E3A53C...47F1 at tx 0x82b2588a...d9d3ee
Indexed Transactions
0
Contract Bytecode
9611 bytes
0x608060405234801561000f575f5ffd5b50600436106101a7575f3560e01c8063715018a6116100f7578063b152f6cf11610095578063c4d1510d1161006f578063c4d1510d14610495578063d92940b0146104b3578063dd62ed3e146104cf578063f2fde38b146104ff576101a7565b8063b152f6cf1461043d578063bed998501461045b578063bf120ae514610479576101a7565b806395364a84116100d157806395364a84146103a157806395d89b41146103bf578063a457c2d7146103dd578063a9059cbb1461040d576101a7565b8063715018a61461035d57806379cc6790146103675780638da5cb5b14610383576101a7565b8063393784bd1161016457806342966c681161013e57806342966c68146102e95780634c00de821461030557806363cea4501461032357806370a082311461032d576101a7565b8063393784bd14610281578063395093511461029d57806341e42f30146102cd576101a7565b806306fdde03146101ab578063095ea7b3146101c957806318160ddd146101f957806323b872dd14610217578063313ce56714610247578063386040ce14610265575b5f5ffd5b6101b361051b565b6040516101c091906118aa565b60405180910390f35b6101e360048036038101906101de919061195b565b6105ab565b6040516101f091906119b3565b60405180910390f35b6102016105cd565b60405161020e91906119db565b60405180910390f35b610231600480360381019061022c91906119f4565b6105d6565b60405161023e91906119b3565b60405180910390f35b61024f610604565b60405161025c9190611a5f565b60405180910390f35b61027f600480360381019061027a9190611aa2565b61060c565b005b61029b60048036038101906102969190611b0a565b61066c565b005b6102b760048036038101906102b2919061195b565b61070f565b6040516102c491906119b3565b60405180910390f35b6102e760048036038101906102e29190611b35565b610745565b005b61030360048036038101906102fe9190611b60565b610836565b005b61030d61084a565b60405161031a9190611b9a565b60405180910390f35b61032b610870565b005b61034760048036038101906103429190611b35565b610894565b60405161035491906119db565b60405180910390f35b6103656108d9565b005b610381600480360381019061037c919061195b565b6108ec565b005b61038b61090c565b6040516103989190611b9a565b60405180910390f35b6103a9610934565b6040516103b691906119b3565b60405180910390f35b6103c7610947565b6040516103d491906118aa565b60405180910390f35b6103f760048036038101906103f2919061195b565b6109d7565b60405161040491906119b3565b60405180910390f35b6104276004803603810190610422919061195b565b610a4c565b60405161043491906119b3565b60405180910390f35b610445610a6e565b60405161045291906119db565b60405180910390f35b610463610a7e565b6040516104709190611a5f565b60405180910390f35b610493600480360381019061048e9190611aa2565b610a91565b005b61049d610b3f565b6040516104aa9190611a5f565b60405180910390f35b6104cd60048036038101906104c89190611b0a565b610b51565b005b6104e960048036038101906104e49190611bb3565b610bf5565b6040516104f691906119db565b60405180910390f35b61051960048036038101906105149190611b35565b610c77565b005b60606004805461052a90611c1e565b80601f016020809104026020016040519081016040528092919081815260200182805461055690611c1e565b80156105a15780601f10610578576101008083540402835291602001916105a1565b820191905f5260205f20905b81548152906001019060200180831161058457829003601f168201915b5050505050905090565b5f5f6105b5610cf9565b90506105c2818585610d00565b600191505092915050565b5f600254905090565b5f5f6105e0610cf9565b90506105ed858285610ec3565b6105f8858585610f4e565b60019150509392505050565b5f6012905090565b610614611100565b80600a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b610674611100565b60648160ff1611156106bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106b290611c98565b60405180910390fd5b8060085f6101000a81548160ff021916908360ff1602179055507fd03dd6fcd20e54d62d359292aa8ebeda18a25a05600a0a0e81094d019be68f70816040516107049190611a5f565b60405180910390a150565b5f5f610719610cf9565b905061073a81858561072b8589610bf5565b6107359190611ce3565b610d00565b600191505092915050565b61074d611100565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b290611d60565b60405180910390fd5b80600860036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5ec962606a553fe24005724f741d888d37dc2b71f3e876353f4f7141859a10d68160405161082b9190611b9a565b60405180910390a150565b610847610841610cf9565b8261117e565b50565b600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610878611100565b5f600860026101000a81548160ff021916908315150217905550565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6108e1611100565b6108ea5f611341565b565b6108fe826108f8610cf9565b83610ec3565b610908828261117e565b5050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600860029054906101000a900460ff1681565b60606005805461095690611c1e565b80601f016020809104026020016040519081016040528092919081815260200182805461098290611c1e565b80156109cd5780601f106109a4576101008083540402835291602001916109cd565b820191905f5260205f20905b8154815290600101906020018083116109b057829003601f168201915b5050505050905090565b5f5f6109e1610cf9565b90505f6109ee8286610bf5565b905083811015610a33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2a90611dee565b60405180910390fd5b610a408286868403610d00565b60019250505092915050565b5f5f610a56610cf9565b9050610a63818585610f4e565b600191505092915050565b6b204fce5e3e2502611000000081565b600860019054906101000a900460ff1681565b610a99611100565b8060095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f236cdc208ea76cac6724e51467e74709215a9dd0c7a11e59443b4caafa35479e82604051610b3391906119b3565b60405180910390a25050565b60085f9054906101000a900460ff1681565b610b59611100565b60648160ff161115610ba0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9790611c98565b60405180910390fd5b80600860016101000a81548160ff021916908360ff1602179055507ff8cb58175f17ebfcffecf34bb81c065be2f3e0ff9b8d786974fc83db6873b82c81604051610bea9190611a5f565b60405180910390a150565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b610c7f611100565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ced576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce490611e7c565b60405180910390fd5b610cf681611341565b50565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6590611f0a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ddc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd390611f98565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610eb691906119db565b60405180910390a3505050565b5f610ece8484610bf5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610f485781811015610f3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3190612000565b60405180910390fd5b610f478484848403610d00565b5b50505050565b60095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615610fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fcf90612068565b60405180910390fd5b600860029054906101000a900460ff161561107757600a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d906120d0565b60405180910390fd5b5b5f6110828483611404565b90505f61108f8584611514565b90505f81838561109f91906120ee565b6110a991906120ee565b90505f81116110ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e49061216b565b60405180910390fd5b6110f88686836115c4565b505050505050565b611108610cf9565b73ffffffffffffffffffffffffffffffffffffffff1661112661090c565b73ffffffffffffffffffffffffffffffffffffffff161461117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611173906121d3565b60405180910390fd5b565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036111ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e390612261565b60405180910390fd5b6111f7825f83611830565b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561127a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611271906122ef565b60405180910390fd5b8181035f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161132991906119db565b60405180910390a361133c835f84611835565b505050565b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f5f5f90505f8390505f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415801561147c575061144c61090c565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b801561149857505f60085f9054906101000a900460ff1660ff16115b156115095761271061ffff1660085f9054906101000a900460ff1660ff16856114c1919061230d565b6114cb919061237b565b915081846114d991906120ee565b905061150885600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846115c4565b5b819250505092915050565b5f5f5f90505f8390505f600860019054906101000a900460ff1660ff1611801561156a57505f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b156115b95761271061ffff16600860019054906101000a900460ff1660ff1685611594919061230d565b61159e919061237b565b915081846115ac91906120ee565b90506115b8858361117e565b5b819250505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116299061241b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611697906124a9565b60405180910390fd5b6116ab838383611830565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561172e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172590612537565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161181791906119db565b60405180910390a361182a848484611835565b50505050565b505050565b505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61187c8261183a565b6118868185611844565b9350611896818560208601611854565b61189f81611862565b840191505092915050565b5f6020820190508181035f8301526118c28184611872565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6118f7826118ce565b9050919050565b611907816118ed565b8114611911575f5ffd5b50565b5f81359050611922816118fe565b92915050565b5f819050919050565b61193a81611928565b8114611944575f5ffd5b50565b5f8135905061195581611931565b92915050565b5f5f60408385031215611971576119706118ca565b5b5f61197e85828601611914565b925050602061198f85828601611947565b9150509250929050565b5f8115159050919050565b6119ad81611999565b82525050565b5f6020820190506119c65f8301846119a4565b92915050565b6119d581611928565b82525050565b5f6020820190506119ee5f8301846119cc565b92915050565b5f5f5f60608486031215611a0b57611a0a6118ca565b5b5f611a1886828701611914565b9350506020611a2986828701611914565b9250506040611a3a86828701611947565b9150509250925092565b5f60ff82169050919050565b611a5981611a44565b82525050565b5f602082019050611a725f830184611a50565b92915050565b611a8181611999565b8114611a8b575f5ffd5b50565b5f81359050611a9c81611a78565b92915050565b5f5f60408385031215611ab857611ab76118ca565b5b5f611ac585828601611914565b9250506020611ad685828601611a8e565b9150509250929050565b611ae981611a44565b8114611af3575f5ffd5b50565b5f81359050611b0481611ae0565b92915050565b5f60208284031215611b1f57611b1e6118ca565b5b5f611b2c84828501611af6565b91505092915050565b5f60208284031215611b4a57611b496118ca565b5b5f611b5784828501611914565b91505092915050565b5f60208284031215611b7557611b746118ca565b5b5f611b8284828501611947565b91505092915050565b611b94816118ed565b82525050565b5f602082019050611bad5f830184611b8b565b92915050565b5f5f60408385031215611bc957611bc86118ca565b5b5f611bd685828601611914565b9250506020611be785828601611914565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3557607f821691505b602082108103611c4857611c47611bf1565b5b50919050565b7f746f6f20686967680000000000000000000000000000000000000000000000005f82015250565b5f611c82600883611844565b9150611c8d82611c4e565b602082019050919050565b5f6020820190508181035f830152611caf81611c76565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611ced82611928565b9150611cf883611928565b9250828201905080821115611d1057611d0f611cb6565b5b92915050565b7f496e76616c6964206164647265737300000000000000000000000000000000005f82015250565b5f611d4a600f83611844565b9150611d5582611d16565b602082019050919050565b5f6020820190508181035f830152611d7781611d3e565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f611dd8602583611844565b9150611de382611d7e565b604082019050919050565b5f6020820190508181035f830152611e0581611dcc565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f611e66602683611844565b9150611e7182611e0c565b604082019050919050565b5f6020820190508181035f830152611e9381611e5a565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f611ef4602483611844565b9150611eff82611e9a565b604082019050919050565b5f6020820190508181035f830152611f2181611ee8565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f611f82602283611844565b9150611f8d82611f28565b604082019050919050565b5f6020820190508181035f830152611faf81611f76565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f611fea601d83611844565b9150611ff582611fb6565b602082019050919050565b5f6020820190508181035f83015261201781611fde565b9050919050565b7f66726f7a656e00000000000000000000000000000000000000000000000000005f82015250565b5f612052600683611844565b915061205d8261201e565b602082019050919050565b5f6020820190508181035f83015261207f81612046565b9050919050565b7f6e6f7420617070726f76656400000000000000000000000000000000000000005f82015250565b5f6120ba600c83611844565b91506120c582612086565b602082019050919050565b5f6020820190508181035f8301526120e7816120ae565b9050919050565b5f6120f882611928565b915061210383611928565b925082820390508181111561211b5761211a611cb6565b5b92915050565b7f6e657420616d6f756e74000000000000000000000000000000000000000000005f82015250565b5f612155600a83611844565b915061216082612121565b602082019050919050565b5f6020820190508181035f83015261218281612149565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6121bd602083611844565b91506121c882612189565b602082019050919050565b5f6020820190508181035f8301526121ea816121b1565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f61224b602183611844565b9150612256826121f1565b604082019050919050565b5f6020820190508181035f8301526122788161223f565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e5f8201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b5f6122d9602283611844565b91506122e48261227f565b604082019050919050565b5f6020820190508181035f830152612306816122cd565b9050919050565b5f61231782611928565b915061232283611928565b925082820261233081611928565b9150828204841483151761234757612346611cb6565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61238582611928565b915061239083611928565b9250826123a05761239f61234e565b5b828204905092915050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f612405602583611844565b9150612410826123ab565b604082019050919050565b5f6020820190508181035f830152612432816123f9565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f612493602383611844565b915061249e82612439565b604082019050919050565b5f6020820190508181035f8301526124c081612487565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f612521602683611844565b915061252c826124c7565b604082019050919050565b5f6020820190508181035f83015261254e81612515565b905091905056fea2646970667358221220d26bc90f012ca3ca113c19ece561a2b311bb70d62cca473c2fe72c10cf9c10dc64736f6c634300081c0033
Verified Source Code Full Match
Compiler: v0.8.28+commit.7893614a
EVM: cancun
Optimization: No
token.sol 875 lines
// File: contracts/contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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);
}
// File: contracts/contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
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);
}
// File: contracts/contracts/@openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
}
// File: contracts/contracts/@openzeppelin/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @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 {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead 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 ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
bool internal _royalty = false;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() external view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
/**
* @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 default value returned by this function, unless
* it's 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() external view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() external view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(
address account
) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @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
) external virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @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
) external virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return 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}.
*
* 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
) external virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @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
) external virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + 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 decreaseAllowance(
address spender,
uint256 subtractedValue
) external virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @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 {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(
fromBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, 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:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, 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 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @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 {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @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 {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"ERC20: insufficient allowance"
);
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @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 {}
}
// File: contracts/contracts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) external virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) external virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() external virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) external virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @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 nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}
// Authored By: Exotic Technology LTD
pragma solidity ^0.8.9;
contract GOIL is ERC20, ERC20Burnable, Ownable, ReentrancyGuard {
uint256 public constant TOKEN_SUPPLY = 10_000_000_000 * 10 ** 18; // 10 billion tokens
uint16 private constant FEE_DIVISOR = 10_000;
uint8 public royaltyRate = 0;
uint8 public burnRate = 0;
bool public isPresale = true;
address public royaltyRecipient;
mapping(address => bool) frozen;
mapping(address => bool) approvedAddresses;
event freezeEvent(address indexed holder, bool action);
event royaltyRateSet(uint8 newRate);
event burnRateSet(uint8 newBurnFee);
event royaltyRecipientSet(address newRecipient);
constructor() ERC20("GOIL", "GOIL") {
_mint(msg.sender, TOKEN_SUPPLY);
royaltyRecipient = msg.sender;
approveAddress(msg.sender, true);
}
function setBurnFee(uint8 _burnRate) external onlyOwner {
require(_burnRate <= 100, "too high"); // Burn fee in percentage (max 1%)
burnRate = _burnRate;
emit burnRateSet(_burnRate);
}
function freeze(address _address, bool _bool) external onlyOwner {
frozen[_address] = _bool;
emit freezeEvent(_address, _bool);
}
function approveAddress(address _address, bool _bool) public onlyOwner {
approvedAddresses[_address] = _bool;
}
function closePresale() external onlyOwner {
isPresale = false;
}
function setRoyaltyRate(uint8 _royaltyRate) external onlyOwner {
require(_royaltyRate <= 100, "too high");
royaltyRate = _royaltyRate;
emit royaltyRateSet(_royaltyRate);
}
function setRoyaltyRecipient(address _recipient) external onlyOwner {
require(_recipient != address(0), "Invalid address");
royaltyRecipient = _recipient;
emit royaltyRecipientSet(_recipient);
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(!frozen[from], "frozen");
if (isPresale) {
require(approvedAddresses[from], "not approved");
}
uint256 royaltyDeducted = _applyroyalty(from, amount);
uint256 burnDeducted = _applyBurnFee(from, amount);
uint256 netTransfer = amount - royaltyDeducted - burnDeducted;
require(netTransfer > 0, "net amount");
super._transfer(from, to, netTransfer);
}
function _applyBurnFee(
address from,
uint256 amount
) internal returns (uint256) {
uint256 burnAmount = 0;
uint256 amountAfterBurn = amount;
if (burnRate > 0 && from != address(0)) {
burnAmount = (amount * burnRate) / FEE_DIVISOR;
amountAfterBurn = amount - burnAmount;
_burn(from, burnAmount);
}
return burnAmount;
}
function _applyroyalty(
address from,
uint256 amount
) internal returns (uint256) {
uint256 royalty = 0;
uint256 amountAfterRoyalty = amount;
if (from != address(0) && from != owner() && royaltyRate > 0) {
royalty = (amount * royaltyRate) / FEE_DIVISOR;
amountAfterRoyalty = amount - royalty;
ERC20._transfer(from, royaltyRecipient, royalty);
}
return royalty;
}
}
Read Contract
TOKEN_SUPPLY 0xb152f6cf → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
burnRate 0xbed99850 → uint8
decimals 0x313ce567 → uint8
isPresale 0x95364a84 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
royaltyRate 0xc4d1510d → uint8
royaltyRecipient 0x4c00de82 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 15 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
approveAddress 0x386040ce
address _address
bool _bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
closePresale 0x63cea450
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
freeze 0xbf120ae5
address _address
bool _bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setBurnFee 0xd92940b0
uint8 _burnRate
setRoyaltyRate 0x393784bd
uint8 _royaltyRate
setRoyaltyRecipient 0x41e42f30
address _recipient
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address