Address Contract Verified
Address
0xe9Da5E227e3Fa4Fc933b5f540BE021e7EcC3Fd81
Balance
0 ETH
Nonce
1
Code Size
9846 bytes
Creator
0xA84dD31B...4A3a at tx 0x3818f70e...57e4fb
Indexed Transactions
0
Contract Bytecode
9846 bytes
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80638456cb591161010f578063b5e03155116100a2578063e3b2396411610071578063e3b239641461053a578063ed66a0ad14610556578063f2fde38b14610572578063f34eb0b81461058e576101e5565b8063b5e03155146104b0578063c459fbb8146104ce578063d46b136c146104ec578063dd62ed3e1461050a576101e5565b80639aeb4324116100de5780639aeb432414610428578063a457c2d714610432578063a9059cbb14610462578063afc1c23414610492576101e5565b80638456cb59146103c65780638544c53b146103d05780638da5cb5b146103ec57806395d89b411461040a576101e5565b806339509351116101875780635c975abb116101565780635c975abb1461035257806370a0823114610370578063715018a6146103a057806379cc6790146103aa576101e5565b806339509351146102e05780633f4ba83a1461031057806342966c681461031a5780635386682414610336576101e5565b806318160ddd116101c357806318160ddd1461025657806319233a561461027457806323b872dd14610292578063313ce567146102c2576101e5565b806306fdde03146101ea578063095ea7b314610208578063112c9d9814610238575b600080fd5b6101f26105aa565b6040516101ff9190611a3b565b60405180910390f35b610222600480360381019061021d9190611afb565b61063c565b60405161022f9190611b56565b60405180910390f35b61024061065f565b60405161024d9190611b56565b60405180910390f35b61025e610672565b60405161026b9190611b80565b60405180910390f35b61027c61067c565b6040516102899190611b56565b60405180910390f35b6102ac60048036038101906102a79190611b9b565b61068f565b6040516102b99190611b56565b60405180910390f35b6102ca6106be565b6040516102d79190611c0a565b60405180910390f35b6102fa60048036038101906102f59190611afb565b6106c7565b6040516103079190611b56565b60405180910390f35b6103186106fe565b005b610334600480360381019061032f9190611c25565b610717565b005b610350600480360381019061034b9190611c7e565b61072b565b005b61035a610750565b6040516103679190611b56565b60405180910390f35b61038a60048036038101906103859190611cab565b610766565b6040516103979190611b80565b60405180910390f35b6103a86107af565b005b6103c460048036038101906103bf9190611afb565b6107c3565b005b6103ce6107e3565b005b6103ea60048036038101906103e59190611d3d565b6107f5565b005b6103f46108df565b6040516104019190611d99565b60405180910390f35b610412610908565b60405161041f9190611a3b565b60405180910390f35b61043061099a565b005b61044c60048036038101906104479190611afb565b6109c7565b6040516104599190611b56565b60405180910390f35b61047c60048036038101906104779190611afb565b610a3e565b6040516104899190611b56565b60405180910390f35b61049a610a61565b6040516104a79190611b80565b60405180910390f35b6104b8610a73565b6040516104c59190611b80565b60405180910390f35b6104d6610a78565b6040516104e39190611b80565b60405180910390f35b6104f4610a7e565b6040516105019190611b80565b60405180910390f35b610524600480360381019061051f9190611db4565b610a84565b6040516105319190611b80565b60405180910390f35b610554600480360381019061054f9190611c7e565b610b0b565b005b610570600480360381019061056b9190611df4565b610b30565b005b61058c60048036038101906105879190611cab565b610b93565b005b6105a860048036038101906105a39190611c25565b610c16565b005b6060600480546105b990611e63565b80601f01602080910402602001604051908101604052809291908181526020018280546105e590611e63565b80156106325780601f1061060757610100808354040283529160200191610632565b820191906000526020600020905b81548152906001019060200180831161061557829003601f168201915b5050505050905090565b600080610647610c2d565b9050610654818585610c35565b600191505092915050565b600b60019054906101000a900460ff1681565b6000600354905090565b600b60029054906101000a900460ff1681565b60008061069a610c2d565b90506106a7858285610dfe565b6106b2858585610e8a565b60019150509392505050565b60006012905090565b6000806106d2610c2d565b90506106f38185856106e48589610a84565b6106ee9190611ec3565b610c35565b600191505092915050565b610706611103565b43600a81905550610715611181565b565b610728610722610c2d565b826111e3565b50565b610733611103565b80600b60006101000a81548160ff02191690831515021790555050565b60008060149054906101000a900460ff16905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6107b7611103565b6107c160006113b2565b565b6107d5826107cf610c2d565b83610dfe565b6107df82826111e3565b5050565b6107eb611103565b6107f3611476565b565b6107fd611103565b60005b828290508110156108da5760008383838181106108205761081f611ef7565b5b90506020020160208101906108359190611cab565b90506001600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe57f71636571365571c0eaeaeb54e1d9e0065804f056a57a2a29448524f7d18a816040516108be9190611d99565b60405180910390a15080806108d290611f26565b915050610800565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606005805461091790611e63565b80601f016020809104026020016040519081016040528092919081815260200182805461094390611e63565b80156109905780601f1061096557610100808354040283529160200191610990565b820191906000526020600020905b81548152906001019060200180831161097357829003601f168201915b5050505050905090565b6109a2611103565b6001600b60026101000a81548160ff0219169083151502179055506109c56107af565b565b6000806109d2610c2d565b905060006109e08286610a84565b905083811015610a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1c90611fe0565b60405180910390fd5b610a328286868403610c35565b60019250505092915050565b600080610a49610c2d565b9050610a56818585610e8a565b600191505092915050565b6d02f54e74c0d08367c2e70000000081565b600a81565b600a5481565b60095481565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610b13611103565b80600b60016101000a81548160ff02191690831515021790555050565b610b38611103565b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b610b9b611103565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612072565b60405180910390fd5b610c13816113b2565b50565b610c1e611103565b8060098190555050565b505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ca4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9b90612104565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a90612196565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610df19190611b80565b60405180910390a3505050565b6000610e0a8484610a84565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610e845781811015610e76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6d90612202565b60405180910390fd5b610e838484848403610c35565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090612294565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5f90612326565b60405180910390fd5b610f738383836114d9565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff1906123b8565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110ea9190611b80565b60405180910390a36110fd84848461187a565b50505050565b61110b610c2d565b73ffffffffffffffffffffffffffffffffffffffff166111296108df565b73ffffffffffffffffffffffffffffffffffffffff161461117f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117690612424565b60405180910390fd5b565b61118961187f565b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111cc610c2d565b6040516111d99190611d99565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611252576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611249906124b6565b60405180910390fd5b61125e826000836114d9565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156112e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112dc90612548565b60405180910390fd5b818103600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113999190611b80565b60405180910390a36113ad8360008461187a565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61147e6118c8565b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114c2610c2d565b6040516114cf9190611d99565b60405180910390a1565b60008103611513576040517f7713e26f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61151e838383610c28565b600b60029054906101000a900460ff166118755761153a610750565b80156115905750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156115c7576040517fab35696f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544314806116525750600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205443145b15611689576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690506000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050811561182657600b60009054906101000a900460ff168015611752575061175184611912565b5b15611789576040517f3d693ada00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b60019054906101000a900460ff1680156117a6575060095483115b156117dd576040517f3261c79200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b43600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611872565b80156118715743600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b50505b505050565b505050565b611887610750565b6118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd906125b4565b60405180910390fd5b565b6118d0610750565b15611910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190790612620565b60405180910390fd5b565b6000600a54600a6119239190611ec3565b431080611935575061193482611992565b5b801561198b5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b9050919050565b600080823b905060008163ffffffff1611915050919050565b600081519050919050565b600082825260208201905092915050565b60005b838110156119e55780820151818401526020810190506119ca565b60008484015250505050565b6000601f19601f8301169050919050565b6000611a0d826119ab565b611a1781856119b6565b9350611a278185602086016119c7565b611a30816119f1565b840191505092915050565b60006020820190508181036000830152611a558184611a02565b905092915050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611a9282611a67565b9050919050565b611aa281611a87565b8114611aad57600080fd5b50565b600081359050611abf81611a99565b92915050565b6000819050919050565b611ad881611ac5565b8114611ae357600080fd5b50565b600081359050611af581611acf565b92915050565b60008060408385031215611b1257611b11611a5d565b5b6000611b2085828601611ab0565b9250506020611b3185828601611ae6565b9150509250929050565b60008115159050919050565b611b5081611b3b565b82525050565b6000602082019050611b6b6000830184611b47565b92915050565b611b7a81611ac5565b82525050565b6000602082019050611b956000830184611b71565b92915050565b600080600060608486031215611bb457611bb3611a5d565b5b6000611bc286828701611ab0565b9350506020611bd386828701611ab0565b9250506040611be486828701611ae6565b9150509250925092565b600060ff82169050919050565b611c0481611bee565b82525050565b6000602082019050611c1f6000830184611bfb565b92915050565b600060208284031215611c3b57611c3a611a5d565b5b6000611c4984828501611ae6565b91505092915050565b611c5b81611b3b565b8114611c6657600080fd5b50565b600081359050611c7881611c52565b92915050565b600060208284031215611c9457611c93611a5d565b5b6000611ca284828501611c69565b91505092915050565b600060208284031215611cc157611cc0611a5d565b5b6000611ccf84828501611ab0565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611cfd57611cfc611cd8565b5b8235905067ffffffffffffffff811115611d1a57611d19611cdd565b5b602083019150836020820283011115611d3657611d35611ce2565b5b9250929050565b60008060208385031215611d5457611d53611a5d565b5b600083013567ffffffffffffffff811115611d7257611d71611a62565b5b611d7e85828601611ce7565b92509250509250929050565b611d9381611a87565b82525050565b6000602082019050611dae6000830184611d8a565b92915050565b60008060408385031215611dcb57611dca611a5d565b5b6000611dd985828601611ab0565b9250506020611dea85828601611ab0565b9150509250929050565b60008060408385031215611e0b57611e0a611a5d565b5b6000611e1985828601611ab0565b9250506020611e2a85828601611c69565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611e7b57607f821691505b602082108103611e8e57611e8d611e34565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611ece82611ac5565b9150611ed983611ac5565b9250828201905080821115611ef157611ef0611e94565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000611f3182611ac5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611f6357611f62611e94565b5b600182019050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000611fca6025836119b6565b9150611fd582611f6e565b604082019050919050565b60006020820190508181036000830152611ff981611fbd565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061205c6026836119b6565b915061206782612000565b604082019050919050565b6000602082019050818103600083015261208b8161204f565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006120ee6024836119b6565b91506120f982612092565b604082019050919050565b6000602082019050818103600083015261211d816120e1565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006121806022836119b6565b915061218b82612124565b604082019050919050565b600060208201905081810360008301526121af81612173565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b60006121ec601d836119b6565b91506121f7826121b6565b602082019050919050565b6000602082019050818103600083015261221b816121df565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061227e6025836119b6565b915061228982612222565b604082019050919050565b600060208201905081810360008301526122ad81612271565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006123106023836119b6565b915061231b826122b4565b604082019050919050565b6000602082019050818103600083015261233f81612303565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006123a26026836119b6565b91506123ad82612346565b604082019050919050565b600060208201905081810360008301526123d181612395565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061240e6020836119b6565b9150612419826123d8565b602082019050919050565b6000602082019050818103600083015261243d81612401565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006124a06021836119b6565b91506124ab82612444565b604082019050919050565b600060208201905081810360008301526124cf81612493565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006125326022836119b6565b915061253d826124d6565b604082019050919050565b6000602082019050818103600083015261256181612525565b9050919050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061259e6014836119b6565b91506125a982612568565b602082019050919050565b600060208201905081810360008301526125cd81612591565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b600061260a6010836119b6565b9150612615826125d4565b602082019050919050565b60006020820190508181036000830152612639816125fd565b905091905056fea2646970667358221220cf508656a231a9a93f1d190077522bacd2c64c9a37f6ee84b1ca56c78e78ef5464736f6c63430008110033
Verified Source Code Full Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
test.sol 218 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract GMFAM is Ownable, Pausable, ERC20, ERC20Burnable {
/** Total amount of tokens */
uint256 private constant TOTAL_SUPPLY = 100_000_000_000_000 ether;
/** Decentralized marketing (given through decentralized voting proposals for creative marketing activities) */
uint256 private constant DECENTRALIZED_MARKETING = 3_000_000_000_000 ether;
/** Reserve amount of tokens for future development */
uint256 private constant CEX_WALLET = 7_000_000_000_000 ether;
/** Allowlist + Collab Drops*/
uint256 private constant ALLOWLIST_COLLAB_DROPS = 15_000_000_000_000 ether;
/** Seedify Drops*/
uint256 private constant SEEDIFY_DROPS = 15_000_000_000_000 ether;
/** Uniswap liquidity pool */
uint256 public constant INITIAL_UNISWAP_LIQUIDITY =
60_000_000_000_000 ether;
/** Number of blocks to count as dead land */
uint256 public constant DEADBLOCK_COUNT = 10;
/** Developer wallet map with super access */
mapping(address => bool) private whitelist;
/** List of available pools */
mapping(address => bool) private poolList;
/** Used to watch for sandwiches */
mapping(address => uint) private _lastBlockTransfer;
/** Max buy amount per tx */
uint256 public MAX_BUY;
address private constant receiver =
0x286dc241d4423B67a275993d2960AFd180629568;
/** Deadblock start blocknum */
uint256 public deadblockStart;
/** Block contracts? */
bool private _blockContracts;
/** Limit buys? */
bool public _limitBuys;
/** Crowd control measures? */
bool public _unrestricted;
/** Emit on LP address set */
event LiquidityPoolSet(address);
/** Amount must be greater than zero */
error NoZeroTransfers();
/** Amount exceeds max transaction */
error LimitExceeded();
/** Not allowed */
error NotAllowed();
/** Paused */
error ContractPaused();
/** Reserve + Distribution must equal Total Supply (sanity check) */
error IncorrectSum();
constructor() ERC20("GMFAM", "GMFAM") Ownable() {
whitelist[msg.sender] = true;
_mint(receiver, TOTAL_SUPPLY);
_blockContracts = true;
_limitBuys = true;
_pause();
}
/**
* Sets pool addresseses for reference
* @param _val Uniswap V3 Pool address
* @dev Set this after initializing LP
*/
function setPools(address[] calldata _val) external onlyOwner {
for (uint256 i = 0; i < _val.length; i++) {
address _pool = _val[i];
poolList[_pool] = true;
emit LiquidityPoolSet(address(_pool));
}
}
/**
* Sets a supplied address as whitelisted or not
* @param _address Address to whitelist
* @param _allow Allow?
* @dev Revoke after setup completed
*/
function setAddressToWhiteList(
address _address,
bool _allow
) external onlyOwner {
whitelist[_address] = _allow;
}
/**
* Sets contract blocker
* @param _val Should we block contracts?
*/
function setBlockContracts(bool _val) external onlyOwner {
_blockContracts = _val;
}
/**
* Sets buy limiter
* @param _val Limited?
*/
function setLimitBuys(bool _val) external onlyOwner {
_limitBuys = _val;
}
/**
* Unleash GMFAM
*/
function unleashGMFAM() external onlyOwner {
_unrestricted = true;
renounceOwnership();
}
/**
* Pause activity
*/
function pause() external onlyOwner {
_pause();
}
/**
* Unpause activity
*/
function unpause() external onlyOwner {
deadblockStart = block.number;
_unpause();
}
function setMaxBuyAmount(uint256 value) external onlyOwner {
MAX_BUY = value;
}
/**
* Checks if address is contract
* @param _address Address in question
* @dev Contract will have codesize
*/
function _isContract(address _address) internal view returns (bool) {
uint32 size;
assembly {
size := extcodesize(_address)
}
return (size > 0);
}
/**
* Checks if address has inhuman reflexes or if it's a contract
* @param _address Address in question
*/
function _checkIfBot(address _address) internal view returns (bool) {
return
(block.number < DEADBLOCK_COUNT + deadblockStart ||
_isContract(_address)) && !whitelist[_address];
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Checks:
* - transfer amount is non-zero
* - contract is not paused.
* - whitelisted addresses allowed during pause to setup LP etc.
* - buy/sell are not executed during the same block to help alleviate sandwiches
* - buy amount does not exceed max buy during limited period
* - check for bots to alleviate snipes
*/
function _beforeTokenTransfer(
address sender,
address recipient,
uint256 amount
) internal override {
if (amount == 0) {
revert NoZeroTransfers();
}
super._beforeTokenTransfer(sender, recipient, amount);
if (_unrestricted) {
return;
}
if (paused() && !whitelist[sender]) {
revert ContractPaused();
}
// Watch for sandwich
if (
block.number == _lastBlockTransfer[sender] ||
block.number == _lastBlockTransfer[recipient]
) {
revert NotAllowed();
}
bool isBuy = poolList[sender];
bool isSell = poolList[recipient];
if (isBuy) {
// Watch for bots
if (_blockContracts && _checkIfBot(recipient)) {
revert NotAllowed();
}
// Watch for buys exceeding max during limited period
if (_limitBuys && amount > MAX_BUY) {
revert LimitExceeded();
}
_lastBlockTransfer[recipient] = block.number;
} else if (isSell) {
_lastBlockTransfer[sender] = block.number;
}
}
}
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.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/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 anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_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);
}
}
Pausable.sol 105 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
ERC20.sol 389 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/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].
*
* 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}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_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 value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
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 {}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}
ERC20Burnable.sol 39 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC20.sol";
import "../../../utils/Context.sol";
/**
* @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) public 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) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}
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);
}
Read Contract
DEADBLOCK_COUNT 0xb5e03155 → uint256
INITIAL_UNISWAP_LIQUIDITY 0xafc1c234 → uint256
MAX_BUY 0xd46b136c → uint256
_limitBuys 0x112c9d98 → bool
_unrestricted 0x19233a56 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
deadblockStart 0xc459fbb8 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
pause 0x8456cb59
No parameters
renounceOwnership 0x715018a6
No parameters
setAddressToWhiteList 0xed66a0ad
address _address
bool _allow
setBlockContracts 0x53866824
bool _val
setLimitBuys 0xe3b23964
bool _val
setMaxBuyAmount 0xf34eb0b8
uint256 value
setPools 0x8544c53b
address[] _val
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unleashGMFAM 0x9aeb4324
No parameters
unpause 0x3f4ba83a
No parameters
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address