Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x9568bDFC0C438BCe88a7574e1107d693E0F06B5e
Balance 0 ETH
Nonce 1
Code Size 20627 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

20627 bytes
0x608060405234801561001057600080fd5b506004361061030b5760003560e01c8063715018a61161019d578063af465a27116100e9578063dd62ed3e116100a2578063f820f5671161007c578063f820f56714610950578063f8afaba51461096e578063f91f825d1461098a578063ffa1ad74146109a65761030b565b8063dd62ed3e146108e8578063f19c4e3b14610918578063f2fde38b146109345761030b565b8063af465a2714610838578063b609995e14610856578063b7bda68f14610872578063bfcf735514610890578063d48e4127146108ae578063d8f67851146108cc5761030b565b806395d89b4111610156578063a457c2d711610130578063a457c2d71461079e578063a476df61146107ce578063a9059cbb146107ea578063a9d866851461081a5761030b565b806395d89b41146107445780639703a19d14610762578063a32f6976146107805761030b565b8063715018a6146106a4578063883356d9146106ae5780638da5cb5b146106cc5780638dac7191146106ea5780638e8c10a21461070857806393fbda99146107265761030b565b80632fa782eb1161025c5780634a88266c116102155780635514c832116101ef5780635514c8321461061a5780635a3990ce14610638578063614d08f81461065657806370a08231146106745761030b565b80634a88266c146105ae5780634ac0bc32146105de578063542e9667146105fc5761030b565b80632fa782eb146104ea578063313ce56714610508578063378dc3dc14610526578063395093511461054457806342966c681461057457806349a602db146105905761030b565b8063111e0376116102c957806323b872dd116102a357806323b872dd1461043c57806323bbbd6a1461046c5780632d8381191461049c5780632e0ee48e146104cc5761030b565b8063111e0376146103e4578063154af8e71461040057806318160ddd1461041e5761030b565b8062af2d9d1461031057806302252c4d14610340578063044ab74e1461035c57806306fdde031461037a578063095ea7b3146103985780630bd92756146103c8575b600080fd5b61032a60048036038101906103259190613f73565b6109c4565b6040516103379190613fe1565b60405180910390f35b61035a60048036038101906103559190613f73565b610a03565b005b610364610ac5565b604051610371919061408c565b60405180910390f35b610382610b53565b60405161038f919061408c565b60405180910390f35b6103b260048036038101906103ad91906140da565b610be5565b6040516103bf9190614135565b60405180910390f35b6103e260048036038101906103dd9190614150565b610c08565b005b6103fe60048036038101906103f99190614150565b610ebe565b005b610408610ed2565b604051610415919061423b565b60405180910390f35b610426610f60565b604051610433919061426c565b60405180910390f35b61045660048036038101906104519190614287565b610f6a565b6040516104639190614135565b60405180910390f35b61048660048036038101906104819190613f73565b6110c2565b6040516104939190613fe1565b60405180910390f35b6104b660048036038101906104b19190613f73565b611101565b6040516104c3919061426c565b60405180910390f35b6104d461115f565b6040516104e19190614135565b60405180910390f35b6104f2611179565b6040516104ff919061426c565b60405180910390f35b61051061117f565b60405161051d91906142f6565b60405180910390f35b61052e6111a7565b60405161053b919061426c565b60405180910390f35b61055e600480360381019061055991906140da565b6111cb565b60405161056b9190614135565b60405180910390f35b61058e60048036038101906105899190613f73565b611202565b005b610598611255565b6040516105a5919061426c565b60405180910390f35b6105c860048036038101906105c39190614150565b61125a565b6040516105d59190614135565b60405180910390f35b6105e661127a565b6040516105f39190614135565b60405180910390f35b610604611294565b604051610611919061426c565b60405180910390f35b61062261129a565b60405161062f919061426c565b60405180910390f35b61064061129f565b60405161064d9190614135565b60405180910390f35b61065e6112b9565b60405161066b919061408c565b60405180910390f35b61068e60048036038101906106899190614150565b6112f2565b60405161069b919061426c565b60405180910390f35b6106ac611413565b005b6106b6611425565b6040516106c39190614135565b60405180910390f35b6106d461143f565b6040516106e19190613fe1565b60405180910390f35b6106f2611469565b6040516106ff9190613fe1565b60405180910390f35b61071061148d565b60405161071d9190614135565b60405180910390f35b61072e6114a7565b60405161073b919061423b565b60405180910390f35b61074c611535565b604051610759919061408c565b60405180910390f35b61076a6115c7565b604051610777919061426c565b60405180910390f35b6107886115cd565b604051610795919061426c565b60405180910390f35b6107b860048036038101906107b391906140da565b6115f1565b6040516107c59190614135565b60405180910390f35b6107e860048036038101906107e39190614446565b611668565b005b61080460048036038101906107ff91906140da565b6116f8565b6040516108119190614135565b60405180910390f35b61082261184e565b60405161082f919061408c565b60405180910390f35b6108406118dc565b60405161084d919061426c565b60405180910390f35b610870600480360381019061086b9190614150565b6118eb565b005b61087a6118ff565b6040516108879190613fe1565b60405180910390f35b610898611925565b6040516108a591906144a8565b60405180910390f35b6108b661194b565b6040516108c3919061426c565b60405180910390f35b6108e660048036038101906108e19190613f73565b611951565b005b61090260048036038101906108fd91906144c3565b611a35565b60405161090f919061426c565b60405180910390f35b610932600480360381019061092d91906140da565b611abc565b005b61094e60048036038101906109499190614150565b611c02565b005b610958611c16565b6040516109659190614135565b60405180910390f35b61098860048036038101906109839190614150565b611c30565b005b6109a4600480360381019061099f9190613f73565b611dfc565b005b6109ae611e7b565b6040516109bb919061408c565b60405180910390f35b601181815481106109d457600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a0b6120a6565b610a1361129f565b610a49576040517f6273340f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f548111610a84576040517fa43d2d7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600f819055507f2905481c6fd1a037492016c4760435a52203d82a6f34dc3de40f464c1bf42d5981604051610aba919061426c565b60405180910390a150565b600e8054610ad290614532565b80601f0160208091040260200160405190810160405280929190818152602001828054610afe90614532565b8015610b4b5780601f10610b2057610100808354040283529160200191610b4b565b820191906000526020600020905b815481529060010190602001808311610b2e57829003601f168201915b505050505081565b606060038054610b6290614532565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8e90614532565b8015610bdb5780601f10610bb057610100808354040283529160200191610bdb565b820191906000526020600020905b815481529060010190602001808311610bbe57829003601f168201915b5050505050905090565b600080610bf0612124565b9050610bfd81858561212c565b600191505092915050565b610c106120a6565b601060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610c93576040517fed68fdd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b601180549050811015610eba578173ffffffffffffffffffffffffffffffffffffffff1660118281548110610cce57610ccd614563565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ea75760116001601180549050610d2891906145c1565b81548110610d3957610d38614563565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660118281548110610d7857610d77614563565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506011805480610e2a57610e296145f5565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558173ffffffffffffffffffffffffffffffffffffffff167f98bab529cae32acf2e47348750c372f438f475b15be0136f55544297ef96bd2c60405160405180910390a2610eba565b8080610eb290614624565b915050610c96565b5050565b610ec66120a6565b610ecf816122f5565b50565b6060600b805480602002602001604051908101604052809291908181526020018280548015610f5657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610f0c575b5050505050905090565b6000600254905090565b600080610f788585856125e4565b90506000610f8786868661271c565b90506000818386610f9891906145c1565b610fa291906145c1565b9050610fac61129f565b80156110025750601060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561106257600f5481611014886112f2565b61101e919061466c565b111561106157856040517ff6202a8f0000000000000000000000000000000000000000000000000000000081526004016110589190613fe1565b60405180910390fd5b5b600083146110985761109787601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856127fa565b5b600082146110ab576110aa87836128ce565b5b6110b6878783612934565b93505050509392505050565b600b81815481106110d257600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060075482111561113f576040517fc91fa8bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611149612963565b9050808361115791906146cf565b915050919050565b6000601260000160059054906101000a900460ff16905090565b60145481565b60007f0000000000000000000000000000000000000000000000000000000000000012905090565b7f0000000000000000000000000000000000000000000000000000000005f5e10081565b6000806111d6612124565b90506111f78185856111e88589611a35565b6111f2919061466c565b61212c565b600191505092915050565b61120a6120a6565b611212611425565b611248576040517f6cb5913900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61125233826128ce565b50565b606481565b60106020528060005260406000206000915054906101000a900460ff1681565b6000601260000160039054906101000a900460ff16905090565b60155481565b606481565b6000601260000160029054906101000a900460ff16905090565b6040518060400160405280601481526020017f44656669546f6b656e4669786564537570706c7900000000000000000000000081525081565b60007f00000000000000000000000000000000000000000000000000000000000000001561140257600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156113b357600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061140e565b6113fb600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611101565b905061140e565b61140b82612987565b90505b919050565b61141b6120a6565b6114236129cf565b565b6000601260000160009054906101000a900460ff16905090565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000b871443a912890d85e8b7e30bc9a4e38fe23383c81565b6000601260000160049054906101000a900460ff16905090565b6060601180548060200260200160405190810160405280929190818152602001828054801561152b57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116114e1575b5050505050905090565b60606004805461154490614532565b80601f016020809104026020016040519081016040528092919081815260200182805461157090614532565b80156115bd5780601f10611592576101008083540402835291602001916115bd565b820191906000526020600020905b8154815290600101906020018083116115a057829003601f168201915b5050505050905090565b60095481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806115fc612124565b9050600061160a8286611a35565b90508381101561164f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164690614772565b60405180910390fd5b61165c828686840361212c565b60019250505092915050565b6116706120a6565b611678611c16565b6116ae576040517f70a43fce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600e90816116bd919061493e565b507f4456a0b562609d67398ddb488f136db285cd3c92343e0a7ba684925669237ade816040516116ed919061408c565b60405180910390a150565b6000806117063385856125e4565b9050600061171533868661271c565b9050600081838661172691906145c1565b61173091906145c1565b905061173a61129f565b80156117905750601060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156117f057600f54816117a2886112f2565b6117ac919061466c565b11156117ef57856040517ff6202a8f0000000000000000000000000000000000000000000000000000000081526004016117e69190613fe1565b60405180910390fd5b5b600083146118265761182533601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856127fa565b5b600082146118395761183833836128ce565b5b61184386826129e3565b935050505092915050565b600d805461185b90614532565b80601f016020809104026020016040519081016040528092919081815260200182805461188790614532565b80156118d45780601f106118a9576101008083540402835291602001916118d4565b820191906000526020600020905b8154815290600101906020018083116118b757829003601f168201915b505050505081565b60006118e6610f60565b905090565b6118f36120a6565b6118fc81612a06565b50565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7e9644b70f31ddd94877033df9775f2e2e409d4e61702f7d28a47056ebaf340760001b81565b600f5481565b6119596120a6565b61196161148d565b611997576040517fcd9e529800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816009546015546119aa919061466c565b6119b4919061466c565b90506107d08111156119fd57806040517f3e474e0d0000000000000000000000000000000000000000000000000000000081526004016119f4919061426c565b60405180910390fd5b81601581905550817fc1ff65ee907dc079b64ed9913d53f4bd593bd6ebd9b2a2708db2916d49e17ec360405160405180910390a25050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611ac46120a6565b611acc61127a565b611b02576040517fc8a478a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081600954601554611b15919061466c565b611b1f919061466c565b90506107d0811115611b6857806040517f3e474e0d000000000000000000000000000000000000000000000000000000008152600401611b5f919061426c565b60405180910390fd5b611b718361200a565b82601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601481905550818373ffffffffffffffffffffffffffffffffffffffff167facc44e32fd5ca4240f6dbe6e8cf4eb49349c17c5ce5f80f1919a9c97b50d398a60405160405180910390a3505050565b611c0a6120a6565b611c1381612023565b50565b6000601260000160019054906101000a900460ff16905090565b611c386120a6565b601060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611cbc576040517ff20d03d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606460118054905010611cfb576040517fc92787fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506011819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f94f5dc0e322a0a7c5af09958609aeb2384692e22922827ff9595db226c01dfa560405160405180910390a250565b611e046120a6565b611e0c61115f565b611e42576040517f800e34b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e4b81612d50565b807f76e1296412dac7b50002658bf9aab02d0cfe366f373222d5c14d0168ee8199e360405160405180910390a250565b6040518060400160405280601581526020017f646566695f765f315f66697865645f737570706c79000000000000000000000081525081565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1a90614a5c565b60405180910390fd5b611f2f60008383612db1565b8060026000828254611f41919061466c565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611ff2919061426c565b60405180910390a361200660008383612db6565b5050565b8060601b6120205763d92e233d6000526004601cfd5b50565b61202b6120a6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361209a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209190614aee565b60405180910390fd5b6120a381612dbb565b50565b6120ae612124565b73ffffffffffffffffffffffffffffffffffffffff166120cc61143f565b73ffffffffffffffffffffffffffffffffffffffff1614612122576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211990614b5a565b60405180910390fd5b565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361219b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219290614bec565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361220a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220190614c7e565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516122e8919061426c565b60405180910390a3505050565b7f000000000000000000000000000000000000000000000000000000000000000061234c576040517f800e34b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156123d0576040517fe2f18de900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6064600b805490501061240f576040517ff266e36200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411156124e35761249f600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611101565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6001600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600b819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f743dcd4a012534912a3350f3ed8937d3b4f0771c62892ed15e4373dc2c5f584a60405160405180910390a250565b600080601454141580156126465750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561269c5750601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156126f25750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561271557612710601454836127089190614c9e565b61271291906146cf565b90505b9392505050565b6000806015541415801561277a5750601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156127d05750601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156127f357612710601554836127e69190614c9e565b6127f091906146cf565b90505b9392505050565b7f0000000000000000000000000000000000000000000000000000000000000000156128bd57600081146128b8576000612832612963565b9050600081836128429190614c9e565b905061285085858384612e81565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128ad919061426c565b60405180910390a350505b6128c9565b6128c8838383613031565b5b505050565b7f000000000000000000000000000000000000000000000000000000000000000015612926576040517f6cb5913900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61293082826132a7565b5050565b60008061293f612124565b905061294c858285613474565b612957858585613500565b60019150509392505050565b6000806000612970613877565b91509150808261298091906146cf565b9250505090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6129d76120a6565b6129e16000612dbb565b565b6000806129ee612124565b90506129fb818585613500565b600191505092915050565b7f0000000000000000000000000000000000000000000000000000000000000000612a5d576040517f800e34b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612ae0576040517f1214f5e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600b80549050811015612d4c578173ffffffffffffffffffffffffffffffffffffffff16600b8281548110612b1b57612b1a614563565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612d3957600b6001600b80549050612b7591906145c1565b81548110612b8657612b85614563565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600b8281548110612bc557612bc4614563565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600b805480612cbc57612cbb6145f5565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558173ffffffffffffffffffffffffffffffffffffffff167f9ccbe1146da67d2d78acc466156a4860eecd4209be8b75a9370e8bf3e949ed1f60405160405180910390a2612d4c565b8080612d4490614624565b915050612ae3565b5050565b7f0000000000000000000000000000000000000000000000000000000000000000612da7576040517f800e34b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060098190555050565b505050565b505050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015612f0e578381846040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401612f0593929190614ce0565b60405180910390fd5b82600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f5991906145c1565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612fe7919061466c565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036130a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161309790614d89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361310f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161310690614e1b565b60405180910390fd5b61311a838383612db1565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156131a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161319790614ead565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161328e919061426c565b60405180910390a36132a1848484612db6565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330d90614f3f565b60405180910390fd5b61332282600083612db1565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156133a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161339f90614fd1565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161345b919061426c565b60405180910390a361346f83600084612db6565b505050565b60006134808484611a35565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146134fa57818110156134ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134e39061503d565b60405180910390fd5b6134f9848484840361212c565b5b50505050565b7f0000000000000000000000000000000000000000000000000000000000000000156138665761352f8361200a565b6135388261200a565b60008103613572576040517f76c4f5b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156136155750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561362a5761362583838361388d565b613861565b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156136cd5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156136e2576136dd8383836139de565b613860565b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156137865750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561379b57613796838383613b2f565b61385f565b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561383d5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156138525761384d838383613bf2565b61385e565b61385d838383613b2f565b5b5b5b5b613872565b613871838383613031565b5b505050565b6000806007546138856118dc565b915091509091565b600061389a828585613dd1565b9050600081836138aa91906145c1565b905060008060006138bc868686613ea7565b925092509250600086146139d4576138d688888584612e81565b85600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392191906145c1565b600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061396e8286613efd565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef886040516139cb919061426c565b60405180910390a35b5050505050505050565b60006139eb828585613dd1565b9050600081836139fb91906145c1565b90506000806000613a0d868686613ea7565b92509250925060008614613b2557613a2788888584612e81565b83600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a72919061466c565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613abf8286613efd565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef88604051613b1c919061426c565b60405180910390a35b5050505050505050565b6000613b3c828585613dd1565b905060008183613b4c91906145c1565b90506000806000613b5e868686613ea7565b92509250925060008614613be857613b7888888584612e81565b613b828286613efd565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef88604051613bdf919061426c565b60405180910390a35b5050505050505050565b6000613bff828585613dd1565b905060008183613c0f91906145c1565b90506000806000613c21868686613ea7565b92509250925060008614613dc757613c3b88888584612e81565b85600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613c8691906145c1565b600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613d14919061466c565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613d618286613efd565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef88604051613dbe919061426c565b60405180910390a35b5050505050505050565b6000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680613e745750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15613e825760009050613ea0565b61271060095485613e939190614c9e565b613e9d91906146cf565b90505b9392505050565b600080600080613eb5612963565b905060008188613ec59190614c9e565b905060008288613ed59190614c9e565b905060008388613ee59190614c9e565b90508282829650965096505050505093509350939050565b81600754613f0b91906145c1565b60078190555080600854613f1f919061466c565b6008819055505050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b613f5081613f3d565b8114613f5b57600080fd5b50565b600081359050613f6d81613f47565b92915050565b600060208284031215613f8957613f88613f33565b5b6000613f9784828501613f5e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613fcb82613fa0565b9050919050565b613fdb81613fc0565b82525050565b6000602082019050613ff66000830184613fd2565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561403657808201518184015260208101905061401b565b60008484015250505050565b6000601f19601f8301169050919050565b600061405e82613ffc565b6140688185614007565b9350614078818560208601614018565b61408181614042565b840191505092915050565b600060208201905081810360008301526140a68184614053565b905092915050565b6140b781613fc0565b81146140c257600080fd5b50565b6000813590506140d4816140ae565b92915050565b600080604083850312156140f1576140f0613f33565b5b60006140ff858286016140c5565b925050602061411085828601613f5e565b9150509250929050565b60008115159050919050565b61412f8161411a565b82525050565b600060208201905061414a6000830184614126565b92915050565b60006020828403121561416657614165613f33565b5b6000614174848285016140c5565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6141b281613fc0565b82525050565b60006141c483836141a9565b60208301905092915050565b6000602082019050919050565b60006141e88261417d565b6141f28185614188565b93506141fd83614199565b8060005b8381101561422e57815161421588826141b8565b9750614220836141d0565b925050600181019050614201565b5085935050505092915050565b6000602082019050818103600083015261425581846141dd565b905092915050565b61426681613f3d565b82525050565b6000602082019050614281600083018461425d565b92915050565b6000806000606084860312156142a05761429f613f33565b5b60006142ae868287016140c5565b93505060206142bf868287016140c5565b92505060406142d086828701613f5e565b9150509250925092565b600060ff82169050919050565b6142f0816142da565b82525050565b600060208201905061430b60008301846142e7565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61435382614042565b810181811067ffffffffffffffff821117156143725761437161431b565b5b80604052505050565b6000614385613f29565b9050614391828261434a565b919050565b600067ffffffffffffffff8211156143b1576143b061431b565b5b6143ba82614042565b9050602081019050919050565b82818337600083830152505050565b60006143e96143e484614396565b61437b565b90508281526020810184848401111561440557614404614316565b5b6144108482856143c7565b509392505050565b600082601f83011261442d5761442c614311565b5b813561443d8482602086016143d6565b91505092915050565b60006020828403121561445c5761445b613f33565b5b600082013567ffffffffffffffff81111561447a57614479613f38565b5b61448684828501614418565b91505092915050565b6000819050919050565b6144a28161448f565b82525050565b60006020820190506144bd6000830184614499565b92915050565b600080604083850312156144da576144d9613f33565b5b60006144e8858286016140c5565b92505060206144f9858286016140c5565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061454a57607f821691505b60208210810361455d5761455c614503565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145cc82613f3d565b91506145d783613f3d565b92508282039050818111156145ef576145ee614592565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600061462f82613f3d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361466157614660614592565b5b600182019050919050565b600061467782613f3d565b915061468283613f3d565b925082820190508082111561469a57614699614592565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006146da82613f3d565b91506146e583613f3d565b9250826146f5576146f46146a0565b5b828204905092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b600061475c602583614007565b915061476782614700565b604082019050919050565b6000602082019050818103600083015261478b8161474f565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026147f47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826147b7565b6147fe86836147b7565b95508019841693508086168417925050509392505050565b6000819050919050565b600061483b61483661483184613f3d565b614816565b613f3d565b9050919050565b6000819050919050565b61485583614820565b61486961486182614842565b8484546147c4565b825550505050565b600090565b61487e614871565b61488981848461484c565b505050565b5b818110156148ad576148a2600082614876565b60018101905061488f565b5050565b601f8211156148f2576148c381614792565b6148cc846147a7565b810160208510156148db578190505b6148ef6148e7856147a7565b83018261488e565b50505b505050565b600082821c905092915050565b6000614915600019846008026148f7565b1980831691505092915050565b600061492e8383614904565b9150826002028217905092915050565b61494782613ffc565b67ffffffffffffffff8111156149605761495f61431b565b5b61496a8254614532565b6149758282856148b1565b600060209050601f8311600181146149a85760008415614996578287015190505b6149a08582614922565b865550614a08565b601f1984166149b686614792565b60005b828110156149de578489015182556001820191506020850194506020810190506149b9565b868310156149fb57848901516149f7601f891682614904565b8355505b6001600288020188555050505b505050505050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000614a46601f83614007565b9150614a5182614a10565b602082019050919050565b60006020820190508181036000830152614a7581614a39565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614ad8602683614007565b9150614ae382614a7c565b604082019050919050565b60006020820190508181036000830152614b0781614acb565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614b44602083614007565b9150614b4f82614b0e565b602082019050919050565b60006020820190508181036000830152614b7381614b37565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614bd6602483614007565b9150614be182614b7a565b604082019050919050565b60006020820190508181036000830152614c0581614bc9565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000614c68602283614007565b9150614c7382614c0c565b604082019050919050565b60006020820190508181036000830152614c9781614c5b565b9050919050565b6000614ca982613f3d565b9150614cb483613f3d565b9250828202614cc281613f3d565b91508282048414831517614cd957614cd8614592565b5b5092915050565b6000606082019050614cf56000830186613fd2565b614d02602083018561425d565b614d0f604083018461425d565b949350505050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000614d73602583614007565b9150614d7e82614d17565b604082019050919050565b60006020820190508181036000830152614da281614d66565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000614e05602383614007565b9150614e1082614da9565b604082019050919050565b60006020820190508181036000830152614e3481614df8565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000614e97602683614007565b9150614ea282614e3b565b604082019050919050565b60006020820190508181036000830152614ec681614e8a565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614f29602183614007565b9150614f3482614ecd565b604082019050919050565b60006020820190508181036000830152614f5881614f1c565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000614fbb602283614007565b9150614fc682614f5f565b604082019050919050565b60006020820190508181036000830152614fea81614fae565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000615027601d83614007565b915061503282614ff1565b602082019050919050565b600060208201905081810360008301526150568161501a565b905091905056fea2646970667358221220893a6d53def3291828f9e79019464a6bf41e70aa3038d8cb6051226d858b30d164736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: No
DefiTokenFixedSupply.sol 470 lines
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { LibCommon } from "./lib/LibCommon.sol";
import { ReflectiveV3ERC20 } from "./ReflectiveV3ERC20.sol";

/// @title A Defi Token implementation with extended functionalities
/// @notice Implements ERC20 standards with additional features like tax and deflation
contract DefiTokenFixedSupply is ReflectiveV3ERC20, Ownable {
  // Constants
  uint256 private constant MAX_BPS_AMOUNT = 10_000;
  uint256 private constant MAX_ALLOWED_BPS = 2_000;
  uint256 public constant MAX_EXCLUSION_LIMIT = 100;
  string public constant VERSION = "defi_v_1_fixed_supply";
  string public constant CONTRACT_NAME = "DefiTokenFixedSupply";
  bytes32 public constant CONTRACT_HASH = 0x009644b70f31ddd94877033df9775f2e2e409d4e61702f7d28a47056ebaf3407;

  // State Variables
  string public initialDocumentUri;
  string public documentUri;
  uint256 public immutable initialSupply;
  uint256 public immutable initialMaxTokenAmountPerAddress;
  uint256 public maxTokenAmountPerAddress;

  mapping(address => bool) public isFeesAndLimitsExcluded;
  address[] public feesAndLimitsExcluded;

  /// @notice Configuration properties for the ERC20 token
  struct ERC20ConfigProps {
    bool _isBurnable;
    bool _isDocumentAllowed;
    bool _isMaxAmountOfTokensSet;
    bool _isTaxable;
    bool _isDeflationary;
    bool _isReflective;
  }
  ERC20ConfigProps private configProps;

  address public immutable initialTokenOwner;
  uint8 private immutable _decimals;
  address public taxAddress;
  uint256 public taxBPS;
  uint256 public deflationBPS;

  // Events
  event DocumentUriSet(string newDocUri);
  event MaxTokenAmountPerSet(uint256 newMaxTokenAmount);
  event TaxConfigSet(address indexed _taxAddress, uint256 indexed _taxBPS);
  event DeflationConfigSet(uint256 indexed _deflationBPS);
  event ReflectionConfigSet(uint256 indexed _feeBPS);
  event ExcludeFromFeesAndLimits(address indexed account);
  event IncludedInFeesAndLimits(address indexed account);

  // Custom Errors
  error InvalidMaxTokenAmount(uint256 maxTokenAmount);
  error InvalidDecimals(uint8 decimals);
  error MaxTokenAmountPerAddrLtPrevious();
  error DestBalanceExceedsMaxAllowed(address addr);
  error DocumentUriNotAllowed();
  error MaxTokenAmountNotAllowed();
  error TokenIsNotTaxable();
  error TokenIsNotDeflationary();
  error InvalidTotalBPS(uint256 bps);
  error InvalidReflectiveConfig();
  error AlreadyExcludedFromFeesAndLimits();
  error AlreadyIncludedInFeesAndLimits();
  error ReachedMaxExclusionLimit();

  /// @notice Constructor to initialize the DeFi token
  /// @param name_ Name of the token
  /// @param symbol_ Symbol of the token
  /// @param initialSupplyToSet Initial supply of tokens
  /// @param decimalsToSet Number of decimals for the token
  /// @param tokenOwner Address of the initial token owner
  /// @param customConfigProps Configuration properties for the token
  /// @param newDocumentUri URI for the document associated with the token
  /// @param _taxAddress Address where tax will be sent
  /// @param bpsParams array of BPS values in this order:
  ///           taxBPS = bpsParams[0],
  ///           deflationBPS = bpsParams[1],
  ///           rewardFeeBPS = bpsParams[2],
  /// @param amountParams array of amounts for amount specific config:
  ///           maxTokenAmount = amountParams[0], Maximum token amount per address

  constructor(
    string memory name_,
    string memory symbol_,
    uint256 initialSupplyToSet,
    uint8 decimalsToSet,
    address tokenOwner,
    ERC20ConfigProps memory customConfigProps,
    string memory newDocumentUri,
    address _taxAddress,
    uint256[3] memory bpsParams,
    uint256[1] memory amountParams
  )
    ReflectiveV3ERC20(
      name_,
      symbol_,
      tokenOwner,
      initialSupplyToSet,
      decimalsToSet,
      initialSupplyToSet != 0 ? bpsParams[2] : 0,
      customConfigProps._isReflective
    )
  {
    // reflection feature can't be used in combination with burning/deflation
    // or reflection config is invalid if no reflection BPS amount is provided
    if (
      (customConfigProps._isReflective &&
        (customConfigProps._isBurnable ||
          customConfigProps._isDeflationary)) ||
      (!customConfigProps._isReflective && bpsParams[2] != 0)
    ) {
      revert InvalidReflectiveConfig();
    }

    if (customConfigProps._isMaxAmountOfTokensSet) {
      if (amountParams[0] == 0) {
        revert InvalidMaxTokenAmount(amountParams[0]);
      }
    }
    if (decimalsToSet > 18) {
      revert InvalidDecimals(decimalsToSet);
    }

    bpsInitChecks(customConfigProps, bpsParams, _taxAddress);

    LibCommon.validateAddress(tokenOwner);

    taxAddress = _taxAddress;

    taxBPS = bpsParams[0];
    deflationBPS = bpsParams[1];
    initialSupply = initialSupplyToSet;
    initialMaxTokenAmountPerAddress = amountParams[0];
    initialDocumentUri = newDocumentUri;
    initialTokenOwner = tokenOwner;
    _decimals = decimalsToSet;
    configProps = customConfigProps;
    documentUri = newDocumentUri;
    maxTokenAmountPerAddress = amountParams[0];

    if (tokenOwner != msg.sender) {
      transferOwnership(tokenOwner);
    }
  }

  function bpsInitChecks(
    ERC20ConfigProps memory customConfigProps,
    uint256[3] memory bpsParams,
    address _taxAddress
  ) private pure {
    uint256 totalBPS = 0;
    if (customConfigProps._isTaxable) {
      LibCommon.validateAddress(_taxAddress);

      totalBPS += bpsParams[0];
    }
    if (customConfigProps._isDeflationary) {
      totalBPS += bpsParams[1];
    }
    if (customConfigProps._isReflective) {
      totalBPS += bpsParams[2];
    }
    if (totalBPS > MAX_ALLOWED_BPS) {
      revert InvalidTotalBPS(totalBPS);
    }
  }

  // Public and External Functions

  function getFeesAndLimitsExclusionList() external view returns (address[] memory) {
    return feesAndLimitsExcluded;
  }

  /// @notice Checks if the token is burnable
  /// @return True if the token can be burned
  function isBurnable() public view returns (bool) {
    return configProps._isBurnable;
  }

  function getRewardsExclusionList() public view returns (address[] memory) {
    return rewardsExcluded;
  }

  /// @notice Checks if the maximum amount of tokens per address is set
  /// @return True if there is a maximum limit for token amount per address
  function isMaxAmountOfTokensSet() public view returns (bool) {
    return configProps._isMaxAmountOfTokensSet;
  }

  /// @notice Checks if setting a document URI is allowed
  /// @return True if setting a document URI is allowed
  function isDocumentUriAllowed() public view returns (bool) {
    return configProps._isDocumentAllowed;
  }

  /// @notice Returns the number of decimals used for the token
  /// @return The number of decimals
  function decimals() public view virtual override returns (uint8) {
    return _decimals;
  }

  /// @notice Checks if the token is taxable
  /// @return True if the token has tax applied on transfers
  function isTaxable() public view returns (bool) {
    return configProps._isTaxable;
  }

  /// @notice Checks if the token is deflationary
  /// @return True if the token has deflation applied on transfers
  function isDeflationary() public view returns (bool) {
    return configProps._isDeflationary;
  }

  /// @notice Checks if the token is reflective
  /// @return True if the token has reflection (ie. holder rewards) applied on transfers
  function isReflective() public view returns (bool) {
    return configProps._isReflective;
  }

  /// @notice Sets a new document URI
  /// @dev Can only be called by the contract owner
  /// @param newDocumentUri The new URI to be set
  function setDocumentUri(string memory newDocumentUri) external onlyOwner {
    if (!isDocumentUriAllowed()) {
      revert DocumentUriNotAllowed();
    }
    documentUri = newDocumentUri;
    emit DocumentUriSet(newDocumentUri);
  }

  /// @notice Sets a new maximum token amount per address
  /// @dev Can only be called by the contract owner
  /// @param newMaxTokenAmount The new maximum token amount per address
  function setMaxTokenAmountPerAddress(
    uint256 newMaxTokenAmount
  ) external onlyOwner {
    if (!isMaxAmountOfTokensSet()) {
      revert MaxTokenAmountNotAllowed();
    }
    if (newMaxTokenAmount <= maxTokenAmountPerAddress) {
      revert MaxTokenAmountPerAddrLtPrevious();
    }

    maxTokenAmountPerAddress = newMaxTokenAmount;
    emit MaxTokenAmountPerSet(newMaxTokenAmount);
  }

  /// @notice Sets a new reflection fee
  /// @dev Can only be called by the contract owner
  /// @param _feeBPS The reflection fee in basis points
  function setReflectionConfig(uint256 _feeBPS) external onlyOwner {
    if (!isReflective()) {
      revert TokenIsNotReflective();
    }
    super._setReflectionFee(_feeBPS);

    emit ReflectionConfigSet(_feeBPS);
  }

  /// @notice Sets a new tax configuration
  /// @dev Can only be called by the contract owner
  /// @param _taxAddress The address where tax will be sent
  /// @param _taxBPS The tax rate in basis points
  function setTaxConfig(
    address _taxAddress,
    uint256 _taxBPS
  ) external onlyOwner {
    if (!isTaxable()) {
      revert TokenIsNotTaxable();
    }

    uint256 totalBPS = deflationBPS + tFeeBPS + _taxBPS;
    if (totalBPS > MAX_ALLOWED_BPS) {
      revert InvalidTotalBPS(totalBPS);
    }
    LibCommon.validateAddress(_taxAddress);
    taxAddress = _taxAddress;
    taxBPS = _taxBPS;
    emit TaxConfigSet(_taxAddress, _taxBPS);
  }

  /// @notice Sets a new deflation configuration
  /// @dev Can only be called by the contract owner
  /// @param _deflationBPS The deflation rate in basis points
  function setDeflationConfig(uint256 _deflationBPS) external onlyOwner {
    if (!isDeflationary()) {
      revert TokenIsNotDeflationary();
    }
    uint256 totalBPS = deflationBPS + tFeeBPS + _deflationBPS;
    if (totalBPS > MAX_ALLOWED_BPS) {
      revert InvalidTotalBPS(totalBPS);
    }
    deflationBPS = _deflationBPS;
    emit DeflationConfigSet(_deflationBPS);
  }

  /// @notice Transfers tokens to a specified address
  /// @dev Overrides the ERC20 transfer function with added tax and deflation logic
  /// @param to The address to transfer tokens to
  /// @param amount The amount of tokens to be transferred
  /// @return True if the transfer was successful
  function transfer(
    address to,
    uint256 amount
  ) public virtual override returns (bool) {
    uint256 taxAmount = _taxAmount(msg.sender, to, amount);
    uint256 deflationAmount = _deflationAmount(msg.sender, to, amount);
    uint256 amountToTransfer = amount - taxAmount - deflationAmount;

    if (isMaxAmountOfTokensSet() && !isFeesAndLimitsExcluded[to]) {
      if (balanceOf(to) + amountToTransfer > maxTokenAmountPerAddress) {
        revert DestBalanceExceedsMaxAllowed(to);
      }
    }

    if (taxAmount != 0) {
      _transferNonReflectedTax(msg.sender, taxAddress, taxAmount);
    }
    if (deflationAmount != 0) {
      _burn(msg.sender, deflationAmount);
    }
    return super.transfer(to, amountToTransfer);
  }

  /// @notice Transfers tokens from one address to another
  /// @dev Overrides the ERC20 transferFrom function with added tax and deflation logic
  /// @param from The address which you want to send tokens from
  /// @param to The address which you want to transfer to
  /// @param amount The amount of tokens to be transferred
  /// @return True if the transfer was successful
  function transferFrom(
    address from,
    address to,
    uint256 amount
  ) public virtual override returns (bool) {
    uint256 taxAmount = _taxAmount(from, to, amount);
    uint256 deflationAmount = _deflationAmount(from, to, amount);
    uint256 amountToTransfer = amount - taxAmount - deflationAmount;

    if (isMaxAmountOfTokensSet() && !isFeesAndLimitsExcluded[to]) {
      if (balanceOf(to) + amountToTransfer > maxTokenAmountPerAddress) {
        revert DestBalanceExceedsMaxAllowed(to);
      }
    }

    if (taxAmount != 0) {
      _transferNonReflectedTax(from, taxAddress, taxAmount);
    }
    if (deflationAmount != 0) {
      _burn(from, deflationAmount);
    }

    return super.transferFrom(from, to, amountToTransfer);
  }

  /// @notice Burns a specific amount of tokens
  /// @dev Can only be called by the contract owner and if burning is enabled
  /// @param amount The amount of tokens to be burned
  function burn(uint256 amount) external onlyOwner {
    if (!isBurnable()) {
      revert BurningNotEnabled();
    }
    _burn(msg.sender, amount);
  }

  /// @notice Renounces ownership of the contract
  /// @dev Leaves the contract without an owner, disabling any functions that require the owner's authorization
  function renounceOwnership() public override onlyOwner {
    super.renounceOwnership();
  }

  /// @notice Transfers ownership of the contract to a new account
  /// @dev Can only be called by the current owner
  /// @param newOwner The address of the new owner
  function transferOwnership(address newOwner) public override onlyOwner {
    super.transferOwnership(newOwner);
  }

  /// @notice method for adding a new account to the exclusion list
  /// @param account account to add to the exclusion list
  /// @dev only callable by owner
  function excludeFromFeesAndLimits(
    address account
  ) external onlyOwner {
    if (isFeesAndLimitsExcluded[account]) {
      revert AlreadyExcludedFromFeesAndLimits();
    }
    if (feesAndLimitsExcluded.length >= MAX_EXCLUSION_LIMIT) {
      revert ReachedMaxExclusionLimit();
    }

    isFeesAndLimitsExcluded[account] = true;
    feesAndLimitsExcluded.push(account);

    emit ExcludeFromFeesAndLimits(account);
  }

  /// @notice method for adding a new account to the reflection exclusion list
  /// @param account account to add to the exclusion list
  /// @dev only callable by owner
  function excludeFromRewards(address account) external onlyOwner {
    super._excludeFromRewards(account);
  }

  /// @notice method for removing an account from the fees exclusion list
  /// @param account account to remove from the exclusion list
  /// @dev only callable by owner
  function includeInFeesAndLimits(address account) external onlyOwner() {
    if (!isFeesAndLimitsExcluded[account]) {
      revert AlreadyIncludedInFeesAndLimits();
    }

    for (uint256 i = 0; i < feesAndLimitsExcluded.length; i++) {
      if (feesAndLimitsExcluded[i] == account) {
        feesAndLimitsExcluded[i] = feesAndLimitsExcluded[feesAndLimitsExcluded.length - 1];
        isFeesAndLimitsExcluded[account] = false;
        feesAndLimitsExcluded.pop();
        emit IncludedInFeesAndLimits(account);

        break;
      }
    }
  }

  /// @notice method for removing an account from the reflection exclusion list
  /// @param account account to remove from the exclusion list
  /// @dev only callable by owner
  function includeInRewards(address account) external onlyOwner() {
    super._includeInRewards(account);
  }

  // Internal Functions

  /// @notice Calculates the tax amount for a transfer
  /// @param sender The address initiating the transfer
  /// @param recipient The address receiving the transfer
  /// @param amount The amount of tokens being transferred
  /// @return taxAmount The calculated tax amount
  function _taxAmount(
    address sender,
    address recipient,
    uint256 amount
  ) internal view returns (uint256 taxAmount) {
    taxAmount = 0;
    if (taxBPS != 0 && sender != taxAddress && !isFeesAndLimitsExcluded[sender] && !isFeesAndLimitsExcluded[recipient]) {
      taxAmount = (amount * taxBPS) / MAX_BPS_AMOUNT;
    }
  }

  /// @notice Calculates the deflation amount for a transfer
  /// @param sender The address initiating the transfer
  /// @param recipient The address receiving the transfer
  /// @param amount The amount of tokens being transferred
  /// @return deflationAmount The calculated deflation amount
  function _deflationAmount(
    address sender,
    address recipient,
    uint256 amount
  ) internal view returns (uint256 deflationAmount) {
    deflationAmount = 0;
    if (deflationBPS != 0 && !isFeesAndLimitsExcluded[sender] && !isFeesAndLimitsExcluded[recipient]) {
      deflationAmount = (amount * deflationBPS) / MAX_BPS_AMOUNT;
    }
  }
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. 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);
    }
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
LibCommon.sol 118 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

library LibCommon {
  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
  /*                       CUSTOM ERRORS                        */
  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

  /// @dev The ETH transfer has failed.
  error ETHTransferFailed();

  /// @dev The address is the zero address.
  error ZeroAddress();

  /// @notice raised when an ERC20 transfer fails
  error TransferFailed();

  /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
  /*                       ETH OPERATIONS                       */
  /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

  /// @notice Taken from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol)
  /// @dev Sends `amount` (in wei) ETH to `to`.
  /// Reverts upon failure.
  function safeTransferETH(address to, uint256 amount) internal {
    // solhint-disable-next-line no-inline-assembly
    assembly {
      // Transfer the ETH and check if it succeeded or not.
      if iszero(call(gas(), to, amount, 0, 0, 0, 0)) {
        // Store the function selector of `ETHTransferFailed()`.
        // bytes4(keccak256(bytes("ETHTransferFailed()"))) = 0xb12d13eb
        mstore(0x00, 0xb12d13eb)
        // Revert with (offset, size).
        revert(0x1c, 0x04)
      }
    }
  }

  /// @notice Validates that the address is not the zero address using assembly.
  /// @dev Reverts if the address is the zero address.
  function validateAddress(address addr) internal pure {
    // solhint-disable-next-line no-inline-assembly
    assembly {
      if iszero(shl(96, addr)) {
        // Store the function selector of `ZeroAddress()`.
        // bytes4(keccak256(bytes("ZeroAddress()"))) = 0xd92e233d
        mstore(0x00, 0xd92e233d)
        // Revert with (offset, size).
        revert(0x1c, 0x04)
      }
    }
  }

  /// @notice Helper function to transfer ERC20 tokens without the need for SafeERC20.
  /// @dev Reverts if the ERC20 transfer fails.
  /// @param tokenAddress The address of the ERC20 token.
  /// @param from The address to transfer the tokens from.
  /// @param to The address to transfer the tokens to.
  /// @param amount The amount of tokens to transfer.
  function safeTransferFrom(
    address tokenAddress,
    address from,
    address to,
    uint256 amount
  ) internal returns (bool) {
    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory data) = tokenAddress.call(
      abi.encodeWithSignature(
        "transferFrom(address,address,uint256)",
        from,
        to,
        amount
      )
    );
    if (!success) {
      if (data.length != 0) {
        // bubble up error
        // solhint-disable-next-line no-inline-assembly
        assembly {
          let returndata_size := mload(data)
          revert(add(32, data), returndata_size)
        }
      } else {
        revert TransferFailed();
      }
    }
    return true;
  }

  /// @notice Helper function to transfer ERC20 tokens without the need for SafeERC20.
  /// @dev Reverts if the ERC20 transfer fails.
  /// @param tokenAddress The address of the ERC20 token.
  /// @param to The address to transfer the tokens to.
  /// @param amount The amount of tokens to transfer.
  function safeTransfer(
    address tokenAddress,
    address to,
    uint256 amount
  ) internal returns (bool) {
    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory data) = tokenAddress.call(
      abi.encodeWithSignature("transfer(address,uint256)", to, amount)
    );
    if (!success) {
      if (data.length != 0) {
        // bubble up error
        // solhint-disable-next-line no-inline-assembly
        assembly {
          let returndata_size := mload(data)
          revert(add(32, data), returndata_size)
        }
      } else {
        revert TransferFailed();
      }
    }
    return true;
  }
}
ReflectiveV3ERC20.sol 429 lines
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { LibCommon } from "./lib/LibCommon.sol";

/// @title ERC20 Token with Extended Reflection Mechanism
/// @notice This contract implements ERC20 standards along with an additional reward feature for token holders
abstract contract ReflectiveV3ERC20 is ERC20 {
  // Constants
  uint256 private constant BPS_DIVISOR = 10_000;
  uint256 public constant MAX_REWARDS_EXCLUSION_LIMIT = 100;

  mapping(address => uint256) private _rOwned;
  mapping(address => uint256) private _tOwned;

  uint256 private constant UINT_256_MAX = type(uint256).max;
  uint256 private _rTotal;
  uint256 private _tFeeTotal;

  uint256 public tFeeBPS;
  bool private immutable isReflective;

  mapping (address => bool) private _isRewardsExcluded;
  address[] public rewardsExcluded;

  // events
  event ExcludedFromRewards(address indexed account);
  event IncludedInRewards(address indexed account);

  // custom errors
  error TokenIsNotReflective();
  error TotalReflectionTooSmall();
  error ZeroTransferError();
  error BurningNotEnabled();
  error ERC20InsufficientBalance(
    address recipient,
    uint256 fromBalance,
    uint256 balance
  );
  error AlreadyExcludedFromRewards();
  error AlreadyIncludedInRewards();
  error ReachedMaxRewardExclusionLimit();

  /// @notice Returns the total supply of the token
  /// @return The total supply of the token
  function _tTotal() public view virtual returns (uint256) {
    return totalSupply();
  }

  /// @notice Constructor to initialize the ReflectiveV2ERC20 token
  /// @param name_ The name of the token
  /// @param symbol_ The symbol of the token
  /// @param tokenOwner The address of the token owner
  /// @param totalSupply_ The initial total supply of the token
  /// @param decimalsToSet The number of decimal places for the token
  /// @param tFeeBPS_ The reflection fee in basis points
  /// @param isReflective_ Indicates if the token is reflective
  constructor(
    string memory name_,
    string memory symbol_,
    address tokenOwner,
    uint256 totalSupply_,
    uint8 decimalsToSet,
    uint256 tFeeBPS_,
    bool isReflective_
  ) ERC20(name_, symbol_) {
    if (totalSupply_ != 0) {
      super._mint(tokenOwner, totalSupply_ * 10 ** decimalsToSet);
      _rTotal = (UINT_256_MAX - (UINT_256_MAX % totalSupply_));
    }

    _rOwned[tokenOwner] = _rTotal;
    tFeeBPS = tFeeBPS_;
    isReflective = isReflective_;
  }

  /// @notice Returns the balance of tokens for a specific address
  /// @param account The address to query the balance of
  /// @return The balance of tokens
  function balanceOf(address account) public view override returns (uint256) {
    if (isReflective) {
      if (_isRewardsExcluded[account]) return _tOwned[account];

      return tokenFromReflection(_rOwned[account]);
    } else {
      return super.balanceOf(account);
    }
  }

  /// @notice Transfers tokens from one account to another
  /// @param from The address to transfer tokens from
  /// @param to The address to transfer tokens to
  /// @param value The amount of tokens to transfer
  /// @return A boolean indicating success
  function transferFrom(
    address from,
    address to,
    uint256 value
  ) public virtual override returns (bool) {
    address spender = super._msgSender();
    _spendAllowance(from, spender, value);
    _transfer(from, to, value);
    return true;
  }

  /// @notice Transfers tokens to a specified address
  /// @param to The address to transfer tokens to
  /// @param value The amount of tokens to transfer
  /// @return A boolean indicating success
  function transfer(
    address to,
    uint256 value
  ) public virtual override returns (bool) {
    address owner = super._msgSender();
    _transfer(owner, to, value);
    return true;
  }

  // override internal OZ standard ERC20 functions related to transfer

  /// @notice Internal function to transfer tokens from one account to another
  /// @param from The address to transfer tokens from
  /// @param to The address to transfer tokens to
  /// @param amount The amount of tokens to transfer
  function _transfer(
    address from,
    address to,
    uint256 amount
  ) internal override {
    if (isReflective) {
      LibCommon.validateAddress(from);
      LibCommon.validateAddress(to);
      if (amount == 0) {
        revert ZeroTransferError();
      }

      if (_isRewardsExcluded[from] && !_isRewardsExcluded[to]) {
          _transferFromExcluded(from, to, amount);
      } else if (!_isRewardsExcluded[from] && _isRewardsExcluded[to]) {
          _transferToExcluded(from, to, amount);
      } else if (!_isRewardsExcluded[from] && !_isRewardsExcluded[to]) {
          _transferStandard(from, to, amount);
      } else if (_isRewardsExcluded[from] && _isRewardsExcluded[to]) {
          _transferBothExcluded(from, to, amount);
      } else {
          _transferStandard(from, to, amount);
      }
    } else {
      super._transfer(from, to, amount);
    }
  }

  /// @notice Internal function to burn tokens, disallowed if reflection mechanism is used
  /// @param account The account to burn tokens from
  /// @param value The amount of tokens to burn
  function _burn(address account, uint256 value) internal override {
    if (isReflective) {
      revert BurningNotEnabled();
    } else {
      super._burn(account, value);
    }
  }

  /// @notice Sets a new reflection fee
  /// @dev Should only be called by the contract owner
  /// @param _tFeeBPS The reflection fee in basis points
  function _setReflectionFee(uint256 _tFeeBPS) internal {
    if (!isReflective) {
      revert TokenIsNotReflective();
    }

    tFeeBPS = _tFeeBPS;
  }

  /// @notice Calculates the number of tokens from a reflection amount
  /// @param rAmount The reflection amount
  /// @return The number of tokens corresponding to the reflection amount
  function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
    if (rAmount > _rTotal) {
      revert TotalReflectionTooSmall();
    }

    uint256 currentRate = _getRate();
    return rAmount / currentRate;
  }

  /// @notice Excludes an account from receiving rewards
  /// @param account The account to exclude from rewards
  function _excludeFromRewards(
    address account
  ) internal {
    if (!isReflective) {
      revert TokenIsNotReflective();
    }
    if (_isRewardsExcluded[account]) {
      revert AlreadyExcludedFromRewards();
    }
    if (rewardsExcluded.length >= MAX_REWARDS_EXCLUSION_LIMIT) {
      revert ReachedMaxRewardExclusionLimit();
    }

    if(_rOwned[account] > 0) {
        _tOwned[account] = tokenFromReflection(_rOwned[account]);
    }

    _isRewardsExcluded[account] = true;
    rewardsExcluded.push(account);

    emit ExcludedFromRewards(account);
  }

  /// @notice Includes an account to receive rewards
  /// @param account The account to include for rewards
  function _includeInRewards(address account) internal {
    if (!isReflective) {
      revert TokenIsNotReflective();
    }
    if (!_isRewardsExcluded[account]) {
      revert AlreadyIncludedInRewards();
    }

    for (uint256 i = 0; i < rewardsExcluded.length; i++) {
      if (rewardsExcluded[i] == account) {
        rewardsExcluded[i] = rewardsExcluded[rewardsExcluded.length - 1];
        _isRewardsExcluded[account] = false;
        _tOwned[account] = 0;
        rewardsExcluded.pop();
        emit IncludedInRewards(account);

        break;
      }
    }
  }

  /// @notice Transfers a standard amount of tokens with reflection applied
  /// @param sender The address sending the tokens
  /// @param recipient The address receiving the tokens
  /// @param tAmount The total token amount to transfer
  function _transferStandard(
    address sender,
    address recipient,
    uint256 tAmount
  ) private {
    uint256 tFee = calculateFee(tAmount, sender, recipient);
    uint256 tTransferAmount = tAmount - tFee;
    (uint256 rAmount, uint256 rFee, uint256 rTransferAmount) = _getRValues(
      tAmount,
      tFee,
      tTransferAmount
    );

    if (tAmount != 0) {
      _rUpdate(sender, recipient, rAmount, rTransferAmount);

      _reflectFee(rFee, tFee);
      emit Transfer(sender, recipient, tAmount);
    }
  }

  /// @notice Transfers a token amount from an excluded account
  /// @param sender The address sending the tokens
  /// @param recipient The address receiving the tokens
  /// @param tAmount The total token amount to transfer
  function _transferFromExcluded(
    address sender,
    address recipient,
    uint256 tAmount
  ) private {
    uint256 tFee = calculateFee(tAmount, sender, recipient);
    uint256 tTransferAmount = tAmount - tFee;
    (uint256 rAmount, uint256 rFee, uint256 rTransferAmount) = _getRValues(
      tAmount,
      tFee,
      tTransferAmount
    );

    if (tAmount != 0) {
      _rUpdate(sender, recipient, rAmount, rTransferAmount);
      _tOwned[sender] = _tOwned[sender] - (tAmount);

      _reflectFee(rFee, tFee);
      emit Transfer(sender, recipient, tAmount);
    }
  }

  /// @notice Transfers a token amount to an excluded account
  /// @param sender The address sending the tokens
  /// @param recipient The address receiving the tokens
  /// @param tAmount The total token amount to transfer
  function _transferToExcluded(
    address sender,
    address recipient,
    uint256 tAmount
  ) private {
    uint256 tFee = calculateFee(tAmount, sender, recipient);
    uint256 tTransferAmount = tAmount - tFee;
    (uint256 rAmount, uint256 rFee, uint256 rTransferAmount) = _getRValues(
      tAmount,
      tFee,
      tTransferAmount
    );

    if (tAmount != 0) {
      _rUpdate(sender, recipient, rAmount, rTransferAmount);
      _tOwned[recipient] = _tOwned[recipient] + (tTransferAmount);

      _reflectFee(rFee, tFee);
      emit Transfer(sender, recipient, tAmount);
    }
  }

  /// @notice Transfers a token amount between two excluded accounts
  /// @param sender The address sending the tokens
  /// @param recipient The address receiving the tokens
  /// @param tAmount The total token amount to transfer
  function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
    uint256 tFee = calculateFee(tAmount, sender, recipient);
    uint256 tTransferAmount = tAmount - tFee;
    (uint256 rAmount, uint256 rFee, uint256 rTransferAmount) = _getRValues(
      tAmount,
      tFee,
      tTransferAmount
    );

    if (tAmount != 0) {
      _rUpdate(sender, recipient, rAmount, rTransferAmount);
      _tOwned[sender] = _tOwned[sender] - (tAmount);
      _tOwned[recipient] = _tOwned[recipient] + (tTransferAmount);

      _reflectFee(rFee, tFee);
      emit Transfer(sender, recipient, tAmount);
    }
  }

  /// @notice Reflects the fee to all holders by deducting it from the total reflections
  /// @param rFee The reflection fee amount
  /// @param tFee The token fee amount
  function _reflectFee(uint256 rFee, uint256 tFee) private {
    _rTotal = _rTotal - rFee;
    _tFeeTotal = _tFeeTotal + tFee;
  }

  /// @notice Calculates the reflection fee from a token amount
  /// @param amount The token amount to calculate the fee from
  /// @param sender The address of the sender
  /// @param recipient The address of the recipient
  /// @return The calculated fee amount
  function calculateFee(uint256 amount, address sender, address recipient) private view returns (uint256) {
    if (_isRewardsExcluded[sender] || _isRewardsExcluded[recipient]) {
      return 0;
    } else {
      return (amount * tFeeBPS) / BPS_DIVISOR;
    }
  }

  /// @notice Transfers tokens without applying reflection fees
  /// @param from The address to transfer tokens from
  /// @param to The address to transfer tokens to
  /// @param tAmount The total token amount to transfer
  function _transferNonReflectedTax(
    address from,
    address to,
    uint256 tAmount
  ) internal {
    if (isReflective) {
      if (tAmount != 0) {
        uint256 currentRate = _getRate();
        uint256 rAmount = tAmount * currentRate;

        _rUpdate(from, to, rAmount, rAmount);
        emit Transfer(from, to, tAmount);
      }
    } else {
      super._transfer(from, to, tAmount);
    }
  }

  /// @notice Retrieves the reflection values from token values
  /// @param tAmount The token amount
  /// @param tFee The token fee amount
  /// @param tTransferAmount The transfer amount
  /// @return The reflection values (rAmount, rFee, rTransferAmount)
  function _getRValues(
    uint256 tAmount,
    uint256 tFee,
    uint256 tTransferAmount
  ) private view returns (uint256, uint256, uint256) {
    uint256 currentRate = _getRate();
    uint256 rAmount = tAmount * currentRate;
    uint256 rFee = tFee * currentRate;
    uint256 rTransferAmount = tTransferAmount * currentRate;

    return (rAmount, rFee, rTransferAmount);
  }

  /// @notice Retrieves the current reflection rate
  /// @return The current reflection rate
  function _getRate() private view returns (uint256) {
    (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
    return rSupply / tSupply;
  }

  /// @notice Retrieves the current reflection and token supplies
  /// @return The current reflection and token supplies
  function _getCurrentSupply() private view returns (uint256, uint256) {
    return (_rTotal, _tTotal());
  }

  /// @notice Updates the reflection balances for a transfer
  /// @param sender The address sending the tokens
  /// @param recipient The address receiving the tokens
  /// @param rSubAmount The amount to be deducted from the sender
  /// @param rTransferAmount The amount to be added to the recipient
  function _rUpdate(
    address sender,
    address recipient,
    uint256 rSubAmount,
    uint256 rTransferAmount
  ) private {
    uint256 fromBalance = _rOwned[sender];
    if (fromBalance < rSubAmount) {
      revert ERC20InsufficientBalance(recipient, fromBalance, rSubAmount);
    }
    _rOwned[sender] = _rOwned[sender] - rSubAmount;
    _rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
  }
}
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 "./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].
 *
 * 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 {}
}
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);
}
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

CONTRACT_HASH 0xbfcf7355 → bytes32
CONTRACT_NAME 0x614d08f8 → string
MAX_EXCLUSION_LIMIT 0x5514c832 → uint256
MAX_REWARDS_EXCLUSION_LIMIT 0x49a602db → uint256
VERSION 0xffa1ad74 → string
_tTotal 0xaf465a27 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
deflationBPS 0x542e9667 → uint256
documentUri 0x044ab74e → string
feesAndLimitsExcluded 0x00af2d9d → address
getFeesAndLimitsExclusionList 0x93fbda99 → address[]
getRewardsExclusionList 0x154af8e7 → address[]
initialDocumentUri 0xa9d86685 → string
initialMaxTokenAmountPerAddress 0xa32f6976 → uint256
initialSupply 0x378dc3dc → uint256
initialTokenOwner 0x8dac7191 → address
isBurnable 0x883356d9 → bool
isDeflationary 0x8e8c10a2 → bool
isDocumentUriAllowed 0xf820f567 → bool
isFeesAndLimitsExcluded 0x4a88266c → bool
isMaxAmountOfTokensSet 0x5a3990ce → bool
isReflective 0x2e0ee48e → bool
isTaxable 0x4ac0bc32 → bool
maxTokenAmountPerAddress 0xd48e4127 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
rewardsExcluded 0x23bbbd6a → address
symbol 0x95d89b41 → string
tFeeBPS 0x9703a19d → uint256
taxAddress 0xb7bda68f → address
taxBPS 0x2fa782eb → uint256
tokenFromReflection 0x2d838119 → uint256
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
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFeesAndLimits 0xf8afaba5
address account
excludeFromRewards 0x111e0376
address account
includeInFeesAndLimits 0x0bd92756
address account
includeInRewards 0xb609995e
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setDeflationConfig 0xd8f67851
uint256 _deflationBPS
setDocumentUri 0xa476df61
string newDocumentUri
setMaxTokenAmountPerAddress 0x02252c4d
uint256 newMaxTokenAmount
setReflectionConfig 0xf91f825d
uint256 _feeBPS
setTaxConfig 0xf19c4e3b
address _taxAddress
uint256 _taxBPS
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address