Address Contract Partially Verified
Address
0xf276b52901B3e99525C87ABD2EDCc49903971dF7
Balance
0 ETH
Nonce
1
Code Size
12785 bytes
Creator
0x0b2C0815...9dAb at tx 0xca634f6a...bed620
Indexed Transactions
0
Contract Bytecode
12785 bytes
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063e985e3671161008a578063f3fef3a311610064578063f3fef3a314610543578063f4739ee31461056c578063f9020e33146105aa578063fa09e630146105d55761018c565b8063e985e367146104b2578063f2aa8218146104dd578063f2fde38b1461051a5761018c565b8063715018a6146103b457806380655eef146103cb5780638da5cb5b14610408578063ace1741c14610433578063c4a0869b1461045e578063e36b0b371461049b5761018c565b80633471bbbb1161013e5780635413c1c8116101185780635413c1c81461031957806363b201171461034257806368f8fc101461036d5780636bcedf9c146103895761018c565b80633471bbbb1461029c5780633abd0136146102c55780633c00a36c146102f05761018c565b8063115ece4c1461018e578063204120bc146101cb57806329d429a8146102085780632c4e722e146102315780633115329e1461025c57806333e364cb146102855761018c565b3661018c57005b005b34801561019a57600080fd5b506101b560048036038101906101b09190612131565b6105fe565b6040516101c29190612911565b60405180910390f35b3480156101d757600080fd5b506101f260048036038101906101ed91906120c4565b610789565b6040516101ff9190612911565b60405180910390f35b34801561021457600080fd5b5061022f600480360381019061022a91906120f1565b6107a1565b005b34801561023d57600080fd5b506102466108d5565b6040516102539190612911565b60405180910390f35b34801561026857600080fd5b50610283600480360381019061027e91906121e9565b6108db565b005b34801561029157600080fd5b5061029a610ae8565b005b3480156102a857600080fd5b506102c360048036038101906102be919061233b565b610bd7565b005b3480156102d157600080fd5b506102da610c96565b6040516102e79190612911565b60405180910390f35b3480156102fc57600080fd5b50610317600480360381019061031291906122a1565b610c9c565b005b34801561032557600080fd5b50610340600480360381019061033b9190612171565b610d62565b005b34801561034e57600080fd5b50610357610f58565b6040516103649190612911565b60405180910390f35b61038760048036038101906103829190612131565b610f5e565b005b34801561039557600080fd5b5061039e61128c565b6040516103ab9190612911565b60405180910390f35b3480156103c057600080fd5b506103c9611292565b005b3480156103d757600080fd5b506103f260048036038101906103ed91906120c4565b61131a565b6040516103ff9190612754565b60405180910390f35b34801561041457600080fd5b5061041d61133a565b60405161042a91906126b7565b60405180910390f35b34801561043f57600080fd5b50610448611363565b6040516104559190612911565b60405180910390f35b34801561046a57600080fd5b50610485600480360381019061048091906122fb565b611369565b6040516104929190612732565b60405180910390f35b3480156104a757600080fd5b506104b06115a1565b005b3480156104be57600080fd5b506104c7611690565b6040516104d491906126b7565b60405180910390f35b3480156104e957600080fd5b5061050460048036038101906104ff91906122a1565b6116b6565b60405161051191906126b7565b60405180910390f35b34801561052657600080fd5b50610541600480360381019061053c91906120c4565b6116f5565b005b34801561054f57600080fd5b5061056a60048036038101906105659190612131565b6117ed565b005b34801561057857600080fd5b50610593600480360381019061058e91906120c4565b611898565b6040516105a192919061292c565b60405180910390f35b3480156105b657600080fd5b506105bf6118c9565b6040516105cc9190612754565b60405180910390f35b3480156105e157600080fd5b506105fc60048036038101906105f791906120c4565b6118dc565b005b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146107475760011515600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146106c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106bf906127b1565b60405180910390fd5b6000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061073f81610731600354600a6107229190612b17565b876119f390919063ffffffff16565b611a0990919063ffffffff16565b91505061077f565b61077c60015461076e600354600a61075f9190612b17565b866119f390919063ffffffff16565b611a0990919063ffffffff16565b90505b8091505092915050565b60066020528060005260406000206000915090505481565b6107a9611a1f565b73ffffffffffffffffffffffffffffffffffffffff166107c761133a565b73ffffffffffffffffffffffffffffffffffffffff161461081d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081490612891565b60405180910390fd5b801515600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561087a57600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60015481565b6108e3611a1f565b73ffffffffffffffffffffffffffffffffffffffff1661090161133a565b73ffffffffffffffffffffffffffffffffffffffff1614610957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094e90612891565b60405180910390fd5b815183511461099b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099290612831565b60405180910390fd5b600081146109ab57806001819055505b60005b8351811015610ae25760011515600560008684815181106109d2576109d1612e16565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610a2e57600080fd5b6000838281518110610a4357610a42612e16565b5b60200260200101511415610a5657600080fd5b828181518110610a6957610a68612e16565b5b602002602001015160066000868481518110610a8857610a87612e16565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600181610adb9190612a3d565b90506109ae565b50505050565b610af0611a1f565b73ffffffffffffffffffffffffffffffffffffffff16610b0e61133a565b73ffffffffffffffffffffffffffffffffffffffff1614610b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5b90612891565b60405180910390fd5b60001515600760009054906101000a900460ff16151514610bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb1906127f1565b60405180910390fd5b6001600760006101000a81548160ff021916908315150217905550565b610bdf611a1f565b73ffffffffffffffffffffffffffffffffffffffff16610bfd61133a565b73ffffffffffffffffffffffffffffffffffffffff1614610c53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4a90612891565b60405180910390fd5b6000821415610c6157600080fd5b8160018190555080600760006101000a81548160ff021916908315150217905550836003819055508260048190555050505050565b600a5481565b610ca4611a1f565b73ffffffffffffffffffffffffffffffffffffffff16610cc261133a565b73ffffffffffffffffffffffffffffffffffffffff1614610d18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0f90612891565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d5e573d6000803e3d6000fd5b5050565b610d6a611a1f565b73ffffffffffffffffffffffffffffffffffffffff16610d8861133a565b73ffffffffffffffffffffffffffffffffffffffff1614610dde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd590612891565b60405180910390fd5b8051825114610e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1990612831565b60405180910390fd5b60005b8251811015610f53576000828281518110610e4357610e42612e16565b5b60200260200101511415610e5657600080fd5b600160056000858481518110610e6f57610e6e612e16565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550818181518110610edb57610eda612e16565b5b602002602001015160066000858481518110610efa57610ef9612e16565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080610f4b90612d6f565b915050610e25565b505050565b600b5481565b60011515600760009054906101000a900460ff16151514610fb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fab906128d1565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ffa57610ff56000346105fe565b611005565b61100483836105fe565b5b9050600081141561104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104290612851565b60405180910390fd5b60045481600b5461105c9190612a3d565b1061109c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109390612871565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146110df576110da8383611a27565b6110e8565b6110e7611a5f565b5b80600b60008282546110fa9190612a3d565b92505081905550600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff1661122e576008339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006101000a81548160ff0219169083151502179055506001600a60008282546112269190612a3d565b925050819055505b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282546112809190612a3d565b92505081905550505050565b60045481565b61129a611a1f565b73ffffffffffffffffffffffffffffffffffffffff166112b861133a565b73ffffffffffffffffffffffffffffffffffffffff161461130e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130590612891565b60405180910390fd5b6113186000611aaf565b565b60056020528060005260406000206000915054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60035481565b60608183106113ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a4906127d1565b60405180910390fd5b6000600a5483116113be57826113c2565b600a545b90506000600a5485116113d557846113d9565b600a545b9050600081836113e99190612c8f565b67ffffffffffffffff81111561140257611401612e45565b5b60405190808252806020026020018201604052801561143b57816020015b611428611eef565b8152602001906001900390816114205790505b50905060008290505b8381101561159457600960006008838154811061146457611463612e16565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548282815181106114e0576114df612e16565b5b602002602001015160000181815250506008818154811061150457611503612e16565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061154257611541612e16565b5b60200260200101516020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060018161158d9190612a3d565b9050611444565b5080935050505092915050565b6115a9611a1f565b73ffffffffffffffffffffffffffffffffffffffff166115c761133a565b73ffffffffffffffffffffffffffffffffffffffff161461161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161490612891565b60405180910390fd5b60011515600760009054906101000a900460ff16151514611673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166a906128d1565b60405180910390fd5b6000600760006101000a81548160ff021916908315150217905550565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600881815481106116c657600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116fd611a1f565b73ffffffffffffffffffffffffffffffffffffffff1661171b61133a565b73ffffffffffffffffffffffffffffffffffffffff1614611771576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176890612891565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d890612791565b60405180910390fd5b6117ea81611aaf565b50565b6117f5611a1f565b73ffffffffffffffffffffffffffffffffffffffff1661181361133a565b73ffffffffffffffffffffffffffffffffffffffff1614611869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186090612891565b60405180910390fd5b61189433828473ffffffffffffffffffffffffffffffffffffffff16611b739092919063ffffffff16565b5050565b60096020528060005260406000206000915090508060000154908060010160009054906101000a900460ff16905082565b600760009054906101000a900460ff1681565b6118e4611a1f565b73ffffffffffffffffffffffffffffffffffffffff1661190261133a565b73ffffffffffffffffffffffffffffffffffffffff1614611958576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194f90612891565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161199391906126b7565b60206040518083038186803b1580156119ab57600080fd5b505afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e391906122ce565b90506119ef82826117ed565b5050565b60008183611a019190612c35565b905092915050565b60008183611a179190612a93565b905092915050565b600033905090565b611a5b33611a3361133a565b838573ffffffffffffffffffffffffffffffffffffffff16611bf9909392919063ffffffff16565b5050565b611a6761133a565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015611aac573d6000803e3d6000fd5b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611bf48363a9059cbb60e01b8484604051602401611b92929190612709565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c82565b505050565b611c7c846323b872dd60e01b858585604051602401611c1a939291906126d2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c82565b50505050565b6000611ce4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d499092919063ffffffff16565b9050600081511115611d445780806020019051810190611d049190612274565b611d43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3a906128f1565b60405180910390fd5b5b505050565b6060611d588484600085611d61565b90509392505050565b606082471015611da6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9d90612811565b60405180910390fd5b611daf85611e75565b611dee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de5906128b1565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e1791906126a0565b60006040518083038185875af1925050503d8060008114611e54576040519150601f19603f3d011682016040523d82523d6000602084013e611e59565b606091505b5091509150611e69828286611e88565b92505050949350505050565b600080823b905060008111915050919050565b60608315611e9857829050611ee8565b600083511115611eab5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edf919061276f565b60405180910390fd5b9392505050565b604051806040016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000611f32611f2d8461297a565b612955565b90508083825260208201905082856020860282011115611f5557611f54612e79565b5b60005b85811015611f855781611f6b8882611fff565b845260208401935060208301925050600181019050611f58565b5050509392505050565b6000611fa2611f9d846129a6565b612955565b90508083825260208201905082856020860282011115611fc557611fc4612e79565b5b60005b85811015611ff55781611fdb888261209a565b845260208401935060208301925050600181019050611fc8565b5050509392505050565b60008135905061200e81613176565b92915050565b600082601f83011261202957612028612e74565b5b8135612039848260208601611f1f565b91505092915050565b600082601f83011261205757612056612e74565b5b8135612067848260208601611f8f565b91505092915050565b60008135905061207f8161318d565b92915050565b6000815190506120948161318d565b92915050565b6000813590506120a9816131a4565b92915050565b6000815190506120be816131a4565b92915050565b6000602082840312156120da576120d9612e83565b5b60006120e884828501611fff565b91505092915050565b6000806040838503121561210857612107612e83565b5b600061211685828601611fff565b925050602061212785828601612070565b9150509250929050565b6000806040838503121561214857612147612e83565b5b600061215685828601611fff565b92505060206121678582860161209a565b9150509250929050565b6000806040838503121561218857612187612e83565b5b600083013567ffffffffffffffff8111156121a6576121a5612e7e565b5b6121b285828601612014565b925050602083013567ffffffffffffffff8111156121d3576121d2612e7e565b5b6121df85828601612042565b9150509250929050565b60008060006060848603121561220257612201612e83565b5b600084013567ffffffffffffffff8111156122205761221f612e7e565b5b61222c86828701612014565b935050602084013567ffffffffffffffff81111561224d5761224c612e7e565b5b61225986828701612042565b925050604061226a8682870161209a565b9150509250925092565b60006020828403121561228a57612289612e83565b5b600061229884828501612085565b91505092915050565b6000602082840312156122b7576122b6612e83565b5b60006122c58482850161209a565b91505092915050565b6000602082840312156122e4576122e3612e83565b5b60006122f2848285016120af565b91505092915050565b6000806040838503121561231257612311612e83565b5b60006123208582860161209a565b92505060206123318582860161209a565b9150509250929050565b6000806000806080858703121561235557612354612e83565b5b60006123638782880161209a565b94505060206123748782880161209a565b93505060406123858782880161209a565b925050606061239687828801612070565b91505092959194509250565b60006123ae8383612653565b60408301905092915050565b6123c381612cc3565b82525050565b6123d281612cc3565b82525050565b60006123e3826129e2565b6123ed8185612a10565b93506123f8836129d2565b8060005b8381101561242957815161241088826123a2565b975061241b83612a03565b9250506001810190506123fc565b5085935050505092915050565b61243f81612cd5565b82525050565b6000612450826129ed565b61245a8185612a21565b935061246a818560208601612d0b565b80840191505092915050565b6000612481826129f8565b61248b8185612a2c565b935061249b818560208601612d0b565b6124a481612e88565b840191505092915050565b60006124bc602683612a2c565b91506124c782612ea6565b604082019050919050565b60006124df601a83612a2c565b91506124ea82612ef5565b602082019050919050565b6000612502602683612a2c565b915061250d82612f1e565b604082019050919050565b6000612525601783612a2c565b915061253082612f6d565b602082019050919050565b6000612548602683612a2c565b915061255382612f96565b604082019050919050565b600061256b602f83612a2c565b915061257682612fe5565b604082019050919050565b600061258e601483612a2c565b915061259982613034565b602082019050919050565b60006125b1602583612a2c565b91506125bc8261305d565b604082019050919050565b60006125d4602083612a2c565b91506125df826130ac565b602082019050919050565b60006125f7601d83612a2c565b9150612602826130d5565b602082019050919050565b600061261a601783612a2c565b9150612625826130fe565b602082019050919050565b600061263d602a83612a2c565b915061264882613127565b604082019050919050565b6040820160008201516126696000850182612682565b50602082015161267c60208501826123ba565b50505050565b61268b81612d01565b82525050565b61269a81612d01565b82525050565b60006126ac8284612445565b915081905092915050565b60006020820190506126cc60008301846123c9565b92915050565b60006060820190506126e760008301866123c9565b6126f460208301856123c9565b6127016040830184612691565b949350505050565b600060408201905061271e60008301856123c9565b61272b6020830184612691565b9392505050565b6000602082019050818103600083015261274c81846123d8565b905092915050565b60006020820190506127696000830184612436565b92915050565b600060208201905081810360008301526127898184612476565b905092915050565b600060208201905081810360008301526127aa816124af565b9050919050565b600060208201905081810360008301526127ca816124d2565b9050919050565b600060208201905081810360008301526127ea816124f5565b9050919050565b6000602082019050818103600083015261280a81612518565b9050919050565b6000602082019050818103600083015261282a8161253b565b9050919050565b6000602082019050818103600083015261284a8161255e565b9050919050565b6000602082019050818103600083015261286a81612581565b9050919050565b6000602082019050818103600083015261288a816125a4565b9050919050565b600060208201905081810360008301526128aa816125c7565b9050919050565b600060208201905081810360008301526128ca816125ea565b9050919050565b600060208201905081810360008301526128ea8161260d565b9050919050565b6000602082019050818103600083015261290a81612630565b9050919050565b60006020820190506129266000830184612691565b92915050565b60006040820190506129416000830185612691565b61294e6020830184612436565b9392505050565b600061295f612970565b905061296b8282612d3e565b919050565b6000604051905090565b600067ffffffffffffffff82111561299557612994612e45565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156129c1576129c0612e45565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000612a4882612d01565b9150612a5383612d01565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612a8857612a87612db8565b5b828201905092915050565b6000612a9e82612d01565b9150612aa983612d01565b925082612ab957612ab8612de7565b5b828204905092915050565b6000808291508390505b6001851115612b0e57808604811115612aea57612ae9612db8565b5b6001851615612af95780820291505b8081029050612b0785612e99565b9450612ace565b94509492505050565b6000612b2282612d01565b9150612b2d83612d01565b9250612b5a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612b62565b905092915050565b600082612b725760019050612c2e565b81612b805760009050612c2e565b8160018114612b965760028114612ba057612bcf565b6001915050612c2e565b60ff841115612bb257612bb1612db8565b5b8360020a915084821115612bc957612bc8612db8565b5b50612c2e565b5060208310610133831016604e8410600b8410161715612c045782820a905083811115612bff57612bfe612db8565b5b612c2e565b612c118484846001612ac4565b92509050818404811115612c2857612c27612db8565b5b81810290505b9392505050565b6000612c4082612d01565b9150612c4b83612d01565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c8457612c83612db8565b5b828202905092915050565b6000612c9a82612d01565b9150612ca583612d01565b925082821015612cb857612cb7612db8565b5b828203905092915050565b6000612cce82612ce1565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015612d29578082015181840152602081019050612d0e565b83811115612d38576000848401525b50505050565b612d4782612e88565b810181811067ffffffffffffffff82111715612d6657612d65612e45565b5b80604052505050565b6000612d7a82612d01565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612dad57612dac612db8565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160011c9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f50726573616c653a20546f6b656e206e6f7420616c6c6f776564000000000000600082015250565b7f50726573616c653a205f66726f6d2073686f756c64206265206c65737320746860008201527f616e205f746f0000000000000000000000000000000000000000000000000000602082015250565b7f50726573616c653a206973206e6f742073746f70706564000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f50726573616c653a20746f6b656e73202620707269636573206172726179732060008201527f6c656e677468206d69736d617463680000000000000000000000000000000000602082015250565b7f50726573616c653a20416d6f756e742069732030000000000000000000000000600082015250565b7f50726573616c653a204e6f7420656e6f75676820746f6b656e7320746f20626560008201527f2073616c65000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f50726573616c653a206973206e6f7420656e61626c6564000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61317f81612cc3565b811461318a57600080fd5b50565b61319681612cd5565b81146131a157600080fd5b50565b6131ad81612d01565b81146131b857600080fd5b5056fea26469706673582212208b85d68e4792c3f9ea5def6fc4191e9fc506a5406c5000eb885eee6c8052ffbd64736f6c63430008060033
Verified Source Code Partial Match
Compiler: v0.8.6+commit.11564f7e
EVM: berlin
Optimization: No
PresaleEVM.sol 664 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library SafeMath {
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);
}
}
function trySub(
uint256 a,
uint256 b
) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(
uint256 a,
uint256 b
) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(
uint256 a,
uint256 b
) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(
uint256 a,
uint256 b
) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
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;
}
}
pragma solidity ^0.8.0;
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
_transferOwnership(_msgSender());
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
pragma solidity ^0.8.0;
contract OwnerWithdrawable is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
receive() external payable {}
fallback() external payable {}
function withdraw(address token, uint256 amt) public onlyOwner {
IERC20(token).safeTransfer(msg.sender, amt);
}
function withdrawAll(address token) public onlyOwner {
uint256 amt = IERC20(token).balanceOf(address(this));
withdraw(token, amt);
}
function withdrawCurrency(uint256 amt) public onlyOwner {
payable(msg.sender).transfer(amt);
}
// function deposit(address token, uint256 amt) public onlyOwner {
// uint256 allowance = IERC20(token).allowance(msg.sender, address(this));
// require(allowance >= amt, "Check the token allowance");
// IERC20(token).transferFrom(owner(), address(this), amt);
// }
}
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(
data
);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(
address target,
bytes memory data
) internal view returns (bytes memory) {
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
pragma solidity ^0.8.0;
library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transfer.selector, to, value)
);
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(
token,
abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
);
}
function safeApprove(
IERC20 token,
address spender,
uint256 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 safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(
oldAllowance >= value,
"SafeERC20: decreased allowance below zero"
);
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(
data,
"SafeERC20: low-level call failed"
);
if (returndata.length > 0) {
require(
abi.decode(returndata, (bool)),
"SafeERC20: ERC20 operation did not succeed"
);
}
}
}
pragma solidity ^0.8.0;
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
pragma solidity ^0.8.0;
contract PresaleEVM is OwnerWithdrawable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Metadata;
uint256 public rate;
address public saleToken;
uint public saleTokenDec;
uint256 public totalTokensforSale;
mapping(address => bool) public payableTokens;
mapping(address => uint256) public tokenPrices;
bool public saleStatus;
address[] public buyers;
mapping(address => BuyerDetails) public buyersDetails;
uint256 public totalBuyers;
uint256 public totalTokensSold;
struct BuyerDetails {
uint amount;
bool exists;
}
struct BuyerAmount {
uint amount;
address buyer;
}
constructor() {
saleStatus = false;
}
modifier saleEnabled() {
require(saleStatus == true, "Presale: is not enabled");
_;
}
modifier saleStoped() {
require(saleStatus == false, "Presale: is not stopped");
_;
}
function initSale(
uint256 _decimals,
uint256 _totalTokensforSale,
uint256 _rate,
bool _saleStatus
) external onlyOwner {
require(_rate != 0);
rate = _rate;
saleStatus = _saleStatus;
saleTokenDec = _decimals;
totalTokensforSale = _totalTokensforSale;
}
function stopSale() external onlyOwner saleEnabled {
saleStatus = false;
}
function resumeSale() external onlyOwner saleStoped {
saleStatus = true;
}
function addPayableTokens(
address[] memory _tokens,
uint256[] memory _prices
) external onlyOwner {
require(
_tokens.length == _prices.length,
"Presale: tokens & prices arrays length mismatch"
);
for (uint256 i = 0; i < _tokens.length; i++) {
require(_prices[i] != 0);
payableTokens[_tokens[i]] = true;
tokenPrices[_tokens[i]] = _prices[i];
}
}
function payableTokenStatus(
address _token,
bool _status
) external onlyOwner {
require(payableTokens[_token] != _status);
payableTokens[_token] = _status;
}
function updateTokenRate(
address[] memory _tokens,
uint256[] memory _prices,
uint256 _rate
) external onlyOwner {
require(
_tokens.length == _prices.length,
"Presale: tokens & prices arrays length mismatch"
);
if (_rate != 0) {
rate = _rate;
}
for (uint256 i = 0; i < _tokens.length; i += 1) {
require(payableTokens[_tokens[i]] == true);
require(_prices[i] != 0);
tokenPrices[_tokens[i]] = _prices[i];
}
}
function getTokenAmount(
address token,
uint256 amount
) public view returns (uint256) {
uint256 amtOut;
if (token != address(0)) {
require(payableTokens[token] == true, "Presale: Token not allowed");
uint256 price = tokenPrices[token];
amtOut = amount.mul(10 ** saleTokenDec).div(price);
} else {
amtOut = amount.mul(10 ** saleTokenDec).div(rate);
}
return amtOut;
}
function transferETH() private {
payable(owner()).transfer(msg.value);
}
function transferToken(address _token, uint256 _amount) private {
IERC20(_token).safeTransferFrom(
msg.sender,
owner(),
_amount
);
}
function buyToken(
address _token,
uint256 _amount
) external payable saleEnabled {
uint256 saleTokenAmt = _token != address(0)
? getTokenAmount(_token, _amount)
: getTokenAmount(address(0), msg.value);
require(saleTokenAmt != 0, "Presale: Amount is 0");
require(
(totalTokensSold + saleTokenAmt) < totalTokensforSale,
"Presale: Not enough tokens to be sale"
);
if (_token != address(0)) {
transferToken(_token, _amount);
} else {
transferETH();
}
totalTokensSold += saleTokenAmt;
if (!buyersDetails[msg.sender].exists) {
buyers.push(msg.sender);
buyersDetails[msg.sender].exists = true;
totalBuyers += 1;
}
buyersDetails[msg.sender].amount += saleTokenAmt;
}
function exportBuyers(
uint _from,
uint _to
) external view returns (BuyerAmount[] memory) {
require(_from < _to, "Presale: _from should be less than _to");
uint to = _to > totalBuyers ? totalBuyers : _to;
uint from = _from > totalBuyers ? totalBuyers : _from;
BuyerAmount[] memory buyersAmt = new BuyerAmount[](to - from);
for (uint i = from; i < to; i += 1) {
buyersAmt[i].amount = buyersDetails[buyers[i]].amount;
buyersAmt[i].buyer = buyers[i];
}
return buyersAmt;
}
}
Read Contract
buyers 0xf2aa8218 → address
buyersDetails 0xf4739ee3 → uint256, bool
exportBuyers 0xc4a0869b → tuple[]
getTokenAmount 0x115ece4c → uint256
owner 0x8da5cb5b → address
payableTokens 0x80655eef → bool
rate 0x2c4e722e → uint256
saleStatus 0xf9020e33 → bool
saleToken 0xe985e367 → address
saleTokenDec 0xace1741c → uint256
tokenPrices 0x204120bc → uint256
totalBuyers 0x3abd0136 → uint256
totalTokensSold 0x63b20117 → uint256
totalTokensforSale 0x6bcedf9c → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
addPayableTokens 0x5413c1c8
address[] _tokens
uint256[] _prices
buyToken 0x68f8fc10
address _token
uint256 _amount
initSale 0x3471bbbb
uint256 _decimals
uint256 _totalTokensforSale
uint256 _rate
bool _saleStatus
payableTokenStatus 0x29d429a8
address _token
bool _status
renounceOwnership 0x715018a6
No parameters
resumeSale 0x33e364cb
No parameters
stopSale 0xe36b0b37
No parameters
transferOwnership 0xf2fde38b
address newOwner
updateTokenRate 0x3115329e
address[] _tokens
uint256[] _prices
uint256 _rate
withdraw 0xf3fef3a3
address token
uint256 amt
withdrawAll 0xfa09e630
address token
withdrawCurrency 0x3c00a36c
uint256 amt
Recent Transactions
No transactions found for this address