Address Contract Verified
Address
0xcd0080E1517C73dd4e5B87E53f076c948ea362Da
Balance
0 ETH
Nonce
1
Code Size
11656 bytes
Creator
0x23E4c58a...4CBC at tx 0x0718fc80...d869a2
Indexed Transactions
0 (1 on-chain, 1.4% indexed)
Contract Bytecode
11656 bytes
0x608060405234801561001057600080fd5b50600436106101365760003560e01c8063628d6cba116100b8578063a9059cbb1161007c578063a9059cbb1461037b578063b524f3a5146103ab578063cae9ca51146103db578063d505accf1461040b578063dd62ed3e14610427578063ec126c771461045757610136565b8063628d6cba146102af57806370a08231146102df5780637ecebe001461030f5780638da5cb5b1461033f57806395d89b411461035d57610136565b806330adf81f116100ff57806330adf81f146101f5578063313ce567146102135780633644e515146102315780634000aea01461024f578063605629d61461027f57610136565b8062bf26f41461013b57806306fdde0314610159578063095ea7b31461017757806318160ddd146101a757806323b872dd146101c5575b600080fd5b610143610487565b6040516101509190612663565b60405180910390f35b6101616104ab565b60405161016e9190612724565b60405180910390f35b610191600480360381019061018c919061220e565b610539565b60405161019e9190612648565b60405180910390f35b6101af61062b565b6040516101bc9190612846565b60405180910390f35b6101df60048036038101906101da9190612121565b610635565b6040516101ec9190612648565b60405180910390f35b6101fd610a5c565b60405161020a9190612663565b60405180910390f35b61021b610a80565b6040516102289190612861565b60405180910390f35b610239610aa4565b6040516102469190612663565b60405180910390f35b6102696004803603810190610264919061224a565b610ac8565b6040516102769190612648565b60405180910390f35b61029960048036038101906102949190612170565b610d67565b6040516102a69190612648565b60405180910390f35b6102c960048036038101906102c4919061232e565b611091565b6040516102d69190612648565b60405180910390f35b6102f960048036038101906102f491906120bc565b61117b565b6040516103069190612846565b60405180910390f35b610329600480360381019061032491906120bc565b611193565b6040516103369190612846565b60405180910390f35b6103476111ab565b60405161035491906125ed565b60405180910390f35b610365611209565b6040516103729190612724565b60405180910390f35b6103956004803603810190610390919061220e565b611297565b6040516103a29190612648565b60405180910390f35b6103c560048036038101906103c091906120bc565b6114a5565b6040516103d29190612648565b60405180910390f35b6103f560048036038101906103f0919061224a565b6116d4565b6040516104029190612648565b60405180910390f35b61042560048036038101906104209190612170565b611856565b005b610441600480360381019061043c91906120e5565b611a5b565b60405161044e9190612846565b60405180910390f35b610471600480360381019061046c91906122df565b611a80565b60405161047e9190612648565b60405180910390f35b7f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd5981565b600080546104b8906129df565b80601f01602080910402602001604051908101604052809291908181526020018280546104e4906129df565b80156105315780601f1061050657610100808354040283529160200191610531565b820191906000526020600020905b81548152906001019060200180831161051457829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516106199190612846565b60405180910390a36001905092915050565b6000600354905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158061069e57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6106a757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146108bf576000600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108bd57828110156107c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bc906127e6565b60405180910390fd5b600083826107d3919061290a565b905080600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516108b39190612846565b60405180910390a3505b505b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610946576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093d90612826565b60405180910390fd5b8281610952919061290a565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109e491906128b4565b925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610a489190612846565b60405180910390a360019150509392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b7f000000000000000000000000000000000000000000000000000000000000000681565b7f74eced99ed01b11881275e5a2fc385b3c859d213f654479a57dd4a322b404ad581565b60008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141580610b3157503073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b610b3a57600080fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb890612826565b60405180910390fd5b8481610bcd919061290a565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c5f91906128b4565b925050819055508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef87604051610cc39190612846565b60405180910390a38573ffffffffffffffffffffffffffffffffffffffff1663a4c0ed36338787876040518563ffffffff1660e01b8152600401610d0a9493929190612608565b602060405180830381600087803b158015610d2457600080fd5b505af1158015610d38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5c91906122b6565b915050949350505050565b600084421115610dac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da390612766565b60405180910390fd5b60007f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd59898989600760008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190610e2290612a11565b919050558a604051602001610e3c9695949392919061267e565b604051602081830303815290604052805190602001209050610e618982878787611b5b565b80610e755750610e748982878787611c71565b5b610e7e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16141580610ee657503073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff1614155b610eef57600080fd5b6000600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905087811015610f76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6d90612826565b60405180910390fd5b8781610f82919061290a565b600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555087600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461101491906128b4565b925050819055508873ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8a6040516110789190612846565b60405180910390a3600192505050979650505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611102576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f990612786565b60405180910390fd5b61110c3384611d47565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6b616089d04950dc06c45c6dd787d657980543f89651aec47924752c7d16c888856040516111699190612846565b60405180910390a36001905092915050565b60026020528060005260406000206000915090505481565b60076020528060005260406000206000915090505481565b600060065442106111e057600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611206565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b90565b60018054611216906129df565b80601f0160208091040260200160405190810160405280929190818152602001828054611242906129df565b801561128f5780601f106112645761010080835404028352916020019161128f565b820191906000526020600020905b81548152906001019060200180831161127257829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158061130057503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61130957600080fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611390576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138790612826565b60405180910390fd5b828161139c919061290a565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461142e91906128b4565b925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114929190612846565b60405180910390a3600191505092915050565b60006114af6111ab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461151c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611513906127a6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158390612746565b60405180910390fd5b6115946111ab565b600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506202a3004261162491906128b4565b600681905550600654600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe1968d4263a733e2597ef67ea6ad267343bba5f8bf0f99d85190e06b05d824d960405160405180910390a460019050919050565b600083600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925866040516117b49190612846565b60405180910390a38473ffffffffffffffffffffffffffffffffffffffff1662ba451f338686866040518563ffffffff1660e01b81526004016117fa9493929190612608565b602060405180830381600087803b15801561181457600080fd5b505af1158015611828573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184c91906122b6565b9050949350505050565b83421115611899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189090612766565b60405180910390fd5b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061190f90612a11565b91905055896040516020016119299695949392919061267e565b60405160208183030381529060405280519060200120905061194e8882868686611b5b565b8061196257506119618882868686611c71565b5b61196b57600080fd5b85600860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92588604051611a499190612846565b60405180910390a35050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000611a8a6111ab565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611af7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aee906127a6565b60405180910390fd5b611b018383611e90565b8273ffffffffffffffffffffffffffffffffffffffff16847f05d0634fe981be85c22e2942a880821b70095d84e152c3ea3c17a4e4250d9d6184604051611b489190612846565b60405180910390a3600190509392505050565b6000807f74eced99ed01b11881275e5a2fc385b3c859d213f654479a57dd4a322b404ad586604051602001611b919291906125b6565b604051602081830303815290604052805190602001209050600060018287878760405160008152602001604052604051611bce94939291906126df565b6020604051602081039080840390855afa158015611bf0573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611c6457508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b9250505095945050505050565b600080611c7d86611fd9565b9050600060018287878760405160008152602001604052604051611ca494939291906126df565b6020604051602081039080840390855afa158015611cc6573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015611d3a57508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b9250505095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611db7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dae906127c6565b60405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e06919061290a565b925050819055508060036000828254611e1f919061290a565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611e849190612846565b60405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef790612806565b60405180910390fd5b8060036000828254611f1291906128b4565b9250508190555080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611f6891906128b4565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611fcd9190612846565b60405180910390a35050565b600081604051602001611fec9190612590565b604051602081830303815290604052805190602001209050919050565b60008135905061201881612cdf565b92915050565b60008151905061202d81612cf6565b92915050565b60008135905061204281612d0d565b92915050565b60008083601f84011261205a57600080fd5b8235905067ffffffffffffffff81111561207357600080fd5b60208301915083600182028301111561208b57600080fd5b9250929050565b6000813590506120a181612d24565b92915050565b6000813590506120b681612d3b565b92915050565b6000602082840312156120ce57600080fd5b60006120dc84828501612009565b91505092915050565b600080604083850312156120f857600080fd5b600061210685828601612009565b925050602061211785828601612009565b9150509250929050565b60008060006060848603121561213657600080fd5b600061214486828701612009565b935050602061215586828701612009565b925050604061216686828701612092565b9150509250925092565b600080600080600080600060e0888a03121561218b57600080fd5b60006121998a828b01612009565b97505060206121aa8a828b01612009565b96505060406121bb8a828b01612092565b95505060606121cc8a828b01612092565b94505060806121dd8a828b016120a7565b93505060a06121ee8a828b01612033565b92505060c06121ff8a828b01612033565b91505092959891949750929550565b6000806040838503121561222157600080fd5b600061222f85828601612009565b925050602061224085828601612092565b9150509250929050565b6000806000806060858703121561226057600080fd5b600061226e87828801612009565b945050602061227f87828801612092565b935050604085013567ffffffffffffffff81111561229c57600080fd5b6122a887828801612048565b925092505092959194509250565b6000602082840312156122c857600080fd5b60006122d68482850161201e565b91505092915050565b6000806000606084860312156122f457600080fd5b600061230286828701612033565b935050602061231386828701612009565b925050604061232486828701612092565b9150509250925092565b6000806040838503121561234157600080fd5b600061234f85828601612092565b925050602061236085828601612009565b9150509250929050565b6123738161293e565b82525050565b61238281612950565b82525050565b6123918161295c565b82525050565b6123a86123a38261295c565b612a5a565b82525050565b60006123ba8385612887565b93506123c783858461299d565b6123d083612ac2565b840190509392505050565b60006123e68261287c565b6123f08185612898565b93506124008185602086016129ac565b61240981612ac2565b840191505092915050565b6000612421601c836128a9565b915061242c82612ad3565b601c82019050919050565b60006124446002836128a9565b915061244f82612afc565b600282019050919050565b6000612467601d83612898565b915061247282612b25565b602082019050919050565b600061248a601683612898565b915061249582612b4e565b602082019050919050565b60006124ad602083612898565b91506124b882612b77565b602082019050919050565b60006124d0600a83612898565b91506124db82612ba0565b602082019050919050565b60006124f3602183612898565b91506124fe82612bc9565b604082019050919050565b6000612516602183612898565b915061252182612c18565b604082019050919050565b6000612539601f83612898565b915061254482612c67565b602082019050919050565b600061255c602783612898565b915061256782612c90565b604082019050919050565b61257b81612986565b82525050565b61258a81612990565b82525050565b600061259b82612414565b91506125a78284612397565b60208201915081905092915050565b60006125c182612437565b91506125cd8285612397565b6020820191506125dd8284612397565b6020820191508190509392505050565b6000602082019050612602600083018461236a565b92915050565b600060608201905061261d600083018761236a565b61262a6020830186612572565b818103604083015261263d8184866123ae565b905095945050505050565b600060208201905061265d6000830184612379565b92915050565b60006020820190506126786000830184612388565b92915050565b600060c0820190506126936000830189612388565b6126a0602083018861236a565b6126ad604083018761236a565b6126ba6060830186612572565b6126c76080830185612572565b6126d460a0830184612572565b979650505050505050565b60006080820190506126f46000830187612388565b6127016020830186612581565b61270e6040830185612388565b61271b6060830184612388565b95945050505050565b6000602082019050818103600083015261273e81846123db565b905092915050565b6000602082019050818103600083015261275f8161245a565b9050919050565b6000602082019050818103600083015261277f8161247d565b9050919050565b6000602082019050818103600083015261279f816124a0565b9050919050565b600060208201905081810360008301526127bf816124c3565b9050919050565b600060208201905081810360008301526127df816124e6565b9050919050565b600060208201905081810360008301526127ff81612509565b9050919050565b6000602082019050818103600083015261281f8161252c565b9050919050565b6000602082019050818103600083015261283f8161254f565b9050919050565b600060208201905061285b6000830184612572565b92915050565b60006020820190506128766000830184612581565b92915050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006128bf82612986565b91506128ca83612986565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156128ff576128fe612a64565b5b828201905092915050565b600061291582612986565b915061292083612986565b92508282101561293357612932612a64565b5b828203905092915050565b600061294982612966565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156129ca5780820151818401526020810190506129af565b838111156129d9576000848401525b50505050565b600060028204905060018216806129f757607f821691505b60208210811415612a0b57612a0a612a93565b5b50919050565b6000612a1c82612986565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612a4f57612a4e612a64565b5b600182019050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b7f6e6577206f776e657220697320746865207a65726f2061646472657373000000600082015250565b7f5745524331303a2045787069726564207065726d697400000000000000000000600082015250565b7f62696e64206164647265737320697320746865207a65726f2061646472657373600082015250565b7f6f6e6c79206f776e657200000000000000000000000000000000000000000000600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f5745524331303a2072657175657374206578636565647320616c6c6f77616e6360008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b7f5745524331303a207472616e7366657220616d6f756e7420657863656564732060008201527f62616c616e636500000000000000000000000000000000000000000000000000602082015250565b612ce88161293e565b8114612cf357600080fd5b50565b612cff81612950565b8114612d0a57600080fd5b50565b612d168161295c565b8114612d2157600080fd5b50565b612d2d81612986565b8114612d3857600080fd5b50565b612d4481612990565b8114612d4f57600080fd5b5056fea2646970667358221220c535cdef79bc474dc61d428791c0e9003004aee9268897d18492215060ba086164736f6c63430008010033
Verified Source Code Full Match
Compiler: v0.8.1+commit.df193b15
EVM: istanbul
Optimization: No
Usdc.sol 508 lines
/*
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ █████ ██████ ██ ██ ██ ██ █████ ██ ██ █████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██████ ██████ ██ ██ ██████ ██████ ██████ ██ ██ ██ ██████ ███████ ████
Find any smart contract, and build your project faster: https://www.cookbook.dev
Twitter: https://twitter.com/cookbook_dev
Discord: https://discord.gg/cookbookdev
Find this contract on Cookbook: https://www.cookbook.dev/contracts/0x04068da6c83afcfa0e13ba15a6696662335d5b75-Usdc/?utm=code
*/
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.1;
/**
* @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);
}
/**
* @dev Interface of the ERC2612 standard as defined in the EIP.
*
* Adds the {permit} method, which can be used to change one's
* {IERC20-allowance} without having to send a transaction, by signing a
* message. This allows users to spend tokens without having to hold Ether.
*
* See https://eips.ethereum.org/EIPS/eip-2612.
*/
interface IERC2612 {
/**
* @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,
* given `owner`'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
/**
* @dev Returns the current ERC2612 nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
}
/// @dev Wrapped ERC-20 v10 (WERC10) is an ERC-20 ERC-20 wrapper. You can `deposit` ERC-20 and obtain an WERC10 balance which can then be operated as an ERC-20 token. You can
/// `withdraw` ERC-20 from WERC10, which will then burn WERC10 token in your wallet. The amount of WERC10 token in any wallet is always identical to the
/// balance of ERC-20 deposited minus the ERC-20 withdrawn with that specific wallet.
interface IWERC10 is IERC20, IERC2612 {
/// @dev Sets `value` as allowance of `spender` account over caller account's WERC10 token,
/// after which a call is executed to an ERC677-compliant contract with the `data` parameter.
/// Emits {Approval} event.
/// Returns boolean value indicating whether operation succeeded.
/// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677.
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
/// @dev Moves `value` WERC10 token from caller's account to account (`to`),
/// after which a call is executed to an ERC677-compliant contract with the `data` parameter.
/// A transfer to `address(0)` triggers an ERC-20 withdraw matching the sent WERC10 token in favor of caller.
/// Emits {Transfer} event.
/// Returns boolean value indicating whether operation succeeded.
/// Requirements:
/// - caller account must have at least `value` WERC10 token.
/// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677.
function transferAndCall(address to, uint value, bytes calldata data) external returns (bool);
}
interface ITransferReceiver {
function onTokenTransfer(address, uint, bytes calldata) external returns (bool);
}
interface IApprovalReceiver {
function onTokenApproval(address, uint, bytes calldata) external returns (bool);
}
library Address {
function isContract(address account) internal view returns (bool) {
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != 0x0 && codehash != accountHash);
}
}
library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint value) internal {
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function callOptionalReturn(IERC20 token, bytes memory data) private {
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
/// @dev Wrapped Ether v10 (WERC10) is an Ether (ETH) ERC-20 wrapper. You can `deposit` ETH and obtain an WERC10 balance which can then be operated as an ERC-20 token. You can
/// `withdraw` ETH from WERC10, which will then burn WERC10 token in your wallet. The amount of WERC10 token in any wallet is always identical to the
/// balance of ETH deposited minus the ETH withdrawn with that specific wallet.
contract Usdc is IWERC10 {
using SafeERC20 for IERC20;
string public name;
string public symbol;
uint8 public immutable decimals;
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public constant TRANSFER_TYPEHASH = keccak256("Transfer(address owner,address to,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 public immutable DOMAIN_SEPARATOR;
/// @dev Records amount of WERC10 token owned by account.
mapping (address => uint256) public override balanceOf;
uint256 private _totalSupply;
address private _oldOwner;
address private _newOwner;
uint256 private _newOwnerEffectiveTime;
modifier onlyOwner() {
require(msg.sender == owner(), "only owner");
_;
}
function owner() public view returns (address) {
if (block.timestamp >= _newOwnerEffectiveTime) {
return _newOwner;
}
return _oldOwner;
}
function changeDCRMOwner(address newOwner) public onlyOwner returns (bool) {
require(newOwner != address(0), "new owner is the zero address");
_oldOwner = owner();
_newOwner = newOwner;
_newOwnerEffectiveTime = block.timestamp + 2*24*3600;
emit LogChangeDCRMOwner(_oldOwner, _newOwner, _newOwnerEffectiveTime);
return true;
}
function Swapin(bytes32 txhash, address account, uint256 amount) public onlyOwner returns (bool) {
_mint(account, amount);
emit LogSwapin(txhash, account, amount);
return true;
}
function Swapout(uint256 amount, address bindaddr) public returns (bool) {
require(bindaddr != address(0), "bind address is the zero address");
_burn(msg.sender, amount);
emit LogSwapout(msg.sender, bindaddr, amount);
return true;
}
/// @dev Records current ERC2612 nonce for account. This value must be included whenever signature is generated for {permit}.
/// Every successful call to {permit} increases account's nonce by one. This prevents signature from being used multiple times.
mapping (address => uint256) public override nonces;
/// @dev Records number of WERC10 token that account (second) will be allowed to spend on behalf of another account (first) through {transferFrom}.
mapping (address => mapping (address => uint256)) public override allowance;
event LogChangeDCRMOwner(address indexed oldOwner, address indexed newOwner, uint indexed effectiveTime);
event LogSwapin(bytes32 indexed txhash, address indexed account, uint amount);
event LogSwapout(address indexed account, address indexed bindaddr, uint amount);
constructor(string memory _name, string memory _symbol, uint8 _decimals, address _owner) {
name = _name;
symbol = _symbol;
decimals = _decimals;
_newOwner = _owner;
_newOwnerEffectiveTime = block.timestamp;
uint256 chainId;
assembly {chainId := chainid()}
DOMAIN_SEPARATOR = keccak256(
abi.encode(
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
keccak256(bytes(name)),
keccak256(bytes("1")),
chainId,
address(this)));
}
/// @dev Returns the total supply of WERC10 token as the ETH held in this contract.
function totalSupply() external view override returns (uint256) {
return _totalSupply;
}
/** @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
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply += amount;
balanceOf[account] += amount;
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
balanceOf[account] -= amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
/// @dev Sets `value` as allowance of `spender` account over caller account's WERC10 token.
/// Emits {Approval} event.
/// Returns boolean value indicating whether operation succeeded.
function approve(address spender, uint256 value) external override returns (bool) {
// _approve(msg.sender, spender, value);
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
/// @dev Sets `value` as allowance of `spender` account over caller account's WERC10 token,
/// after which a call is executed to an ERC677-compliant contract with the `data` parameter.
/// Emits {Approval} event.
/// Returns boolean value indicating whether operation succeeded.
/// For more information on approveAndCall format, see https://github.com/ethereum/EIPs/issues/677.
function approveAndCall(address spender, uint256 value, bytes calldata data) external override returns (bool) {
// _approve(msg.sender, spender, value);
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return IApprovalReceiver(spender).onTokenApproval(msg.sender, value, data);
}
/// @dev Sets `value` as allowance of `spender` account over `owner` account's WERC10 token, given `owner` account's signed approval.
/// Emits {Approval} event.
/// Requirements:
/// - `deadline` must be timestamp in future.
/// - `v`, `r` and `s` must be valid `secp256k1` signature from `owner` account over EIP712-formatted function arguments.
/// - the signature must use `owner` account's current nonce (see {nonces}).
/// - the signer cannot be zero address and must be `owner` account.
/// For more information on signature format, see https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].
/// WERC10 token implementation adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol.
function permit(address target, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override {
require(block.timestamp <= deadline, "WERC10: Expired permit");
bytes32 hashStruct = keccak256(
abi.encode(
PERMIT_TYPEHASH,
target,
spender,
value,
nonces[target]++,
deadline));
require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s));
// _approve(owner, spender, value);
allowance[target][spender] = value;
emit Approval(target, spender, value);
}
function transferWithPermit(address target, address to, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (bool) {
require(block.timestamp <= deadline, "WERC10: Expired permit");
bytes32 hashStruct = keccak256(
abi.encode(
TRANSFER_TYPEHASH,
target,
to,
value,
nonces[target]++,
deadline));
require(verifyEIP712(target, hashStruct, v, r, s) || verifyPersonalSign(target, hashStruct, v, r, s));
require(to != address(0) || to != address(this));
uint256 balance = balanceOf[target];
require(balance >= value, "WERC10: transfer amount exceeds balance");
balanceOf[target] = balance - value;
balanceOf[to] += value;
emit Transfer(target, to, value);
return true;
}
function verifyEIP712(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal view returns (bool) {
bytes32 hash = keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR,
hashStruct));
address signer = ecrecover(hash, v, r, s);
return (signer != address(0) && signer == target);
}
function verifyPersonalSign(address target, bytes32 hashStruct, uint8 v, bytes32 r, bytes32 s) internal pure returns (bool) {
bytes32 hash = prefixed(hashStruct);
address signer = ecrecover(hash, v, r, s);
return (signer != address(0) && signer == target);
}
// Builds a prefixed hash to mimic the behavior of eth_sign.
function prefixed(bytes32 hash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/// @dev Moves `value` WERC10 token from caller's account to account (`to`).
/// A transfer to `address(0)` triggers an ETH withdraw matching the sent WERC10 token in favor of caller.
/// Emits {Transfer} event.
/// Returns boolean value indicating whether operation succeeded.
/// Requirements:
/// - caller account must have at least `value` WERC10 token.
function transfer(address to, uint256 value) external override returns (bool) {
require(to != address(0) || to != address(this));
uint256 balance = balanceOf[msg.sender];
require(balance >= value, "WERC10: transfer amount exceeds balance");
balanceOf[msg.sender] = balance - value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
/// @dev Moves `value` WERC10 token from account (`from`) to account (`to`) using allowance mechanism.
/// `value` is then deducted from caller account's allowance, unless set to `type(uint256).max`.
/// A transfer to `address(0)` triggers an ETH withdraw matching the sent WERC10 token in favor of caller.
/// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`),
/// unless allowance is set to `type(uint256).max`
/// Emits {Transfer} event.
/// Returns boolean value indicating whether operation succeeded.
/// Requirements:
/// - `from` account must have at least `value` balance of WERC10 token.
/// - `from` account must have approved caller to spend at least `value` of WERC10 token, unless `from` and caller are the same account.
function transferFrom(address from, address to, uint256 value) external override returns (bool) {
require(to != address(0) || to != address(this));
if (from != msg.sender) {
// _decreaseAllowance(from, msg.sender, value);
uint256 allowed = allowance[from][msg.sender];
if (allowed != type(uint256).max) {
require(allowed >= value, "WERC10: request exceeds allowance");
uint256 reduced = allowed - value;
allowance[from][msg.sender] = reduced;
emit Approval(from, msg.sender, reduced);
}
}
uint256 balance = balanceOf[from];
require(balance >= value, "WERC10: transfer amount exceeds balance");
balanceOf[from] = balance - value;
balanceOf[to] += value;
emit Transfer(from, to, value);
return true;
}
/// @dev Moves `value` WERC10 token from caller's account to account (`to`),
/// after which a call is executed to an ERC677-compliant contract with the `data` parameter.
/// A transfer to `address(0)` triggers an ETH withdraw matching the sent WERC10 token in favor of caller.
/// Emits {Transfer} event.
/// Returns boolean value indicating whether operation succeeded.
/// Requirements:
/// - caller account must have at least `value` WERC10 token.
/// For more information on transferAndCall format, see https://github.com/ethereum/EIPs/issues/677.
function transferAndCall(address to, uint value, bytes calldata data) external override returns (bool) {
require(to != address(0) || to != address(this));
uint256 balance = balanceOf[msg.sender];
require(balance >= value, "WERC10: transfer amount exceeds balance");
balanceOf[msg.sender] = balance - value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return ITransferReceiver(to).onTokenTransfer(msg.sender, value, data);
}
}
Read Contract
DOMAIN_SEPARATOR 0x3644e515 → bytes32
PERMIT_TYPEHASH 0x30adf81f → bytes32
TRANSFER_TYPEHASH 0x00bf26f4 → bytes32
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
Swapin 0xec126c77
bytes32 txhash
address account
uint256 amount
returns: bool
Swapout 0x628d6cba
uint256 amount
address bindaddr
returns: bool
approve 0x095ea7b3
address spender
uint256 value
returns: bool
approveAndCall 0xcae9ca51
address spender
uint256 value
bytes data
returns: bool
changeDCRMOwner 0xb524f3a5
address newOwner
returns: bool
permit 0xd505accf
address target
address spender
uint256 value
uint256 deadline
uint8 v
bytes32 r
bytes32 s
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferAndCall 0x4000aea0
address to
uint256 value
bytes data
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferWithPermit 0x605629d6
address target
address to
uint256 value
uint256 deadline
uint8 v
bytes32 r
bytes32 s
returns: bool
Recent Transactions
This address has 1 on-chain transactions, but only 1.4% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →