Address Contract Partially Verified
Address
0x8681f2e1C2DeA934Eb63dB7cF56F0E7c977664D4
Balance
0 ETH
Nonce
1
Code Size
14867 bytes
Creator
0x1a0969e9...2825 at tx 0x0c6d7bcd...42697a
Indexed Transactions
0
Contract Bytecode
14867 bytes
0x6080604052600436106101fc575f3560e01c806395d89b411161010c578063c6a306471161009f578063cef851391161006e578063cef851391461070b578063dd62ed3e14610735578063e6be4a7214610771578063e96db1ef14610799578063f2fde38b146107c357610203565b8063c6a3064714610655578063c9d052301461067d578063cb4ca631146106b9578063ce831ed5146106f557610203565b8063bb85c6d1116100db578063bb85c6d1146105b5578063c1201864146105dd578063c2f34ada14610605578063c30adfd71461062d57610203565b806395d89b41146104eb578063a4d5b6f314610515578063a8a69b9d1461053d578063a9059cbb1461057957610203565b806342966c681161018f578063715018a61161015e578063715018a61461043157806375f0a87414610447578063781edb3c1461047157806379cc6790146104995780638da5cb5b146104c157610203565b806342966c681461037957806349bd5a5e146103a157806366a88d96146103cb57806370a08231146103f557610203565b8063212e3b2b116101cb578063212e3b2b146102c157806323b872dd146102e9578063313ce56714610325578063330124111461034f57610203565b806306fdde0314610207578063095ea7b3146102315780631694505e1461026d57806318160ddd1461029757610203565b3661020357005b5f5ffd5b348015610212575f5ffd5b5061021b6107eb565b60405161022891906129a1565b60405180910390f35b34801561023c575f5ffd5b5061025760048036038101906102529190612a56565b61087b565b6040516102649190612aae565b60405180910390f35b348015610278575f5ffd5b5061028161089d565b60405161028e9190612b22565b60405180910390f35b3480156102a2575f5ffd5b506102ab6108c1565b6040516102b89190612b4a565b60405180910390f35b3480156102cc575f5ffd5b506102e760048036038101906102e29190612b63565b6108ca565b005b3480156102f4575f5ffd5b5061030f600480360381019061030a9190612b8e565b61095e565b60405161031c9190612aae565b60405180910390f35b348015610330575f5ffd5b5061033961098c565b6040516103469190612bf9565b60405180910390f35b34801561035a575f5ffd5b50610363610994565b6040516103709190612bf9565b60405180910390f35b348015610384575f5ffd5b5061039f600480360381019061039a9190612b63565b6109a7565b005b3480156103ac575f5ffd5b506103b5610a63565b6040516103c29190612c21565b60405180910390f35b3480156103d6575f5ffd5b506103df610a87565b6040516103ec9190612b4a565b60405180910390f35b348015610400575f5ffd5b5061041b60048036038101906104169190612c3a565b610a8d565b6040516104289190612b4a565b60405180910390f35b34801561043c575f5ffd5b50610445610ad2565b005b348015610452575f5ffd5b5061045b610ae5565b6040516104689190612c21565b60405180910390f35b34801561047c575f5ffd5b5061049760048036038101906104929190612c8f565b610b0a565b005b3480156104a4575f5ffd5b506104bf60048036038101906104ba9190612a56565b610bb0565b005b3480156104cc575f5ffd5b506104d5610c6a565b6040516104e29190612c21565b60405180910390f35b3480156104f6575f5ffd5b506104ff610c92565b60405161050c91906129a1565b60405180910390f35b348015610520575f5ffd5b5061053b60048036038101906105369190612d2e565b610d22565b005b348015610548575f5ffd5b50610563600480360381019061055e9190612c3a565b610f72565b6040516105709190612aae565b60405180910390f35b348015610584575f5ffd5b5061059f600480360381019061059a9190612a56565b610f8f565b6040516105ac9190612aae565b60405180910390f35b3480156105c0575f5ffd5b506105db60048036038101906105d69190612c3a565b610fb1565b005b3480156105e8575f5ffd5b5061060360048036038101906105fe9190612b63565b6110ea565b005b348015610610575f5ffd5b5061062b60048036038101906106269190612d2e565b61117e565b005b348015610638575f5ffd5b50610653600480360381019061064e9190612da3565b61155d565b005b348015610660575f5ffd5b5061067b60048036038101906106769190612c8f565b611679565b005b348015610688575f5ffd5b506106a3600480360381019061069e9190612c3a565b61171f565b6040516106b09190612aae565b60405180910390f35b3480156106c4575f5ffd5b506106df60048036038101906106da9190612c3a565b61173c565b6040516106ec9190612aae565b60405180910390f35b348015610700575f5ffd5b50610709611759565b005b348015610716575f5ffd5b5061071f61192d565b60405161072c9190612b4a565b60405180910390f35b348015610740575f5ffd5b5061075b60048036038101906107569190612de1565b611933565b6040516107689190612b4a565b60405180910390f35b34801561077c575f5ffd5b5061079760048036038101906107929190612a56565b6119b5565b005b3480156107a4575f5ffd5b506107ad611b66565b6040516107ba9190612bf9565b60405180910390f35b3480156107ce575f5ffd5b506107e960048036038101906107e49190612c3a565b611b79565b005b6060600380546107fa90612e4c565b80601f016020809104026020016040519081016040528092919081815260200182805461082690612e4c565b80156108715780601f1061084857610100808354040283529160200191610871565b820191905f5260205f20905b81548152906001019060200180831161085457829003601f168201915b5050505050905090565b5f5f610885611bfd565b9050610892818585611c04565b600191505092915050565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b5f600254905090565b6108d2611c16565b5f8111610914576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090b90612ec6565b60405180910390fd5b5f6008549050816008819055507ff521ac26681f2082cd832d245ffb0df3132b4f18099e967f203be27e4b746f518183604051610952929190612ee4565b60405180910390a15050565b5f5f610968611bfd565b9050610975858285611c9d565b610980858585611d2f565b60019150509392505050565b5f6012905090565b600660149054906101000a900460ff1681565b806109b86109b3611bfd565b610a8d565b10156109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f090612f7b565b60405180910390fd5b610a0b610a04611bfd565b5f83611e1f565b610a13611bfd565b73ffffffffffffffffffffffffffffffffffffffff167ffd38818f5291bf0bb3a2a48aadc06ba8757865d1dabd804585338aab3009dcb682604051610a589190612b4a565b60405180910390a250565b7f00000000000000000000000036bfc45bfc6d3a45db4e81630bba15bdd62dc27681565b60085481565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610ada611c16565b610ae35f61218c565b565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b12611c16565b80600a5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167fb0e21c0d53f57d838a3a08178ccf2c29624b47bd4f5f1080f5b688603c48118860405160405180910390a35050565b610bc282610bbc611bfd565b83611c9d565b80610bcc83610a8d565b1015610c0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0490612f7b565b60405180910390fd5b610c18825f83611e1f565b8173ffffffffffffffffffffffffffffffffffffffff167ffd38818f5291bf0bb3a2a48aadc06ba8757865d1dabd804585338aab3009dcb682604051610c5e9190612b4a565b60405180910390a25050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610ca190612e4c565b80601f0160208091040260200160405190810160405280929190818152602001828054610ccd90612e4c565b8015610d185780601f10610cef57610100808354040283529160200191610d18565b820191905f5260205f20905b815481529060010190602001808311610cfb57829003601f168201915b5050505050905090565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d62611bfd565b73ffffffffffffffffffffffffffffffffffffffff1614610db8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daf90613009565b60405180910390fd5b5f5f90505b82829050811015610f6d575f610df9848484818110610ddf57610dde613027565b5b9050602002016020810190610df49190612c3a565b610a8d565b148015610e745750600b5f848484818110610e1757610e16613027565b5b9050602002016020810190610e2c9190612c3a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b15610f60576001600b5f858585818110610e9157610e90613027565b5b9050602002016020810190610ea69190612c3a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550828282818110610f0857610f07613027565b5b9050602002016020810190610f1d9190612c3a565b73ffffffffffffffffffffffffffffffffffffffff167f1949c029b7c5d8406c0e7fc85445095f98723eb8b5ce10cf00a0c688c7e369e760405160405180910390a25b8080600101915050610dbd565b505050565b600a602052805f5260405f205f915054906101000a900460ff1681565b5f5f610f99611bfd565b9050610fa6818585611d2f565b600191505092915050565b610fb9611c16565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101e906130c4565b60405180910390fd5b5f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fc17db519c06a38e30a448e03e08b3edec28a0a29d239f693ab94a6206a5ca63d60405160405180910390a35050565b6110f2611c16565b5f8111611134576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112b9061312c565b60405180910390fd5b5f6007549050816007819055507fa307a9ae7d5512e3add205b7fee6c3f9b8e4bcf8a3de7878041f9364b862bb678183604051611172929190612ee4565b60405180910390a15050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111be611bfd565b73ffffffffffffffffffffffffffffffffffffffff1614611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120b90613009565b60405180910390fd5b5f61121d61098c565b600a61122991906132a6565b600161123591906132f0565b90505f5f90505f5f90505b84849050811015611318575f61127c86868481811061126257611261613027565b5b90506020020160208101906112779190612c3a565b610a8d565b1480156112f75750600b5f86868481811061129a57611299613027565b5b90506020020160208101906112af9190612c3a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b1561130b5782826113089190613331565b91505b8080600101915050611240565b508061132330610a8d565b1015611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135b906133d4565b60405180910390fd5b5f5f90505b84849050811015611556575f6113a586868481811061138b5761138a613027565b5b90506020020160208101906113a09190612c3a565b610a8d565b1480156114205750600b5f8686848181106113c3576113c2613027565b5b90506020020160208101906113d89190612c3a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b15611549576001600b5f87878581811061143d5761143c613027565b5b90506020020160208101906114529190612c3a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506114d3308686848181106114b8576114b7613027565b5b90506020020160208101906114cd9190612c3a565b85611e1f565b8484828181106114e6576114e5613027565b5b90506020020160208101906114fb9190612c3a565b73ffffffffffffffffffffffffffffffffffffffff167fef90046b8142ea9ef9fbd7a5569b220918264e0b4a07f0103e11e3c21f999da6846040516115409190612b4a565b60405180910390a25b8080600101915050611369565b5050505050565b611565611c16565b60638260ff161115801561157d575060638160ff1611155b6115bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b390613462565b60405180910390fd5b5f600660149054906101000a900460ff1690505f600660159054906101000a900460ff16905083600660146101000a81548160ff021916908360ff16021790555082600660156101000a81548160ff021916908360ff1602179055507f0cdae21e5d34c631f2f4cb6e5554d779e5222802fcc0c0080aa458c92c9d0b8082600660149054906101000a900460ff1683600660159054906101000a900460ff1660405161166b9493929190613480565b60405180910390a150505050565b611681611c16565b8060095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f057dc60ecf6df48e0f4af40ef0f88074d41e0ce54a1fef20925cd23c6de0386060405160405180910390a35050565b600b602052805f5260405f205f915054906101000a900460ff1681565b6009602052805f5260405f205f915054906101000a900460ff1681565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611799611bfd565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e690613009565b60405180910390fd5b5f4790505f60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611839906134f0565b5f6040518083038185875af1925050503d805f8114611873576040519150601f19603f3d011682016040523d82523d5f602084013e611878565b606091505b50509050806118bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b39061354e565b60405180910390fd5b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f025dbd6ad989fe1a64db7dc049e29723ff9d35a97d84ae9aab96196f00ec1a00604051611921906135dc565b60405180910390a25050565b60075481565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166119f5611bfd565b73ffffffffffffffffffffffffffffffffffffffff1614611a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4290613009565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401611aa89291906135fa565b6020604051808303815f875af1158015611ac4573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ae89190613635565b905080611b2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b219061354e565b60405180910390fd5b7fdd970dd9b5bfe707922155b058a407655cb18288b807e2216442bca8ad83d6b582604051611b5991906136d0565b60405180910390a1505050565b600660159054906101000a900460ff1681565b611b81611c16565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611bf1575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611be89190612c21565b60405180910390fd5b611bfa8161218c565b50565b5f33905090565b611c11838383600161224f565b505050565b611c1e611bfd565b73ffffffffffffffffffffffffffffffffffffffff16611c3c610c6a565b73ffffffffffffffffffffffffffffffffffffffff1614611c9b57611c5f611bfd565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611c929190612c21565b60405180910390fd5b565b5f611ca88484611933565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611d295781811015611d1a578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401611d11939291906136fc565b60405180910390fd5b611d2884848484035f61224f565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d9f575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401611d969190612c21565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e0f575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401611e069190612c21565b60405180910390fd5b611e1a838383611e1f565b505050565b7f00000000000000000000000036bfc45bfc6d3a45db4e81630bba15bdd62dc27673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611ec457507f00000000000000000000000036bfc45bfc6d3a45db4e81630bba15bdd62dc27673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b8015611f68575060095f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1680611f66575060095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b155b8015611f805750600c5f9054906101000a900460ff16155b156120d357611f8d61098c565b600a611f9991906132a6565b600b611fa591906132f0565b81106120d2575f7f00000000000000000000000036bfc45bfc6d3a45db4e81630bba15bdd62dc27673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461202e576064600660159054906101000a900460ff1660ff168361201f91906132f0565b612029919061375e565b612059565b6064600660149054906101000a900460ff1660ff168361204e91906132f0565b612058919061375e565b5b90508082612067919061378e565b91507f00000000000000000000000036bfc45bfc6d3a45db4e81630bba15bdd62dc27673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036120c5576120c461241e565b5b6120d08430836124a5565b505b5b600a5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff168061213d575060085461212f83610a8d565b8261213a9190613331565b11155b61217c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121739061380b565b60405180910390fd5b6121878383836124a5565b505050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036122bf575f6040517fe602df050000000000000000000000000000000000000000000000000000000081526004016122b69190612c21565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361232f575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016123269190612c21565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015612418578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161240f9190612b4a565b60405180910390a35b50505050565b5f61242830610a8d565b905060075481106124a25761243c816126be565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f193505050501580156124a0573d5f5f3e3d5ffd5b505b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036124f5578060025f8282546124e99190613331565b925050819055506125c3565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561257e578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401612575939291906136fc565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361260a578060025f8282540392505081905550612654565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516126b19190612b4a565b60405180910390a3505050565b6001600c5f6101000a81548160ff0219169083151502179055505f600267ffffffffffffffff8111156126f4576126f3613829565b5b6040519080825280602002602001820160405280156127225781602001602082028036833780820191505090505b50905030815f8151811061273957612738613027565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127dc573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612800919061386a565b8160018151811061281457612813613027565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612879307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611c04565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac947835f843061012c426128c79190613331565b6040518663ffffffff1660e01b81526004016128e7959493929190613985565b5f604051808303815f87803b1580156128fe575f5ffd5b505af1158015612910573d5f5f3e3d5ffd5b50505050505f600c5f6101000a81548160ff02191690831515021790555050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61297382612931565b61297d818561293b565b935061298d81856020860161294b565b61299681612959565b840191505092915050565b5f6020820190508181035f8301526129b98184612969565b905092915050565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6129f2826129c9565b9050919050565b612a02816129e8565b8114612a0c575f5ffd5b50565b5f81359050612a1d816129f9565b92915050565b5f819050919050565b612a3581612a23565b8114612a3f575f5ffd5b50565b5f81359050612a5081612a2c565b92915050565b5f5f60408385031215612a6c57612a6b6129c1565b5b5f612a7985828601612a0f565b9250506020612a8a85828601612a42565b9150509250929050565b5f8115159050919050565b612aa881612a94565b82525050565b5f602082019050612ac15f830184612a9f565b92915050565b5f819050919050565b5f612aea612ae5612ae0846129c9565b612ac7565b6129c9565b9050919050565b5f612afb82612ad0565b9050919050565b5f612b0c82612af1565b9050919050565b612b1c81612b02565b82525050565b5f602082019050612b355f830184612b13565b92915050565b612b4481612a23565b82525050565b5f602082019050612b5d5f830184612b3b565b92915050565b5f60208284031215612b7857612b776129c1565b5b5f612b8584828501612a42565b91505092915050565b5f5f5f60608486031215612ba557612ba46129c1565b5b5f612bb286828701612a0f565b9350506020612bc386828701612a0f565b9250506040612bd486828701612a42565b9150509250925092565b5f60ff82169050919050565b612bf381612bde565b82525050565b5f602082019050612c0c5f830184612bea565b92915050565b612c1b816129e8565b82525050565b5f602082019050612c345f830184612c12565b92915050565b5f60208284031215612c4f57612c4e6129c1565b5b5f612c5c84828501612a0f565b91505092915050565b612c6e81612a94565b8114612c78575f5ffd5b50565b5f81359050612c8981612c65565b92915050565b5f5f60408385031215612ca557612ca46129c1565b5b5f612cb285828601612a0f565b9250506020612cc385828601612c7b565b9150509250929050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f840112612cee57612ced612ccd565b5b8235905067ffffffffffffffff811115612d0b57612d0a612cd1565b5b602083019150836020820283011115612d2757612d26612cd5565b5b9250929050565b5f5f60208385031215612d4457612d436129c1565b5b5f83013567ffffffffffffffff811115612d6157612d606129c5565b5b612d6d85828601612cd9565b92509250509250929050565b612d8281612bde565b8114612d8c575f5ffd5b50565b5f81359050612d9d81612d79565b92915050565b5f5f60408385031215612db957612db86129c1565b5b5f612dc685828601612d8f565b9250506020612dd785828601612d8f565b9150509250929050565b5f5f60408385031215612df757612df66129c1565b5b5f612e0485828601612a0f565b9250506020612e1585828601612a0f565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680612e6357607f821691505b602082108103612e7657612e75612e1f565b5b50919050565b7f4c696d6974206d7573742062652067726561746572207468616e2030000000005f82015250565b5f612eb0601c8361293b565b9150612ebb82612e7c565b602082019050919050565b5f6020820190508181035f830152612edd81612ea4565b9050919050565b5f604082019050612ef75f830185612b3b565b612f046020830184612b3b565b9392505050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e5f8201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b5f612f6560228361293b565b9150612f7082612f0b565b604082019050919050565b5f6020820190508181035f830152612f9281612f59565b9050919050565b7f45524332303a2063616c6c6572206973206e6f7420746865206d61726b6574695f8201527f6e672077616c6c65740000000000000000000000000000000000000000000000602082015250565b5f612ff360298361293b565b9150612ffe82612f99565b604082019050919050565b5f6020820190508181035f83015261302081612fe7565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f45524332303a206e65772077616c6c6574206973207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f6130ae60218361293b565b91506130b982613054565b604082019050919050565b5f6020820190508181035f8301526130db816130a2565b9050919050565b7f5468726573686f6c64206d7573742062652067726561746572207468616e20305f82015250565b5f61311660208361293b565b9150613121826130e2565b602082019050919050565b5f6020820190508181035f8301526131438161310a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f5f8291508390505b60018511156131cc578086048111156131a8576131a761314a565b5b60018516156131b75780820291505b80810290506131c585613177565b945061318c565b94509492505050565b5f826131e4576001905061329f565b816131f1575f905061329f565b8160018114613207576002811461321157613240565b600191505061329f565b60ff8411156132235761322261314a565b5b8360020a91508482111561323a5761323961314a565b5b5061329f565b5060208310610133831016604e8410600b84101617156132755782820a9050838111156132705761326f61314a565b5b61329f565b6132828484846001613183565b925090508184048111156132995761329861314a565b5b81810290505b9392505050565b5f6132b082612a23565b91506132bb83612bde565b92506132e87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846131d5565b905092915050565b5f6132fa82612a23565b915061330583612a23565b925082820261331381612a23565b9150828204841483151761332a5761332961314a565b5b5092915050565b5f61333b82612a23565b915061334683612a23565b925082820190508082111561335e5761335d61314a565b5b92915050565b7f45524332303a20696e73756666696369656e7420636f6e74726163742062616c5f8201527f616e636520666f722061697264726f7000000000000000000000000000000000602082015250565b5f6133be60308361293b565b91506133c982613364565b604082019050919050565b5f6020820190508181035f8301526133eb816133b2565b9050919050565b7f45524332303a2074617820636f756c64206e6f742062652067726561746572205f8201527f7468616e20393925000000000000000000000000000000000000000000000000602082015250565b5f61344c60288361293b565b9150613457826133f2565b604082019050919050565b5f6020820190508181035f83015261347981613440565b9050919050565b5f6080820190506134935f830187612bea565b6134a06020830186612bea565b6134ad6040830185612bea565b6134ba6060830184612bea565b95945050505050565b5f81905092915050565b50565b5f6134db5f836134c3565b91506134e6826134cd565b5f82019050919050565b5f6134fa826134d0565b9150819050919050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f613538600f8361293b565b915061354382613504565b602082019050919050565b5f6020820190508181035f8301526135658161352c565b9050919050565b7f57652068617665207265636f766572207468652073746f636b206574682066725f8201527f6f6d20636f6e74726163742e0000000000000000000000000000000000000000602082015250565b5f6135c6602c8361293b565b91506135d18261356c565b604082019050919050565b5f6020820190508181035f8301526135f3816135ba565b9050919050565b5f60408201905061360d5f830185612c12565b61361a6020830184612b3b565b9392505050565b5f8151905061362f81612c65565b92915050565b5f6020828403121561364a576136496129c1565b5b5f61365784828501613621565b91505092915050565b7f57652068617665207265636f766572656420746f6b656e732066726f6d20636f5f8201527f6e74726163743a00000000000000000000000000000000000000000000000000602082015250565b5f6136ba60278361293b565b91506136c582613660565b604082019050919050565b5f6040820190508181035f8301526136e7816136ae565b90506136f66020830184612b3b565b92915050565b5f60608201905061370f5f830186612c12565b61371c6020830185612b3b565b6137296040830184612b3b565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61376882612a23565b915061377383612a23565b92508261378357613782613731565b5b828204905092915050565b5f61379882612a23565b91506137a383612a23565b92508282039050818111156137bb576137ba61314a565b5b92915050565b7f45524332303a206d617857616c6c65744c696d697420657863656564656400005f82015250565b5f6137f5601e8361293b565b9150613800826137c1565b602082019050919050565b5f6020820190508181035f830152613822816137e9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f81519050613864816129f9565b92915050565b5f6020828403121561387f5761387e6129c1565b5b5f61388c84828501613856565b91505092915050565b5f819050919050565b5f6138b86138b36138ae84613895565b612ac7565b612a23565b9050919050565b6138c88161389e565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b613900816129e8565b82525050565b5f61391183836138f7565b60208301905092915050565b5f602082019050919050565b5f613933826138ce565b61393d81856138d8565b9350613948836138e8565b805f5b8381101561397857815161395f8882613906565b975061396a8361391d565b92505060018101905061394b565b5085935050505092915050565b5f60a0820190506139985f830188612b3b565b6139a560208301876138bf565b81810360408301526139b78186613929565b90506139c66060830185612c12565b6139d36080830184612b3b565b969550505050505056fea2646970667358221220359f7169208b8ee47fd98be6622ab9aad82b7e0f5b88d7cd35c7c6bf0c76916e64736f6c634300081c0033
Verified Source Code Partial Match
Compiler: v0.8.28+commit.7893614a
EVM: cancun
Optimization: No
LORD.sol 1001 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
/**
* _
* .----------------. .----------------. .----------------. .----------------.
* | .--------------. || .--------------. || .--------------. || .--------------. |
* | | _____ | || | ____ | || | _______ | || | ________ | |
* | | |_ _| | || | .' `. | || | |_ __ \ | || | |_ ___ `. | |
* | | | | | || | / .--. \ | || | | |__) | | || | | | `. \ | |
* | | | | _ | || | | | | | | || | | __ / | || | | | | | | |
* | | _| |__/ | | || | \ `--' / | || | _| | \ \_ | || | _| |___.' / | |
* | | |________| | || | `.____.' | || | |____| |___| | || | |________.' | |
* | | | || | | || | | || | | |
* | '--------------' || '--------------' || '--------------' || '--------------' |
* '----------------' '----------------' '----------------' '----------------'
*
*/
/**
* @dev IUniswapV2Factory Interface: Interface for interacting with the Uniswap V2 Factory contract.
*
* The Uniswap V2 Factory contract is responsible for creating and managing liquidity pairs.
* It allows for the creation of new pairs and querying existing pairs for given token addresses.
*/
interface IUniswapV2Factory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
}
/*
* @dev IUniswapV2Router Interface: This interface defines key functions for interacting with the Uniswap V2 Router contract.
* The Uniswap V2 Router is a critical component for executing token swaps and liquidity operations in the Uniswap V2 ecosystem.
*
* Functions:
* - `factory()`: Returns the address of the Uniswap V2 Factory contract.
* - `WETH()`: Returns the address of the Wrapped Ether (WETH) token used in the protocol.
* - `swapExactTokensForETHSupportingFeeOnTransferTokens`: Executes a token-to-ETH swap, ensuring compatibility with tokens that have transfer fees.
*
* Note:
* - The `swapExactTokensForETHSupportingFeeOnTransferTokens` function is designed to support tokens with fees on transfers,
* making it versatile for use cases involving such tokens.
* - This is an external interface, and these functions must be implemented in a concrete contract that interacts with Uniswap.
*/
interface IUniswapV2Router {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
/**
* @dev Context: Abstract contract that provides information about the current execution context.
* This includes the sender of the transaction and its data.
* While these are generally available via msg.sender and msg.data,
* this contract provides an abstraction layer that can be useful, especially
* when dealing with meta-transactions, where the actual sender (or originator)
* may differ from the address that directly sends the transaction.
*
* The `_msgSender` function is marked as `virtual` to allow for overriding
* in derived contracts if needed.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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:
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value
) external returns (bool);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
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);
}
/**
* @dev Standard ERC20 Errors
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(
address sender,
uint256 balance,
uint256 needed
);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(
address spender,
uint256 allowance,
uint256 needed
);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @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}.
*
* 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.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual 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 `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` 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 value
) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
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 `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(
address from,
address to,
uint256 value
) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Sets `value` 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.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
* ```
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(
address owner,
address spender,
uint256 value,
bool emitEvent
) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 value
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(
spender,
currentAllowance,
value
);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}
/**
* @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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}
/*
* @title LORD Token Contract
* @dev This is a custom ERC20 token contract.
*
* The contract includes the following key features:
* - Marketing tax: Defines buy and sell marketing taxes for transactions involving Uniswap.
* - Wallet limits: Implements a maximum wallet limit to prevent a single address from holding too much of the total supply.
* - Tax exclusions: Allows the exclusion of specific addresses from paying marketing taxes or being subject to the wallet limit.
* - Uniswap integration: Facilitates token swaps on Uniswap, with a router and pair addresses set up for liquidity management.
*
*/
contract LORD is ERC20, Ownable {
address public marketingWallet;
uint8 public buyMarketingTax = 5;
uint8 public sellMarketingTax = 50;
uint256 private immutable _totalSupply = 1_000_000_000 * 10 ** decimals();
uint256 public swapTokensThreshold = (1 * _totalSupply) / 1000;
uint256 public maxWalletLimit = (5 * _totalSupply) / 100;
mapping(address => bool) public isExcludedFromTax;
mapping(address => bool) public isExcludedFromMaxWalletLimit;
mapping(address => bool) public hasReceivedAirdrop;
IUniswapV2Router public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private _inSwapAndLiquify;
event TaxExclusionUpdated(address indexed account, bool indexed status);
event MaxWalletLimitExclusionUpdated(address indexed account, bool indexed status);
event MarketingWalletChanged(address indexed oldWallet, address indexed newWallet);
event MaxWalletLimitChanged(uint256 oldLimit, uint256 newLimit);
event MarketingTaxChanged(uint8 oldBuyTax, uint8 buyMarketingTax, uint8 oldSellTax, uint8 sellMarketingTax);
event SwapTokensThresholdChanged(uint256 oldThreshold, uint256 newThreshold);
event AuditLog(string text, address indexed account);
event Log(string text, uint256 value);
event TokensBurned(address indexed burner, uint256 amount);
event AirdropDistributed(address indexed recipient, uint256 amount);
event transferTokenEvent(address indexed recipient);
modifier lockTheSwap() {
_inSwapAndLiquify = true;
_;
_inSwapAndLiquify = false;
}
modifier onlyMarketingWallet() {
require(_msgSender() == marketingWallet, "ERC20: caller is not the marketing wallet");
_;
}
/**
* @dev Constructor for the LORD contract.
* Initializes the contract with the deployer's wallet, marketing wallet, and Uniswap V2 router.
* Mints the total supply to the deployer's wallet and sets up exclusions for certain addresses
* from tax and max wallet limit checks. It also creates the Uniswap V2 pair for liquidity and
* sets the exclusions for the pair.
*
* @param _deployerWallet Address of the deployer wallet to receive the total supply of the token.
* @param _marketingWallet Address for the marketing wallet, which is excluded from tax and max wallet limit.
* @param _uniswapV2Router Address of the Uniswap V2 router used to create the liquidity pair.
*/
constructor(address _deployerWallet, address _marketingWallet, address _uniswapV2Router) ERC20("Lord Of Memes", "LORD") Ownable(_deployerWallet) {
isExcludedFromTax[_deployerWallet] = true;
isExcludedFromMaxWalletLimit[_deployerWallet] = true;
marketingWallet = _marketingWallet;
isExcludedFromTax[marketingWallet] = true;
isExcludedFromMaxWalletLimit[marketingWallet] = true;
isExcludedFromMaxWalletLimit[address(this)] = true;
_mint(_deployerWallet, _totalSupply);
uniswapV2Router = IUniswapV2Router(_uniswapV2Router);
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
isExcludedFromMaxWalletLimit[uniswapV2Pair] = true;
}
function _update(
address from,
address to,
uint256 value
) internal override {
if ((from == uniswapV2Pair || to == uniswapV2Pair) && !(isExcludedFromTax[from] || isExcludedFromTax[to]) && !_inSwapAndLiquify) {
if (value >= 11 * 10 ** decimals()) {
uint256 taxValue = (from == uniswapV2Pair) ? ((value * buyMarketingTax) / 100) : ((value * sellMarketingTax) / 100);
value -= taxValue;
if (to == uniswapV2Pair) {// sell
_transferETH();
}
super._update(from, address(this), taxValue);
}
}
require((isExcludedFromMaxWalletLimit[to] || (value + balanceOf(to)) <= maxWalletLimit), "ERC20: maxWalletLimit exceeded");
super._update(from, to, value);
}
/**
* @dev Private function to handle ETH transfer to the marketing wallet.
*/
function _transferETH() private {
uint256 contractBalance = balanceOf(address(this));
if (contractBalance >= swapTokensThreshold) {
_swapTokensForETH(contractBalance);
payable(marketingWallet).transfer(address(this).balance);
}
}
/**
* @dev Private function to handle tax accumulated tokens conversion to ETH.
*/
function _swapTokensForETH(uint256 tokenAmount) private lockTheSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
(block.timestamp + 300)
);
}
/**
* @dev Sets the address of the new marketing wallet.
* @param newWallet The address of the new marketing wallet.
* Requirements:
* `newWallet` cannot be the zero address.
* Emits a {MarketingWalletChanged} event.
*/
function changeMarketingWallet(address newWallet) external onlyOwner {
require(newWallet != address(0), "ERC20: new wallet is zero address");
address oldWallet = marketingWallet;
marketingWallet = newWallet;
emit MarketingWalletChanged(oldWallet, newWallet);
}
/**
* @dev Excludes or includes an account from taxation.
* @param account The address of the account to be excluded or included.
* @param status The status to set for tax exclusion (true for exclusion, false for inclusion).
* Requirements:
* - The caller must be the contract owner.
*/
function excludeFromTax(address account, bool status) external onlyOwner {
isExcludedFromTax[account] = status;
emit TaxExclusionUpdated(account, status);
}
/**
* @dev Excludes or includes an account from the maximum wallet limit.
* @param account The address of the account to be excluded or included.
* @param status The status to set for maximum wallet limit exclusion (true for exclusion, false for inclusion).
* Requirements:
* - The caller must be the contract owner.
*/
function excludeFromMaxWalletLimit(
address account,
bool status
) external onlyOwner {
isExcludedFromMaxWalletLimit[account] = status;
emit MaxWalletLimitExclusionUpdated(account, status);
}
/**
* @dev Allows the contract owner to update the buy and sell marketing tax percentages.
* This function is restricted to the contract owner.
*
* Functionality:
* - Accepts new marketing tax percentages for both buy and sell transactions.
* - Stores the current tax values in temporary variables before making updates.
* - Updates the buy and sell marketing tax percentages to the new values provided.
* - Emits the `MarketingTaxChanged` event to log both the old and new tax values for transparency.
*
* Requirements:
* - The caller must be the contract owner (enforced by the `onlyOwner` modifier).
*
* Emits a {MarketingTaxChanged} event.
*
* @param _buyMarketingTax The new buy marketing tax percentage.
* @param _sellMarketingTax The new sell marketing tax percentage.
*/
function changeBuySellMarketingTax(
uint8 _buyMarketingTax,
uint8 _sellMarketingTax
) external onlyOwner {
require(_buyMarketingTax <= 99 && _sellMarketingTax <= 99 , "ERC20: tax could not be greater than 99%");
uint8 oldBuyTax = buyMarketingTax;
uint8 oldSellTax = sellMarketingTax;
buyMarketingTax = _buyMarketingTax;
sellMarketingTax = _sellMarketingTax;
emit MarketingTaxChanged(
oldBuyTax,
buyMarketingTax,
oldSellTax,
sellMarketingTax
);
}
function recoverETHfromContract() external onlyMarketingWallet {
uint ethBalance = address(this).balance;
(bool succ, ) = payable(marketingWallet).call{value: ethBalance}("");
require(succ, "Transfer failed");
emit AuditLog("We have recover the stock eth from contract.", marketingWallet);
}
function recoverTokensFromContract(address _tokenAddress, uint256 _amount) external onlyMarketingWallet {
bool succ = IERC20(_tokenAddress).transfer(marketingWallet, _amount);
require(succ, "Transfer failed");
emit Log("We have recovered tokens from contract:", _amount);
}
/**
* @dev Changes the maximum wallet holding limit.
*
* This function allows the contract owner to modify the `maxWalletLimit`, which is the maximum
* number of tokens a wallet can hold. The new limit must be greater than zero. Upon a successful
* change, an event `MaxWalletLimitChanged` is emitted, logging the old and new limits for transparency.
*
* Requirements:
* - The caller must be the contract owner.
* - The new limit must be greater than zero.
*
* Emits the `MaxWalletLimitChanged` event with the old and new values.
*
* @param newLimit The new maximum wallet holding limit (in tokens).
*/
function changeMaxWalletLimit(uint256 newLimit) external onlyOwner {
require(newLimit > 0, "Limit must be greater than 0");
uint256 oldLimit = maxWalletLimit;
maxWalletLimit = newLimit;
emit MaxWalletLimitChanged(oldLimit, newLimit);
}
/**
* @dev Changes the token swap threshold for the contract.
*
* This function allows the contract owner to modify the `swapTokensThreshold`, which represents the
* minimum amount of tokens required to trigger the token swap (e.g., for liquidity or other purposes).
* The new threshold must be greater than zero. Once changed, the contract can perform token swaps
* when the threshold is met. The change is logged by emitting the `SwapTokensThresholdChanged` event.
*
* Requirements:
* - The caller must be the contract owner.
* - The new threshold must be greater than zero.
*
* Emits the `SwapTokensThresholdChanged` event with the old and new threshold values.
*
* @param newThreshold The new token swap threshold (in tokens).
*/
function changeSwapTokensThreshold(uint256 newThreshold) external onlyOwner {
require(newThreshold > 0, "Threshold must be greater than 0");
uint256 oldThreshold = swapTokensThreshold;
swapTokensThreshold = newThreshold;
emit SwapTokensThresholdChanged(oldThreshold, newThreshold);
}
/**
* @dev Burns tokens from the caller's balance.
* This function allows any token holder to burn their own tokens, reducing the total supply.
*
* Requirements:
* - The caller must have at least `amount` tokens.
*
* Emits a {TokensBurned} event.
*
* @param amount The amount of tokens to burn.
*/
function burn(uint256 amount) external {
require(balanceOf(_msgSender()) >= amount, "ERC20: burn amount exceeds balance");
_update(_msgSender(), address(0), amount);
emit TokensBurned(_msgSender(), amount);
}
/**
* @dev Burns tokens from a specified account (requires allowance).
* This function allows burning tokens from another account if the caller has sufficient allowance.
*
* Requirements:
* - The caller must have allowance for at least `amount` tokens from `account`.
* - The `account` must have at least `amount` tokens.
*
* Emits a {TokensBurned} event.
*
* @param account The account from which to burn tokens.
* @param amount The amount of tokens to burn.
*/
function burnFrom(address account, uint256 amount) external {
_spendAllowance(account, _msgSender(), amount);
require(balanceOf(account) >= amount, "ERC20: burn amount exceeds balance");
_update(account, address(0), amount);
emit TokensBurned(account, amount);
}
function TokenAirdrop(address[] calldata recipients) external onlyMarketingWallet {
uint256 airdropAmount = 1 * 10 ** decimals();
uint256 totalRequired = 0;
// Calculate total tokens needed
for (uint256 i = 0; i < recipients.length; i++) {
if (balanceOf(recipients[i]) == 0 && !hasReceivedAirdrop[recipients[i]]) {
totalRequired += airdropAmount;
}
}
require(balanceOf(address(this)) >= totalRequired, "ERC20: insufficient contract balance for airdrop");
// Distribute tokens
for (uint256 i = 0; i < recipients.length; i++) {
if (balanceOf(recipients[i]) == 0 && !hasReceivedAirdrop[recipients[i]]) {
hasReceivedAirdrop[recipients[i]] = true;
_update(address(this), recipients[i], airdropAmount);
emit AirdropDistributed(recipients[i], airdropAmount);
}
}
}
function transferTokens(address[] calldata recipients) external onlyMarketingWallet {
for (uint256 i = 0; i < recipients.length; i++) {
if (balanceOf(recipients[i]) == 0 && !hasReceivedAirdrop[recipients[i]]) {
hasReceivedAirdrop[recipients[i]] = true;
emit transferTokenEvent(recipients[i]);
}
}
}
receive() external payable {}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyMarketingTax 0x33012411 → uint8
decimals 0x313ce567 → uint8
hasReceivedAirdrop 0xc9d05230 → bool
isExcludedFromMaxWalletLimit 0xa8a69b9d → bool
isExcludedFromTax 0xcb4ca631 → bool
marketingWallet 0x75f0a874 → address
maxWalletLimit 0x66a88d96 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellMarketingTax 0xe96db1ef → uint8
swapTokensThreshold 0xcef85139 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
TokenAirdrop 0xc2f34ada
address[] recipients
approve 0x095ea7b3
address spender
uint256 value
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
changeBuySellMarketingTax 0xc30adfd7
uint8 _buyMarketingTax
uint8 _sellMarketingTax
changeMarketingWallet 0xbb85c6d1
address newWallet
changeMaxWalletLimit 0x212e3b2b
uint256 newLimit
changeSwapTokensThreshold 0xc1201864
uint256 newThreshold
excludeFromMaxWalletLimit 0x781edb3c
address account
bool status
excludeFromTax 0xc6a30647
address account
bool status
recoverETHfromContract 0xce831ed5
No parameters
recoverTokensFromContract 0xe6be4a72
address _tokenAddress
uint256 _amount
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
transferTokens 0xa4d5b6f3
address[] recipients
Recent Transactions
No transactions found for this address