Address Contract Partially Verified
Address
0xB1C76Fbd9520964Be300A66679C3ac7dae32f744
Balance
0.311134 ETH
Nonce
1
Code Size
13523 bytes
Creator
0xC7989731...Ac4e at tx 0x93f9a1b9...90ccea
Indexed Transactions
0
Contract Bytecode
13523 bytes
0x60806040526004361061026b5760003560e01c80638da5cb5b11610144578063cf188ad0116100b6578063e9481eee1161007a578063e9481eee146107ca578063f11a24d3146107fa578063f2fde38b1461081c578063f63743421461083c578063f8b45b051461085e578063fc59d23d1461087457600080fd5b8063cf188ad01461070f578063d68f8cde1461072f578063dd62ed3e1461074f578063df8408fe14610795578063e086e5ec146107b557600080fd5b8063a457c2d711610108578063a457c2d714610649578063a9059cbb14610669578063aa49802314610689578063b62496f5146106a9578063c8c8ebe4146106d9578063cf089e13146106ef57600080fd5b80638da5cb5b146105b457806391c1004a146105d257806392136913146105f257806395d89b41146106145780639a7a23d61461062957600080fd5b806357e62b98116101dd57806375f0a874116101a157806375f0a874146104d75780637bce5a04146104f75780637c75ad3a1461052c5780637cf84bd71461055457806385af30c514610574578063894760691461059457600080fd5b806357e62b981461042b57806365b8dbc01461044c57806370a082311461046c578063715018a6146104a257806373b9e82c146104b757600080fd5b806323b872dd1161022f57806323b872dd1461034f5780632ae2f1211461036f578063313ce5671461038f57806339509351146103bb5780634707c551146103db5780635342acb4146103fb57600080fd5b806306e297121461027757806306fdde03146102bc578063095ea7b3146102de57806318160ddd1461030e5780631c499ab01461032d57600080fd5b3661027257005b600080fd5b34801561028357600080fd5b5061029f73fd6439aeff9d2389856b7486b9e74a6dacadcdce81565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102c857600080fd5b506102d161088a565b6040516102b39190612ff3565b3480156102ea57600080fd5b506102fe6102f936600461303b565b61091c565b60405190151581526020016102b3565b34801561031a57600080fd5b506002545b6040519081526020016102b3565b34801561033957600080fd5b5061034d610348366004613067565b610936565b005b34801561035b57600080fd5b506102fe61036a366004613080565b610a1a565b34801561037b57600080fd5b5061034d61038a3660046130cf565b610a40565b34801561039b57600080fd5b50600554600160a01b900460ff1660405160ff90911681526020016102b3565b3480156103c757600080fd5b506102fe6103d636600461303b565b610b24565b3480156103e757600080fd5b5061034d6103f63660046130cf565b610b63565b34801561040757600080fd5b506102fe610416366004613108565b600e6020526000908152604090205460ff1681565b34801561043757600080fd5b506007546102fe90600160a01b900460ff1681565b34801561045857600080fd5b5061034d610467366004613108565b610c9b565b34801561047857600080fd5b5061031f610487366004613108565b6001600160a01b031660009081526020819052604090205490565b3480156104ae57600080fd5b5061034d610fb1565b3480156104c357600080fd5b5061034d6104d2366004613067565b610fe7565b3480156104e357600080fd5b5060075461029f906001600160a01b031681565b34801561050357600080fd5b5060065461051990600160d81b900461ffff1681565b60405161ffff90911681526020016102b3565b34801561053857600080fd5b5061029f731ccfe8c40ef259566433716002e379dfffbf5a3e81565b34801561056057600080fd5b5060065461029f906001600160a01b031681565b34801561058057600080fd5b50600c5461029f906001600160a01b031681565b3480156105a057600080fd5b5061034d6105af366004613108565b61109c565b3480156105c057600080fd5b506005546001600160a01b031661029f565b3480156105de57600080fd5b5061034d6105ed366004613108565b61119d565b3480156105fe57600080fd5b5060065461051990600160c81b900461ffff1681565b34801561062057600080fd5b506102d16113ec565b34801561063557600080fd5b5061034d6106443660046130cf565b6113fb565b34801561065557600080fd5b506102fe61066436600461303b565b61142f565b34801561067557600080fd5b506102fe61068436600461303b565b6114cc565b34801561069557600080fd5b5061034d6106a4366004613067565b6114da565b3480156106b557600080fd5b506102fe6106c4366004613108565b600f6020526000908152604090205460ff1681565b3480156106e557600080fd5b5061031f600a5481565b3480156106fb57600080fd5b5061034d61070a36600461313c565b6115c0565b34801561071b57600080fd5b50600b5461029f906001600160a01b031681565b34801561073b57600080fd5b5061034d61074a36600461313c565b61173e565b34801561075b57600080fd5b5061031f61076a36600461316f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156107a157600080fd5b5061034d6107b03660046130cf565b6118bc565b3480156107c157600080fd5b5061034d611998565b3480156107d657600080fd5b506102fe6107e5366004613108565b600d6020526000908152604090205460ff1681565b34801561080657600080fd5b5060065461051990600160b81b900461ffff1681565b34801561082857600080fd5b5061034d610837366004613108565b611a6d565b34801561084857600080fd5b5060065461051990600160a81b900461ffff1681565b34801561086a57600080fd5b5061031f60095481565b34801561088057600080fd5b5061031f60085481565b6060600380546108999061319d565b80601f01602080910402602001604051908101604052809291908181526020018280546108c59061319d565b80156109125780601f106108e757610100808354040283529160200191610912565b820191906000526020600020905b8154815290600101906020018083116108f557829003601f168201915b5050505050905090565b60003361092a818585611b05565b60019150505b92915050565b6005546001600160a01b031633146109695760405162461bcd60e51b8152600401610960906131d7565b60405180910390fd5b61271061097560025490565b61097f9190613222565b8110156109d85760405162461bcd60e51b815260206004820152602160248201527f6d617857616c6c6574203e3d20746f74616c20737570706c79202f20313030306044820152600360fc1b6064820152608401610960565b6009546040805183815260208101929092527fff64d41f60feb77d52f64ae64a9fc3929d57a89d0cc55728762468bae5e0fe52910160405180910390a1600955565b600033610a28858285611c29565b610a33858585611cbb565b60019150505b9392505050565b6005546001600160a01b03163314610a6a5760405162461bcd60e51b8152600401610960906131d7565b6001600160a01b0382166000908152600d602052604090205481151560ff909116151503610ac45760405162461bcd60e51b8152602060048201526007602482015266616c726561647960c81b6044820152606401610960565b6001600160a01b0382166000818152600d6020908152604091829020805460ff191685151590811790915591519182527f82170bbd72c16b30c410014b7382121a699ed119a182e48a0b6cadcc89104ac991015b60405180910390a25050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061092a9082908690610b5e908790613244565b611b05565b6005546001600160a01b03163314610b8d5760405162461bcd60e51b8152600401610960906131d7565b6001600160a01b038216610be35760405162461bcd60e51b815260206004820152601b60248201527f6d61726b6574696e672077616c6c65742063616e2774206265203000000000006044820152606401610960565b600754604080518315158152600160a01b830460ff16151560208201526001600160a01b03928316928516917fc8dfdd9b91ac62ee1bd8be3541ea02d8e584461c794c6e49e94ccf21c71ebcca910160405180910390a360078054911515600160a01b026001600160a81b03199092166001600160a01b039093169283179190911790556000908152600e60209081526040808320805460ff199081166001908117909255600d909352922080549091169091179055565b6005546001600160a01b03163314610cc55760405162461bcd60e51b8152600401610960906131d7565b600b546001600160a01b0390811690821603610d2f5760405162461bcd60e51b815260206004820152602360248201527f54686520726f7574657220616c7265616479206861732074686174206164647260448201526265737360e81b6064820152608401610960565b600b546040516001600160a01b03918216918316907f8fc842bbd331dfa973645f4ed48b11683d501ebf1352708d77a5da2ab49a576e90600090a3600b80546001600160a01b0319166001600160a01b038316908117909155610d96903090600019611b05565b600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190613257565b6006546001600160a01b03908116911614610e9e57600654600b5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015610e78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9c9190613274565b505b600b546040805163c45a015560e01b815290516000926001600160a01b03169163c45a01559160048083019260209291908290030181865afa158015610ee8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0c9190613257565b6006546040516364e329cb60e11b81523060048201526001600160a01b03918216602482015291169063c9c65396906044016020604051808303816000875af1158015610f5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f819190613257565b600c80546001600160a01b0319166001600160a01b038316908117909155909150610fad906001612050565b5050565b6005546001600160a01b03163314610fdb5760405162461bcd60e51b8152600401610960906131d7565b610fe5600061214f565b565b6005546001600160a01b031633146110115760405162461bcd60e51b8152600401610960906131d7565b6000811161105a5760405162461bcd60e51b815260206004820152601660248201527506d696e416d6f756e74546f54616b65466565203e20360541b6044820152606401610960565b6008546040805183815260208101929092527f772a06bc936eb749842080c472181e970cd4f23bd1ab7d0b84a80aec26910434910160405180910390a1600855565b6005546001600160a01b031633146110c65760405162461bcd60e51b8152600401610960906131d7565b6001600160a01b038116300361110c5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610960565b61119a6111216005546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015611165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111899190613291565b6001600160a01b03841691906121a1565b50565b6005546001600160a01b031633146111c75760405162461bcd60e51b8152600401610960906131d7565b600680546001600160a01b0319166001600160a01b0383811691909117909155600b546040805163c45a015560e01b81529051919092169163c45a01559160048083019260209291908290030181865afa158015611229573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124d9190613257565b6006546040516364e329cb60e11b81523060048201526001600160a01b03918216602482015291169063c9c65396906044016020604051808303816000875af115801561129e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c29190613257565b600c80546001600160a01b0319166001600160a01b03928316179055600b54604080516315ab88c960e31b81529051919092169163ad5c46489160048083019260209291908290030181865afa158015611320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113449190613257565b6006546001600160a01b039081169116146113d557600654600b5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af11580156113af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d39190613274565b505b600c5461119a906001600160a01b03166001612050565b6060600480546108999061319d565b6005546001600160a01b031633146114255760405162461bcd60e51b8152600401610960906131d7565b610fad8282612050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156114b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610960565b6114c18286868403611b05565b506001949350505050565b60003361092a818585611cbb565b6005546001600160a01b031633146115045760405162461bcd60e51b8152600401610960906131d7565b61271061151060025490565b61151a9190613222565b81101561157e5760405162461bcd60e51b815260206004820152602c60248201527f6d61785472616e73616374696f6e416d6f756e74203e3d20746f74616c20737560448201526b070706c79202f2031303030360a41b6064820152608401610960565b600a546040805183815260208101929092527f35eec0711af6fbe3039535323be51b57996b6945b0d55862607c7a02e52e4507910160405180910390a1600a55565b6005546001600160a01b031633146115ea5760405162461bcd60e51b8152600401610960906131d7565b60065460c89061160590600160a81b900461ffff16846132aa565b61ffff1611156116495760405162461bcd60e51b815260206004820152600f60248201526e73656c6c20666565203c3d2032302560881b6044820152606401610960565b60065460c89061166490600160b81b900461ffff16836132aa565b61ffff1611156116a75760405162461bcd60e51b815260206004820152600e60248201526d62757920666565203c3d2032302560901b6044820152606401610960565b6006546040805161ffff85811682528481166020830152600160c81b8404811682840152600160d81b9093049092166060830152517f1d6b62961d401d548eb1549c97109c0b905ccd7af9c3777d3076cc8438fdfe659181900360800190a16006805463ffffffff60c81b1916600160c81b61ffff9485160261ffff60d81b191617600160d81b9290931691909102919091179055565b6005546001600160a01b031633146117685760405162461bcd60e51b8152600401610960906131d7565b60065460c89061178390600160c81b900461ffff16846132aa565b61ffff1611156117c75760405162461bcd60e51b815260206004820152600f60248201526e73656c6c20666565203c3d2032302560881b6044820152606401610960565b60065460c8906117e290600160d81b900461ffff16836132aa565b61ffff1611156118255760405162461bcd60e51b815260206004820152600e60248201526d62757920666565203c3d2032302560901b6044820152606401610960565b6006546040805161ffff85811682528481166020830152600160a81b8404811682840152600160b81b9093049092166060830152517f95c5c99557725e816faf752c6675d63483841c28a7a009ed792470a9cb4dea239181900360800190a16006805463ffffffff60a81b1916600160a81b61ffff9485160261ffff60b81b191617600160b81b9290931691909102919091179055565b6005546001600160a01b031633146118e65760405162461bcd60e51b8152600401610960906131d7565b6001600160a01b0382166000908152600e602052604090205481151560ff9091161515036119405760405162461bcd60e51b8152602060048201526007602482015266616c726561647960c81b6044820152606401610960565b6001600160a01b0382166000818152600e6020908152604091829020805460ff191685151590811790915591519182527f2d43abd87b27cee7b0aa8c6f7e0b4a3247b683262a83cbc2318b0df398a49aa99101610b18565b6005546001600160a01b031633146119c25760405162461bcd60e51b8152600401610960906131d7565b60006119d66005546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114611a20576040519150601f19603f3d011682016040523d82523d6000602084013e611a25565b606091505b505090508061119a5760405162461bcd60e51b815260206004820152601460248201527311985a5b1959081a5b881dda5d1a191c985dd85b60621b6044820152606401610960565b6005546001600160a01b03163314611a975760405162461bcd60e51b8152600401610960906131d7565b6001600160a01b038116611afc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610960565b61119a8161214f565b6001600160a01b038316611b675760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610960565b6001600160a01b038216611bc85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610960565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114611cb55781811015611ca85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610960565b611cb58484848403611b05565b50505050565b6001600160a01b038316611ce15760405162461bcd60e51b8152600401610960906132cc565b6001600160a01b038216611d075760405162461bcd60e51b815260040161096090613311565b306000908152602081905260409020546008546006549082101590600160a01b900460ff16158015611d515750600c546001600160a01b0316600090815260208190526040812054115b8015611d5a5750805b8015611d7e57506001600160a01b0384166000908152600f602052604090205460ff165b15611d8b57611d8b6121f8565b6006546000908190600160a01b900460ff16158015611dc357506001600160a01b0387166000908152600e602052604090205460ff16155b8015611de857506001600160a01b0386166000908152600e602052604090205460ff16155b15611f31576001600160a01b0387166000908152600f602052604090205460ff1615611e64576006546103e890611e2a90600160b81b900461ffff1687613354565b611e349190613222565b6006549092506103e890611e5390600160d81b900461ffff1687613354565b611e5d9190613222565b9050611ed7565b6001600160a01b0386166000908152600f602052604090205460ff1615611ed7576006546103e890611ea190600160a81b900461ffff1687613354565b611eab9190613222565b6006549092506103e890611eca90600160c81b900461ffff1687613354565b611ed49190613222565b90505b6000611ee38284613244565b90508015611ef657611ef6883083612891565b81611f01848861336b565b611f0b919061336b565b955082601054611f1b9190613244565b601055601154611f2c908390613244565b601155505b611f3c878787612891565b600654600160a01b900460ff16612047576001600160a01b0387166000908152600d602052604090205460ff16611fbe57600a548510611fbe5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a2065786365656473207472616e73666572206c696d69740000006044820152606401610960565b6001600160a01b0386166000908152600d602052604090205460ff16612047576009546001600160a01b038716600090815260208190526040902054106120475760405162461bcd60e51b815260206004820152601f60248201527f45524332303a2065786365656473206d61782077616c6c6574206c696d6974006044820152606401610960565b50505050505050565b6001600160a01b0382166000908152600f602052604090205481151560ff9091161515036120e65760405162461bcd60e51b815260206004820152603860248201527f4175746f6d61746564206d61726b6574206d616b65722070616972206973206160448201527f6c72656164792073657420746f20746861742076616c756500000000000000006064820152608401610960565b6001600160a01b0382166000818152600f60209081526040808320805486151560ff199182168117909255600d84529382902080549094168117909355519182527fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab9101610b18565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526121f39084906129e5565b505050565b6006805460ff60a01b1916600160a01b179055306000908152602081905260408120549050600060115460105461222f9190613244565b905080158061223d57508082105b15612249575050612882565b6000600260105461225a9190613222565b90506000600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d59190613257565b6006546001600160a01b0390811691161461235b576006546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612332573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123569190613291565b61235d565b475b600754909150600090600160a01b900460ff1615612658576000601154846123859190613244565b905080156123965761239681612ab7565b600b54604080516315ab88c960e31b815290516000926001600160a01b03169163ad5c46489160048083019260209291908290030181865afa1580156123e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124049190613257565b6006546001600160a01b03908116911614612494576006546040516370a0823160e01b815230600482015285916001600160a01b0316906370a0823190602401602060405180830381865afa158015612461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124859190613291565b61248f919061336b565b61249e565b61249e844761336b565b9050600082601154836124b19190613354565b6124bb9190613222565b90506124c7818361336b565b9350801561265057600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125469190613257565b6006546001600160a01b039182169116036125f8576007546040516000916001600160a01b03169083908381818185875af1925050503d80600081146125a8576040519150601f19603f3d011682016040523d82523d6000602084013e6125ad565b606091505b5050905080156125f2576040805160008152602081018490527f6f92bce3e91466137aa4d5474fe565c002872fb18ed6af4a856959be0a81277a910160405180910390a15b50612650565b600754600654612615916001600160a01b039182169116836121a1565b6040805160008152602081018390527f6f92bce3e91466137aa4d5474fe565c002872fb18ed6af4a856959be0a81277a910160405180910390a15b5050506127dd565b82156126675761266783612ab7565b600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126de9190613257565b6006546001600160a01b0390811691161461276e576006546040516370a0823160e01b815230600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa15801561273b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275f9190613291565b612769919061336b565b612778565b612778824761336b565b601154909150156127dd576007546011546127a09130916001600160a01b0390911690611cbb565b60115460408051918252600060208301527f6f92bce3e91466137aa4d5474fe565c002872fb18ed6af4a856959be0a81277a910160405180910390a15b6000831180156127ed5750600081115b15612836576127fc8382612c86565b60408051848152602081018390527f28fc98272ce761178794ad6768050fea1648e07f1e2ffe15afd3a290f8381486910160405180910390a15b600060118190556010556005546001600160a01b03161561287c5761287c306128676005546001600160a01b031690565b30600090815260208190526040902054611cbb565b50505050505b6006805460ff60a01b19169055565b6001600160a01b0383166128b75760405162461bcd60e51b8152600401610960906132cc565b6001600160a01b0382166128dd5760405162461bcd60e51b815260040161096090613311565b6001600160a01b038316600090815260208190526040902054818110156129555760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610960565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061298c908490613244565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129d891815260200190565b60405180910390a3611cb5565b6000612a3a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612e4e9092919063ffffffff16565b8051909150156121f35780806020019051810190612a589190613274565b6121f35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610960565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612aec57612aec61337e565b6001600160a01b039283166020918202929092010152600654825191169082906001908110612b1d57612b1d61337e565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015612b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b9a9190613257565b6001600160a01b031681600181518110612bb657612bb661337e565b60200260200101516001600160a01b031603612c3b57600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790612c059085906000908690309042906004016133d8565b600060405180830381600087803b158015612c1f57600080fd5b505af1158015612c33573d6000803e3d6000fd5b505050505050565b600b54604051637274ca1b60e11b8152731ccfe8c40ef259566433716002e379dfffbf5a3e9163e4e9943691612c05916001600160a01b031690869060009087904290600401613414565b600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cfd9190613257565b6006546001600160a01b03918216911603612dac57600b5460405163f305d71960e01b815230600482015260248101849052600060448201819052606482015261dead60848201524260a48201526001600160a01b039091169063f305d71990839060c40160606040518083038185885af1158015612d80573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612da59190613453565b5050505050565b600b5460065460405162e8e33760e81b81523060048201526001600160a01b039182166024820152604481018590526064810184905260006084820181905260a482015261dead60c48201524260e482015291169063e8e3370090610104016060604051808303816000875af1158015612e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da59190613453565b6060612e5d8484600085612e65565b949350505050565b606082471015612ec65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610960565b6001600160a01b0385163b612f1d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610960565b600080866001600160a01b03168587604051612f399190613481565b60006040518083038185875af1925050503d8060008114612f76576040519150601f19603f3d011682016040523d82523d6000602084013e612f7b565b606091505b5091509150612f8b828286612f96565b979650505050505050565b60608315612fa5575081610a39565b825115612fb55782518084602001fd5b8160405162461bcd60e51b81526004016109609190612ff3565b60005b83811015612fea578181015183820152602001612fd2565b50506000910152565b6020815260008251806020840152613012816040850160208701612fcf565b601f01601f19169190910160400192915050565b6001600160a01b038116811461119a57600080fd5b6000806040838503121561304e57600080fd5b823561305981613026565b946020939093013593505050565b60006020828403121561307957600080fd5b5035919050565b60008060006060848603121561309557600080fd5b83356130a081613026565b925060208401356130b081613026565b929592945050506040919091013590565b801515811461119a57600080fd5b600080604083850312156130e257600080fd5b82356130ed81613026565b915060208301356130fd816130c1565b809150509250929050565b60006020828403121561311a57600080fd5b8135610a3981613026565b803561ffff8116811461313757600080fd5b919050565b6000806040838503121561314f57600080fd5b61315883613125565b915061316660208401613125565b90509250929050565b6000806040838503121561318257600080fd5b823561318d81613026565b915060208301356130fd81613026565b600181811c908216806131b157607f821691505b6020821081036131d157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008261323f57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156109305761093061320c565b60006020828403121561326957600080fd5b8151610a3981613026565b60006020828403121561328657600080fd5b8151610a39816130c1565b6000602082840312156132a357600080fd5b5051919050565b61ffff8181168382160190808211156132c5576132c561320c565b5092915050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b80820281158282048414176109305761093061320c565b818103818111156109305761093061320c565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156133cd5781516001600160a01b0316875295820195908201906001016133a8565b509495945050505050565b85815284602082015260a0604082015260006133f760a0830186613394565b6001600160a01b0394909416606083015250608001529392505050565b60018060a01b038616815284602082015283604082015260a06060820152600061344160a0830185613394565b90508260808301529695505050505050565b60008060006060848603121561346857600080fd5b8351925060208401519150604084015190509250925092565b60008251613493818460208701612fcf565b919091019291505056fea2646970667358221220767d7fea032b713d477493637bd9757be8b329934ba20e42b40e9d3c52ecbdd664736f6c63430008120033
Verified Source Code Partial Match
Compiler: v0.8.18+commit.87f61d96
EVM: paris
Optimization: Yes (200 runs)
StandardToken.sol 1672 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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);
}
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);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[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 = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* 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;
}
_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;
_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;
}
_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 Spend `amount` form the allowance of `owner` toward `spender`.
*
* 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 {}
}
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 Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
pragma solidity 0.8.18;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
interface IUniswapV2Pair {
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(
address indexed sender,
uint256 amount0,
uint256 amount1,
address indexed to
);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to)
external
returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB)
external
view
returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
function INIT_CODE_PAIR_HASH() external view returns (bytes32);
}
interface IUniswapV2Caller {
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
address router,
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
uint256 deadline
) external;
}
interface IFee {
function payFee(
uint256 _tokenType
) external payable;
}
contract StandardToken is ERC20, Ownable {
using SafeERC20 for IERC20;
uint256 private constant MAX = ~uint256(0);
IUniswapV2Caller public constant uniswapV2Caller =
IUniswapV2Caller(0x1CcFE8c40eF259566433716002E379dFfFbf5a3e);
IFee public constant feeContract = IFee(0xfd6439AEfF9d2389856B7486b9e74a6DacaDcDCe);
uint8 private _decimals;
///////////////////////////////////////////////////////////////////////////
address public baseTokenForPair;
bool private inSwapAndLiquify;
uint16 public sellLiquidityFee;
uint16 public buyLiquidityFee;
uint16 public sellMarketingFee;
uint16 public buyMarketingFee;
address public marketingWallet;
bool public isMarketingFeeBaseToken;
uint256 public minAmountToTakeFee;
uint256 public maxWallet;
uint256 public maxTransactionAmount;
IUniswapV2Router02 public mainRouter;
address public mainPair;
mapping(address => bool) public isExcludedFromMaxTransactionAmount;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public automatedMarketMakerPairs;
uint256 private _liquidityFeeTokens;
uint256 private _marketingFeeTokens;
event UpdateLiquidityFee(
uint16 newSellLiquidityFee,
uint16 newBuyLiquidityFee,
uint16 oldSellLiquidityFee,
uint16 oldBuyLiquidityFee
);
event UpdateMarketingFee(
uint16 newSellMarketingFee,
uint16 newBuyMarketingFee,
uint16 oldSellMarketingFee,
uint16 oldBuyMarketingFee
);
event UpdateMarketingWallet(
address indexed newMarketingWallet,
bool newIsMarketingFeeBaseToken,
address indexed oldMarketingWallet,
bool oldIsMarketingFeeBaseToken
);
event ExcludedFromMaxTransactionAmount(address indexed account, bool isExcluded);
event UpdateMinAmountToTakeFee(uint256 newMinAmountToTakeFee, uint256 oldMinAmountToTakeFee);
event SetAutomatedMarketMakerPair(address indexed pair, bool value);
event ExcludedFromFee(address indexed account, bool isEx);
event SwapAndLiquify(
uint256 tokensForLiquidity,
uint256 baseTokenForLiquidity
);
event MarketingFeeTaken(
uint256 marketingFeeTokens,
uint256 marketingFeeBaseTokenSwapped
);
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldRouter);
event UpdateMaxWallet(uint256 newMaxWallet, uint256 oldMaxWallet);
event UpdateMaxTransactionAmount(uint256 newMaxTransactionAmount, uint256 oldMaxTransactionAmount);
///////////////////////////////////////////////////////////////////////////////
constructor(
string memory _name,
string memory _symbol,
uint8 __decimals,
uint256 _totalSupply,
uint256 _maxWallet,
uint256 _maxTransactionAmount,
address[3] memory _accounts,
bool _isMarketingFeeBaseToken,
uint16[4] memory _fees
) payable ERC20(_name, _symbol) {
feeContract.payFee{value: msg.value}(1);
_decimals = __decimals;
_mint(msg.sender, _totalSupply );
baseTokenForPair=_accounts[2];
require(_accounts[0]!=address(0), "marketing wallet can not be 0");
require(_accounts[1]!=address(0), "Router address can not be 0");
require(_fees[0]+(_fees[2])<=200, "sell fee <= 20%");
require(_fees[1]+(_fees[3])<=200, "buy fee <= 20%");
marketingWallet=_accounts[0];
isMarketingFeeBaseToken=_isMarketingFeeBaseToken;
emit UpdateMarketingWallet(
marketingWallet,
isMarketingFeeBaseToken,
address(0),
false
);
mainRouter=IUniswapV2Router02(_accounts[1]);
if(baseTokenForPair != mainRouter.WETH()){
IERC20(baseTokenForPair).approve(address(mainRouter), MAX);
}
_approve(address(this), address(uniswapV2Caller), MAX);
_approve(address(this), address(mainRouter), MAX);
emit UpdateUniswapV2Router(address(mainRouter), address(0));
mainPair = IUniswapV2Factory(mainRouter.factory()).createPair(
address(this),
baseTokenForPair
);
require(_maxTransactionAmount>=_totalSupply / 10000, "maxTransactionAmount >= total supply / 10000");
require(_maxWallet>=_totalSupply / 10000, "maxWallet >= total supply / 10000");
maxWallet=_maxWallet;
emit UpdateMaxWallet(maxWallet, 0);
maxTransactionAmount=_maxTransactionAmount;
emit UpdateMaxTransactionAmount(maxTransactionAmount, 0);
sellLiquidityFee=_fees[0];
buyLiquidityFee=_fees[1];
emit UpdateLiquidityFee(sellLiquidityFee, buyLiquidityFee, 0, 0);
sellMarketingFee=_fees[2];
buyMarketingFee=_fees[3];
emit UpdateMarketingFee(
sellMarketingFee,
buyMarketingFee,
0,
0
);
minAmountToTakeFee=_totalSupply/10000;
emit UpdateMinAmountToTakeFee(minAmountToTakeFee, 0);
isExcludedFromFee[address(this)]=true;
isExcludedFromFee[marketingWallet]=true;
isExcludedFromFee[_msgSender()]=true;
isExcludedFromFee[address(0xdead)] = true;
isExcludedFromMaxTransactionAmount[address(0xdead)]=true;
isExcludedFromMaxTransactionAmount[address(this)]=true;
isExcludedFromMaxTransactionAmount[marketingWallet]=true;
isExcludedFromMaxTransactionAmount[_msgSender()]=true;
_setAutomatedMarketMakerPair(mainPair, true);
}
function decimals() public view override returns (uint8) {
return _decimals;
}
function updateUniswapV2Pair(address _baseTokenForPair) external onlyOwner {
baseTokenForPair = _baseTokenForPair;
mainPair = IUniswapV2Factory(mainRouter.factory()).createPair(
address(this),
baseTokenForPair
);
if(baseTokenForPair != mainRouter.WETH()){
IERC20(baseTokenForPair).approve(address(mainRouter), MAX);
}
_setAutomatedMarketMakerPair(mainPair, true);
}
function updateUniswapV2Router(address newAddress) public onlyOwner {
require(
newAddress != address(mainRouter),
"The router already has that address"
);
emit UpdateUniswapV2Router(newAddress, address(mainRouter));
mainRouter = IUniswapV2Router02(newAddress);
_approve(address(this), address(mainRouter), MAX);
if(baseTokenForPair != mainRouter.WETH()){
IERC20(baseTokenForPair).approve(address(mainRouter), MAX);
}
address _mainPair = IUniswapV2Factory(mainRouter.factory()).createPair(
address(this),
baseTokenForPair
);
mainPair = _mainPair;
_setAutomatedMarketMakerPair(mainPair, true);
}
/////////////////////////////////////////////////////////////////////////////////
modifier lockTheSwap() {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
function updateLiquidityFee(
uint16 _sellLiquidityFee,
uint16 _buyLiquidityFee
) external onlyOwner {
require(
_sellLiquidityFee + (sellMarketingFee) <= 200,
"sell fee <= 20%"
);
require(_buyLiquidityFee + (buyMarketingFee) <= 200, "buy fee <= 20%");
emit UpdateLiquidityFee(
_sellLiquidityFee,
_buyLiquidityFee,
sellLiquidityFee,
buyLiquidityFee
);
sellLiquidityFee = _sellLiquidityFee;
buyLiquidityFee = _buyLiquidityFee;
}
function updateMaxWallet(uint256 _maxWallet) external onlyOwner {
require(_maxWallet>=totalSupply() / 10000, "maxWallet >= total supply / 10000");
emit UpdateMaxWallet(_maxWallet, maxWallet);
maxWallet = _maxWallet;
}
function updateMaxTransactionAmount(uint256 _maxTransactionAmount)
external
onlyOwner
{
require(_maxTransactionAmount>=totalSupply() / 10000, "maxTransactionAmount >= total supply / 10000");
emit UpdateMaxTransactionAmount(_maxTransactionAmount, maxTransactionAmount);
maxTransactionAmount = _maxTransactionAmount;
}
function updateMarketingFee(
uint16 _sellMarketingFee,
uint16 _buyMarketingFee
) external onlyOwner {
require(
_sellMarketingFee + (sellLiquidityFee) <= 200,
"sell fee <= 20%"
);
require(_buyMarketingFee + (buyLiquidityFee) <= 200, "buy fee <= 20%");
emit UpdateMarketingFee(
_sellMarketingFee,
_buyMarketingFee,
sellMarketingFee,
buyMarketingFee
);
sellMarketingFee = _sellMarketingFee;
buyMarketingFee = _buyMarketingFee;
}
function updateMarketingWallet(
address _marketingWallet,
bool _isMarketingFeeBaseToken
) external onlyOwner {
require(_marketingWallet != address(0), "marketing wallet can't be 0");
emit UpdateMarketingWallet(_marketingWallet, _isMarketingFeeBaseToken,
marketingWallet, isMarketingFeeBaseToken);
marketingWallet = _marketingWallet;
isMarketingFeeBaseToken = _isMarketingFeeBaseToken;
isExcludedFromFee[_marketingWallet] = true;
isExcludedFromMaxTransactionAmount[_marketingWallet] = true;
}
function updateMinAmountToTakeFee(uint256 _minAmountToTakeFee)
external
onlyOwner
{
require(_minAmountToTakeFee > 0, "minAmountToTakeFee > 0");
emit UpdateMinAmountToTakeFee(_minAmountToTakeFee, minAmountToTakeFee);
minAmountToTakeFee = _minAmountToTakeFee;
}
function setAutomatedMarketMakerPair(address pair, bool value)
public
onlyOwner
{
_setAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
...
// [truncated — 58245 bytes total]
Read Contract
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
baseTokenForPair 0x7cf84bd7 → address
buyLiquidityFee 0xf11a24d3 → uint16
buyMarketingFee 0x7bce5a04 → uint16
decimals 0x313ce567 → uint8
feeContract 0x06e29712 → address
isExcludedFromFee 0x5342acb4 → bool
isExcludedFromMaxTransactionAmount 0xe9481eee → bool
isMarketingFeeBaseToken 0x57e62b98 → bool
mainPair 0x85af30c5 → address
mainRouter 0xcf188ad0 → address
marketingWallet 0x75f0a874 → address
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
minAmountToTakeFee 0xfc59d23d → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellLiquidityFee 0xf6374342 → uint16
sellMarketingFee 0x92136913 → uint16
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Caller 0x7c75ad3a → address
Write Contract 20 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0xdf8408fe
address account
bool isEx
excludeFromMaxTransactionAmount 0x2ae2f121
address account
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateLiquidityFee 0xd68f8cde
uint16 _sellLiquidityFee
uint16 _buyLiquidityFee
updateMarketingFee 0xcf089e13
uint16 _sellMarketingFee
uint16 _buyMarketingFee
updateMarketingWallet 0x4707c551
address _marketingWallet
bool _isMarketingFeeBaseToken
updateMaxTransactionAmount 0xaa498023
uint256 _maxTransactionAmount
updateMaxWallet 0x1c499ab0
uint256 _maxWallet
updateMinAmountToTakeFee 0x73b9e82c
uint256 _minAmountToTakeFee
updateUniswapV2Pair 0x91c1004a
address _baseTokenForPair
updateUniswapV2Router 0x65b8dbc0
address newAddress
withdrawETH 0xe086e5ec
No parameters
withdrawToken 0x89476069
address token
Recent Transactions
No transactions found for this address