Address Contract Partially Verified
Address
0xBA3D8156afEAdC7A0758b1D6Da01bdEECf071F91
Balance
0 ETH
Nonce
1
Code Size
15458 bytes
Creator
0xe77E1f54...e87B at tx 0x5e800d80...748305
Indexed Transactions
0
Contract Bytecode
15458 bytes
0x6080604052600436106102555760003560e01c806389a3027111610139578063c0246668116100b6578063dd62ed3e1161007a578063dd62ed3e146108b3578063e2f45605146108f0578063f11a24d31461091b578063f2fde38b14610946578063f63743421461096f578063f8b45b051461099a5761025c565b8063c0246668146107ce578063c18bc195146107f7578063c8c8ebe414610820578063d257b34f1461084b578063d85ba063146108885761025c565b806395d89b41116100fd57806395d89b41146106e55780639c3b4fdc14610710578063a0d82dc51461073b578063a9059cbb14610766578063bbc0c742146107a35761025c565b806389a30271146106245780638a8c523c1461064f5780638da5cb5b146106665780638ea5220f14610691578063924de9b7146106bc5761025c565b8063313ce567116101d25780636a486a8e116101965780636a486a8e146105265780636ddd17131461055157806370a082311461057c578063715018a6146105b9578063751039fc146105d05780637571336a146105fb5761025c565b8063313ce5671461043f57806349bd5a5e1461046a5780634a62bb65146104955780634fbee193146104c057806366ca9b83146104fd5761025c565b806318160ddd1161021957806318160ddd1461035a5780631816467f14610385578063203e727e146103ae57806323b872dd146103d757806327c8f835146104145761025c565b806302dbd8f81461026157806306fdde031461028a578063095ea7b3146102b557806310d5de53146102f25780631694505e1461032f5761025c565b3661025c57005b600080fd5b34801561026d57600080fd5b5061028860048036038101906102839190612bc5565b6109c5565b005b34801561029657600080fd5b5061029f610aaf565b6040516102ac9190612c9e565b60405180910390f35b3480156102c157600080fd5b506102dc60048036038101906102d79190612d1e565b610b41565b6040516102e99190612d79565b60405180910390f35b3480156102fe57600080fd5b5061031960048036038101906103149190612d94565b610b5f565b6040516103269190612d79565b60405180910390f35b34801561033b57600080fd5b50610344610b7f565b6040516103519190612e20565b60405180910390f35b34801561036657600080fd5b5061036f610ba3565b60405161037c9190612e4a565b60405180910390f35b34801561039157600080fd5b506103ac60048036038101906103a79190612d94565b610bad565b005b3480156103ba57600080fd5b506103d560048036038101906103d09190612e65565b610ce9565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190612e92565b610df8565b60405161040b9190612d79565b60405180910390f35b34801561042057600080fd5b50610429610ef0565b6040516104369190612ef4565b60405180910390f35b34801561044b57600080fd5b50610454610ef6565b6040516104619190612f2b565b60405180910390f35b34801561047657600080fd5b5061047f610eff565b60405161048c9190612ef4565b60405180910390f35b3480156104a157600080fd5b506104aa610f23565b6040516104b79190612d79565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190612d94565b610f36565b6040516104f49190612d79565b60405180910390f35b34801561050957600080fd5b50610524600480360381019061051f9190612bc5565b610f8c565b005b34801561053257600080fd5b5061053b611076565b6040516105489190612e4a565b60405180910390f35b34801561055d57600080fd5b5061056661107c565b6040516105739190612d79565b60405180910390f35b34801561058857600080fd5b506105a3600480360381019061059e9190612d94565b61108f565b6040516105b09190612e4a565b60405180910390f35b3480156105c557600080fd5b506105ce6110d7565b005b3480156105dc57600080fd5b506105e561115f565b6040516105f29190612d79565b60405180910390f35b34801561060757600080fd5b50610622600480360381019061061d9190612f72565b6111ff565b005b34801561063057600080fd5b506106396112d6565b6040516106469190612ef4565b60405180910390f35b34801561065b57600080fd5b506106646112fc565b005b34801561067257600080fd5b5061067b6113b0565b6040516106889190612ef4565b60405180910390f35b34801561069d57600080fd5b506106a66113da565b6040516106b39190612ef4565b60405180910390f35b3480156106c857600080fd5b506106e360048036038101906106de9190612fb2565b611400565b005b3480156106f157600080fd5b506106fa611499565b6040516107079190612c9e565b60405180910390f35b34801561071c57600080fd5b5061072561152b565b6040516107329190612e4a565b60405180910390f35b34801561074757600080fd5b50610750611531565b60405161075d9190612e4a565b60405180910390f35b34801561077257600080fd5b5061078d60048036038101906107889190612d1e565b611537565b60405161079a9190612d79565b60405180910390f35b3480156107af57600080fd5b506107b8611555565b6040516107c59190612d79565b60405180910390f35b3480156107da57600080fd5b506107f560048036038101906107f09190612f72565b611568565b005b34801561080357600080fd5b5061081e60048036038101906108199190612e65565b61168d565b005b34801561082c57600080fd5b5061083561179c565b6040516108429190612e4a565b60405180910390f35b34801561085757600080fd5b50610872600480360381019061086d9190612e65565b6117a2565b60405161087f9190612d79565b60405180910390f35b34801561089457600080fd5b5061089d6118f7565b6040516108aa9190612e4a565b60405180910390f35b3480156108bf57600080fd5b506108da60048036038101906108d59190612fdf565b6118fd565b6040516108e79190612e4a565b60405180910390f35b3480156108fc57600080fd5b50610905611984565b6040516109129190612e4a565b60405180910390f35b34801561092757600080fd5b5061093061198a565b60405161093d9190612e4a565b60405180910390f35b34801561095257600080fd5b5061096d60048036038101906109689190612d94565b611990565b005b34801561097b57600080fd5b50610984611a88565b6040516109919190612e4a565b60405180910390f35b3480156109a657600080fd5b506109af611a8e565b6040516109bc9190612e4a565b60405180910390f35b6109cd611a94565b73ffffffffffffffffffffffffffffffffffffffff166109eb6113b0565b73ffffffffffffffffffffffffffffffffffffffff1614610a41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a389061306b565b60405180910390fd5b8160108190555080601181905550601154601054610a5f91906130ba565b600f81905550600a600f541115610aab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa29061315c565b60405180910390fd5b5050565b606060038054610abe906131ab565b80601f0160208091040260200160405190810160405280929190818152602001828054610aea906131ab565b8015610b375780601f10610b0c57610100808354040283529160200191610b37565b820191906000526020600020905b815481529060010190602001808311610b1a57829003601f168201915b5050505050905090565b6000610b55610b4e611a94565b8484611a9c565b6001905092915050565b60136020528060005260406000206000915054906101000a900460ff1681565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6000600254905090565b610bb5611a94565b73ffffffffffffffffffffffffffffffffffffffff16610bd36113b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c209061306b565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f90b8024c4923d3873ff5b9fcb43d0360d4b9217fa41225d07ba379993552e74360405160405180910390a380600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610cf1611a94565b73ffffffffffffffffffffffffffffffffffffffff16610d0f6113b0565b73ffffffffffffffffffffffffffffffffffffffff1614610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c9061306b565b60405180910390fd5b670de0b6b3a76400006103e86001610d7b610ba3565b610d8591906131dd565b610d8f9190613266565b610d999190613266565b811015610ddb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd290613309565b60405180910390fd5b670de0b6b3a764000081610def91906131dd565b60088190555050565b6000610e05848484611c67565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610e50611a94565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec79061339b565b60405180910390fd5b610ee485610edc611a94565b858403611a9c565b60019150509392505050565b61dead81565b60006012905090565b7f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec6679181565b600b60009054906101000a900460ff1681565b6000601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610f94611a94565b73ffffffffffffffffffffffffffffffffffffffff16610fb26113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611008576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fff9061306b565b60405180910390fd5b81600d8190555080600e81905550600e54600d5461102691906130ba565b600c81905550600a600c541115611072576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110699061315c565b60405180910390fd5b5050565b600f5481565b600b60029054906101000a900460ff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6110df611a94565b73ffffffffffffffffffffffffffffffffffffffff166110fd6113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611153576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114a9061306b565b60405180910390fd5b61115d60006125c9565b565b6000611169611a94565b73ffffffffffffffffffffffffffffffffffffffff166111876113b0565b73ffffffffffffffffffffffffffffffffffffffff16146111dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d49061306b565b60405180910390fd5b6000600b60006101000a81548160ff0219169083151502179055506001905090565b611207611a94565b73ffffffffffffffffffffffffffffffffffffffff166112256113b0565b73ffffffffffffffffffffffffffffffffffffffff161461127b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112729061306b565b60405180910390fd5b80601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611304611a94565b73ffffffffffffffffffffffffffffffffffffffff166113226113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f9061306b565b60405180910390fd5b6001600b60016101000a81548160ff0219169083151502179055506001600b60026101000a81548160ff021916908315150217905550565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611408611a94565b73ffffffffffffffffffffffffffffffffffffffff166114266113b0565b73ffffffffffffffffffffffffffffffffffffffff161461147c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114739061306b565b60405180910390fd5b80600b60026101000a81548160ff02191690831515021790555050565b6060600480546114a8906131ab565b80601f01602080910402602001604051908101604052809291908181526020018280546114d4906131ab565b80156115215780601f106114f657610100808354040283529160200191611521565b820191906000526020600020905b81548152906001019060200180831161150457829003601f168201915b5050505050905090565b600d5481565b60105481565b600061154b611544611a94565b8484611c67565b6001905092915050565b600b60019054906101000a900460ff1681565b611570611a94565b73ffffffffffffffffffffffffffffffffffffffff1661158e6113b0565b73ffffffffffffffffffffffffffffffffffffffff16146115e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115db9061306b565b60405180910390fd5b80601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7826040516116819190612d79565b60405180910390a25050565b611695611a94565b73ffffffffffffffffffffffffffffffffffffffff166116b36113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611709576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117009061306b565b60405180910390fd5b670de0b6b3a76400006103e8600561171f610ba3565b61172991906131dd565b6117339190613266565b61173d9190613266565b81101561177f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117769061342d565b60405180910390fd5b670de0b6b3a76400008161179391906131dd565b600a8190555050565b60085481565b60006117ac611a94565b73ffffffffffffffffffffffffffffffffffffffff166117ca6113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118179061306b565b60405180910390fd5b620186a0600161182e610ba3565b61183891906131dd565b6118429190613266565b821015611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b906134bf565b60405180910390fd5b6103e86005611891610ba3565b61189b91906131dd565b6118a59190613266565b8211156118e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118de90613551565b60405180910390fd5b8160098190555060019050919050565b600c5481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60095481565b600e5481565b611998611a94565b73ffffffffffffffffffffffffffffffffffffffff166119b66113b0565b73ffffffffffffffffffffffffffffffffffffffff1614611a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a039061306b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a73906135e3565b60405180910390fd5b611a85816125c9565b50565b60115481565b600a5481565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0390613675565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7390613707565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611c5a9190612e4a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611cd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cce90613799565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3e9061382b565b60405180910390fd5b6000811415611d6157611d5c8383600061268f565b6125c4565b600b60009054906101000a900460ff161561216b57611d7e6113b0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611dec5750611dbc6113b0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611e255750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611e5f575061dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611e785750600660149054906101000a900460ff16155b1561216a57600b60019054906101000a900460ff16611f7257601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f325750601260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6890613897565b60405180910390fd5b5b7f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec6679173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120175750601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156120be57600854811115612061576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205890613929565b60405180910390fd5b600a5461206d8361108f565b8261207891906130ba565b11156120b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b090613995565b60405180910390fd5b612169565b601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661216857600a5461211b8361108f565b8261212691906130ba565b1115612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e90613995565b60405180910390fd5b5b5b5b5b60006121763061108f565b90506000600954821015905080801561219b5750600b60029054906101000a900460ff165b80156121b45750600660149054906101000a900460ff16155b801561220b57507f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec6679173ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80156122615750601260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156122b75750601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156122fb576001600660146101000a81548160ff0219169083151502179055506122df612910565b6000600660146101000a81548160ff0219169083151502179055505b6000600660149054906101000a900460ff16159050601260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806123b15750601260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156123bb57600090505b600080600083156125b2577f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec6679173ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614801561242357506000600f54115b15612491576124506064612442600f548a61296190919063ffffffff16565b61297790919063ffffffff16565b9250600f546011548461246391906131dd565b61246d9190613266565b9150600f546010548461248091906131dd565b61248a9190613266565b9050612559565b7f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec6679173ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161480156124ee57506000600c54115b156125585761251b606461250d600c548a61296190919063ffffffff16565b61297790919063ffffffff16565b9250600c54600e548461252e91906131dd565b6125389190613266565b9150600c54600d548461254b91906131dd565b6125559190613266565b90505b5b600083111561256e5761256d89308561268f565b5b60008211156125a3576125a2307f00000000000000000000000006ee97e4f86024e4333f3f30e74b6397cec667918461268f565b5b82876125af91906139b5565b96505b6125bd89898961268f565b5050505050505b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156126ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f690613799565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561276f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127669061382b565b60405180910390fd5b61277a83838361298d565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f790613a5b565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461289391906130ba565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516128f79190612e4a565b60405180910390a361290a848484612992565b50505050565b600061291b3061108f565b9050600081141561292c575061295f565b601460095461293b91906131dd565b81111561295457601460095461295191906131dd565b90505b61295d81612997565b505b565b6000818361296f91906131dd565b905092915050565b600081836129859190613266565b905092915050565b505050565b505050565b6000600267ffffffffffffffff8111156129b4576129b3613a7b565b5b6040519080825280602002602001820160405280156129e25781602001602082028036833780820191505090505b50905030816000815181106129fa576129f9613aaa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110612a6b57612a6a613aaa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612ad0307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611a9c565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff16635c11d79583600084600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518663ffffffff1660e01b8152600401612b54959493929190613bd2565b600060405180830381600087803b158015612b6e57600080fd5b505af1158015612b82573d6000803e3d6000fd5b505050505050565b600080fd5b6000819050919050565b612ba281612b8f565b8114612bad57600080fd5b50565b600081359050612bbf81612b99565b92915050565b60008060408385031215612bdc57612bdb612b8a565b5b6000612bea85828601612bb0565b9250506020612bfb85828601612bb0565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612c3f578082015181840152602081019050612c24565b83811115612c4e576000848401525b50505050565b6000601f19601f8301169050919050565b6000612c7082612c05565b612c7a8185612c10565b9350612c8a818560208601612c21565b612c9381612c54565b840191505092915050565b60006020820190508181036000830152612cb88184612c65565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ceb82612cc0565b9050919050565b612cfb81612ce0565b8114612d0657600080fd5b50565b600081359050612d1881612cf2565b92915050565b60008060408385031215612d3557612d34612b8a565b5b6000612d4385828601612d09565b9250506020612d5485828601612bb0565b9150509250929050565b60008115159050919050565b612d7381612d5e565b82525050565b6000602082019050612d8e6000830184612d6a565b92915050565b600060208284031215612daa57612da9612b8a565b5b6000612db884828501612d09565b91505092915050565b6000819050919050565b6000612de6612de1612ddc84612cc0565b612dc1565b612cc0565b9050919050565b6000612df882612dcb565b9050919050565b6000612e0a82612ded565b9050919050565b612e1a81612dff565b82525050565b6000602082019050612e356000830184612e11565b92915050565b612e4481612b8f565b82525050565b6000602082019050612e5f6000830184612e3b565b92915050565b600060208284031215612e7b57612e7a612b8a565b5b6000612e8984828501612bb0565b91505092915050565b600080600060608486031215612eab57612eaa612b8a565b5b6000612eb986828701612d09565b9350506020612eca86828701612d09565b9250506040612edb86828701612bb0565b9150509250925092565b612eee81612ce0565b82525050565b6000602082019050612f096000830184612ee5565b92915050565b600060ff82169050919050565b612f2581612f0f565b82525050565b6000602082019050612f406000830184612f1c565b92915050565b612f4f81612d5e565b8114612f5a57600080fd5b50565b600081359050612f6c81612f46565b92915050565b60008060408385031215612f8957612f88612b8a565b5b6000612f9785828601612d09565b9250506020612fa885828601612f5d565b9150509250929050565b600060208284031215612fc857612fc7612b8a565b5b6000612fd684828501612f5d565b91505092915050565b60008060408385031215612ff657612ff5612b8a565b5b600061300485828601612d09565b925050602061301585828601612d09565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613055602083612c10565b91506130608261301f565b602082019050919050565b6000602082019050818103600083015261308481613048565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006130c582612b8f565b91506130d083612b8f565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131055761310461308b565b5b828201905092915050565b7f4d757374206b656570206665657320617420313025206f72206c657373000000600082015250565b6000613146601d83612c10565b915061315182613110565b602082019050919050565b6000602082019050818103600083015261317581613139565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131c357607f821691505b602082108114156131d7576131d661317c565b5b50919050565b60006131e882612b8f565b91506131f383612b8f565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561322c5761322b61308b565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061327182612b8f565b915061327c83612b8f565b92508261328c5761328b613237565b5b828204905092915050565b7f43616e6e6f7420736574206d61785472616e73616374696f6e416d6f756e742060008201527f6c6f776572207468616e20302e31250000000000000000000000000000000000602082015250565b60006132f3602f83612c10565b91506132fe82613297565b604082019050919050565b60006020820190508181036000830152613322816132e6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613385602883612c10565b915061339082613329565b604082019050919050565b600060208201905081810360008301526133b481613378565b9050919050565b7f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e2060008201527f302e352500000000000000000000000000000000000000000000000000000000602082015250565b6000613417602483612c10565b9150613422826133bb565b604082019050919050565b600060208201905081810360008301526134468161340a565b9050919050565b7f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60008201527f20302e3030312520746f74616c20737570706c792e0000000000000000000000602082015250565b60006134a9603583612c10565b91506134b48261344d565b604082019050919050565b600060208201905081810360008301526134d88161349c565b9050919050565b7f5377617020616d6f756e742063616e6e6f74206265206869676865722074686160008201527f6e20302e352520746f74616c20737570706c792e000000000000000000000000602082015250565b600061353b603483612c10565b9150613546826134df565b604082019050919050565b6000602082019050818103600083015261356a8161352e565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006135cd602683612c10565b91506135d882613571565b604082019050919050565b600060208201905081810360008301526135fc816135c0565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061365f602483612c10565b915061366a82613603565b604082019050919050565b6000602082019050818103600083015261368e81613652565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006136f1602283612c10565b91506136fc82613695565b604082019050919050565b60006020820190508181036000830152613720816136e4565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613783602583612c10565b915061378e82613727565b604082019050919050565b600060208201905081810360008301526137b281613776565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613815602383612c10565b9150613820826137b9565b604082019050919050565b6000602082019050818103600083015261384481613808565b9050919050565b7f54726164696e67206973206e6f74206163746976652e00000000000000000000600082015250565b6000613881601683612c10565b915061388c8261384b565b602082019050919050565b600060208201905081810360008301526138b081613874565b9050919050565b7f427579207472616e7366657220616d6f756e742065786365656473207468652060008201527f6d61785472616e73616374696f6e416d6f756e742e0000000000000000000000602082015250565b6000613913603583612c10565b915061391e826138b7565b604082019050919050565b6000602082019050818103600083015261394281613906565b9050919050565b7f4d61782077616c6c657420657863656564656400000000000000000000000000600082015250565b600061397f601383612c10565b915061398a82613949565b602082019050919050565b600060208201905081810360008301526139ae81613972565b9050919050565b60006139c082612b8f565b91506139cb83612b8f565b9250828210156139de576139dd61308b565b5b828203905092915050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000613a45602683612c10565b9150613a50826139e9565b604082019050919050565b60006020820190508181036000830152613a7481613a38565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6000613afe613af9613af484613ad9565b612dc1565b612b8f565b9050919050565b613b0e81613ae3565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613b4981612ce0565b82525050565b6000613b5b8383613b40565b60208301905092915050565b6000602082019050919050565b6000613b7f82613b14565b613b898185613b1f565b9350613b9483613b30565b8060005b83811015613bc5578151613bac8882613b4f565b9750613bb783613b67565b925050600181019050613b98565b5085935050505092915050565b600060a082019050613be76000830188612e3b565b613bf46020830187613b05565b8181036040830152613c068186613b74565b9050613c156060830185612ee5565b613c226080830184612e3b565b969550505050505056fea26469706673582212208ff1aeaabb9b2dc27b5443e68134a5f06f8d30447e6af5eb8b1d6fe5a875886664736f6c634300080a0033
Verified Source Code Partial Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: No
Fairless.sol 1080 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma experimental ABIEncoderV2;
////// lib/openzeppelin-contracts/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)
/* pragma solidity ^0.8.0; */
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
////// lib/openzeppelin-contracts/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
/* pragma solidity ^0.8.0; */
/* import "../utils/Context.sol"; */
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev 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);
}
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)
/* 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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
address recipient,
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);
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)
/* pragma solidity ^0.8.0; */
/* import "../IERC20.sol"; */
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
////// lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)
/* pragma solidity ^0.8.0; */
/* import "./IERC20.sol"; */
/* import "./extensions/IERC20Metadata.sol"; */
/* import "../../utils/Context.sol"; */
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.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:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, 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}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), 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}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
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:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, 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 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 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 {}
}
////// lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol
// OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol)
/* pragma solidity ^0.8.0; */
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IUniswapV2Factory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint256
);
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract Fairless is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
address public USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
bool private swapping;
address public devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
uint256 public buyTotalFees;
uint256 public buyDevFee;
uint256 public buyLiquidityFee;
uint256 public sellTotalFees;
uint256 public sellDevFee;
uint256 public sellLiquidityFee;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
event ExcludeFromFees(address indexed account, bool isExcluded);
event devWalletUpdated(
address indexed newWallet,
address indexed oldWallet
);
constructor() ERC20("Fairless", "Fairless") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), USDC);
excludeFromMaxTransaction(address(uniswapV2Pair), true);
uint256 _buyDevFee = 1;
uint256 _buyLiquidityFee = 0;
uint256 _sellDevFee = 1;
uint256 _sellLiquidityFee = 0;
uint256 totalSupply = 100_000_000_000 * 1e18;
maxTransactionAmount = totalSupply * 2 / 100; // 2% from total supply maxTransactionAmountTxn
maxWallet = totalSupply * 2 / 100; // 2% from total supply maxWallet
swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05% swap wallet
buyDevFee = _buyDevFee;
buyLiquidityFee = _buyLiquidityFee;
buyTotalFees = buyDevFee + buyLiquidityFee;
sellDevFee = _sellDevFee;
sellLiquidityFee = _sellLiquidityFee;
sellTotalFees = sellDevFee + sellLiquidityFee;
devWallet = address(0xe77E1f548AAC1c9b9EDaED07186A75dAb639e87B); // set as dev wallet
// exclude from paying fees or having max transaction amount
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
/*
_mint is an internal function in ERC20.sol that is only called here,
and CANNOT be called ever again
*/
_mint(msg.sender, totalSupply);
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool) {
limitsInEffect = false;
return true;
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
require(
newAmount >= (totalSupply() * 1) / 100000,
"Swap amount cannot be lower than 0.001% total supply."
);
require(
newAmount <= (totalSupply() * 5) / 1000,
"Swap amount cannot be higher than 0.5% total supply."
);
swapTokensAtAmount = newAmount;
return true;
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 1) / 1000) / 1e18,
"Cannot set maxTransactionAmount lower than 0.1%"
);
maxTransactionAmount = newNum * (10**18);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set maxWallet lower than 0.5%"
);
maxWallet = newNum * (10**18);
}
function excludeFromMaxTransaction(address updAds, bool isEx)
public
onlyOwner
{
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner {
swapEnabled = enabled;
}
function updateBuyFees(
uint256 _devFee,
uint256 _liquidityFee
) external onlyOwner {
buyDevFee = _devFee;
buyLiquidityFee = _liquidityFee;
buyTotalFees = buyDevFee + buyLiquidityFee;
require(buyTotalFees <= 10, "Must keep fees at 10% or less");
}
function updateSellFees(
uint256 _devFee,
uint256 _liquidityFee
) external onlyOwner {
sellDevFee = _devFee;
sellLiquidityFee = _liquidityFee;
sellTotalFees = sellDevFee + sellLiquidityFee;
require(sellTotalFees <= 10, "Must keep fees at 10% or less");
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function updateDevWallet(address newDevWallet)
external
onlyOwner
{
emit devWalletUpdated(newDevWallet, devWallet);
devWallet = newDevWallet;
}
function isExcludedFromFees(address account) public view returns (bool) {
return _isExcludedFromFees[account];
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
) {
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
//when buy
if (
from == uniswapV2Pair &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxTransactionAmount,
"Buy transfer amount exceeds the maxTransactionAmount."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max wallet exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap &&
swapEnabled &&
!swapping &&
to == uniswapV2Pair &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
uint256 tokensForLiquidity = 0;
uint256 tokensForDev = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// on sell
if (to == uniswapV2Pair && sellTotalFees > 0) {
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity = (fees * sellLiquidityFee) / sellTotalFees;
tokensForDev = (fees * sellDevFee) / sellTotalFees;
}
// on buy
else if (from == uniswapV2Pair && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity = (fees * buyLiquidityFee) / buyTotalFees;
tokensForDev = (fees * buyDevFee) / buyTotalFees;
}
if (fees> 0) {
super._transfer(from, address(this), fees);
}
if (tokensForLiquidity > 0) {
super._transfer(address(this), uniswapV2Pair, tokensForLiquidity);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForUSDC(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = USDC;
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of USDC
path,
devWallet,
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
if (contractBalance == 0) {
return;
}
if (contractBalance > swapTokensAtAmount * 20) {
contractBalance = swapTokensAtAmount * 20;
}
swapTokensForUSDC(contractBalance);
}
}
Read Contract
USDC 0x89a30271 → address
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyDevFee 0x9c3b4fdc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyTotalFees 0xd85ba063 → uint256
deadAddress 0x27c8f835 → address
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
limitsInEffect 0x4a62bb65 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellDevFee 0xa0d82dc5 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 16 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
removeLimits 0x751039fc
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x66ca9b83
uint256 _devFee
uint256 _liquidityFee
updateDevWallet 0x1816467f
address newDevWallet
updateMaxTxnAmount 0x203e727e
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0x02dbd8f8
uint256 _devFee
uint256 _liquidityFee
updateSwapEnabled 0x924de9b7
bool enabled
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
Recent Transactions
No transactions found for this address