Address Contract Partially Verified
Address
0x195c9F2604dF60C0Ba13EE6a754435116a251e83
Balance
0 ETH
Nonce
1
Code Size
10760 bytes
Creator
0xBae9b4B5...dE77 at tx 0xd4c37914...c400b0
Indexed Transactions
0
Contract Bytecode
10760 bytes
0x608060405260043610610228575f3560e01c80638d1eccd711610122578063d3a4eb14116100aa578063e730395a1161006e578063e730395a146109fd578063e93ed22414610a39578063eb91d37e14610a63578063f02cbb9514610a8d578063f71e4bef14610ab757610497565b8063d3a4eb141461092d578063e086e5ec14610957578063e0bab4c41461096d578063e28a1b8614610997578063e5afe3e6146109c157610497565b8063a2e78dfa116100f1578063a2e78dfa1461084d578063bd4c1c6d14610889578063c3f01a19146108b1578063c54e44eb146108db578063ce4391df1461090557610497565b80638d1eccd7146107a55780638da5cb5b146107cf5780639b8906ae146107f95780639d76ea581461082357610497565b806342f6fb29116101b05780636e621978116101745780636e621978146106eb5780637cc1ab5d146107015780638456cb591461073d578063894760691461075357806389a302711461077b57610497565b806342f6fb291461062f5780634e71d92d1461065957806350d3c3b11461066f5780635c975abb146106995780635f6deb29146106c357610497565b80632675249b116101f75780632675249b1461054f57806326a4e8d2146105795780632b2da7c8146105a15780633d5dff53146105dd5780633f4ba83a1461061957610497565b80630783cb2e1461049b5780630b8b1e25146104d757806319d13c5d146104ff578063219149391461052757610497565b3661049757600860019054906101000a900460ff161561027d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161027490611fc9565b60405180910390fd5b60085f9054906101000a900460ff16156102cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c390612031565b60405180910390fd5b5f6102d634610ae1565b90505f6102e1610c15565b90505f81670de0b6b3a7640000846102f99190612085565b61030391906120f3565b90508260025f8282546103169190612123565b9250508190555082600c5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546103699190612123565b9250508190555080600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546103bc9190612123565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167f5f7675b09617d2c9fa4fd13058ee5877a9538f626b0308816736e83748a45040848360405161040b929190612165565b60405180910390a260146001601480549050610427919061218c565b81548110610438576104376121bf565b5b905f5260205f200154610449610ccc565b1061049557600160085f6101000a81548160ff0219169083151502179055507f0bd8a3eb532e5fbcd3f5b00335f0fb42fdc11969e9af0fab7c9e71a36ae0d31a60405160405180910390a15b005b5f5ffd5b3480156104a6575f5ffd5b506104c160048036038101906104bc919061224a565b610cfc565b6040516104ce9190612275565b60405180910390f35b3480156104e2575f5ffd5b506104fd60048036038101906104f891906122b8565b610d11565b005b34801561050a575f5ffd5b50610525600480360381019061052091906122b8565b610d3f565b005b348015610532575f5ffd5b5061054d600480360381019061054891906122b8565b610e0f565b005b34801561055a575f5ffd5b50610563610e3d565b6040516105709190612275565b60405180910390f35b348015610584575f5ffd5b5061059f600480360381019061059a919061224a565b610e43565b005b3480156105ac575f5ffd5b506105c760048036038101906105c2919061224a565b610f4c565b6040516105d49190612275565b60405180910390f35b3480156105e8575f5ffd5b5061060360048036038101906105fe919061224a565b610f61565b6040516106109190612275565b60405180910390f35b348015610624575f5ffd5b5061062d610f76565b005b34801561063a575f5ffd5b5061064361104d565b604051610650919061233e565b60405180910390f35b348015610664575f5ffd5b5061066d611072565b005b34801561067a575f5ffd5b50610683611347565b6040516106909190612275565b60405180910390f35b3480156106a4575f5ffd5b506106ad61134d565b6040516106ba9190612371565b60405180910390f35b3480156106ce575f5ffd5b506106e960048036038101906106e491906123b4565b611360565b005b3480156106f6575f5ffd5b506106ff61140b565b005b34801561070c575f5ffd5b50610727600480360381019061072291906122b8565b611531565b6040516107349190612275565b60405180910390f35b348015610748575f5ffd5b50610751611551565b005b34801561075e575f5ffd5b506107796004803603810190610774919061224a565b611629565b005b348015610786575f5ffd5b5061078f611812565b60405161079c91906123ff565b60405180910390f35b3480156107b0575f5ffd5b506107b9610ccc565b6040516107c69190612275565b60405180910390f35b3480156107da575f5ffd5b506107e3611837565b6040516107f09190612427565b60405180910390f35b348015610804575f5ffd5b5061080d61185c565b60405161081a9190612371565b60405180910390f35b34801561082e575f5ffd5b5061083761186e565b6040516108449190612427565b60405180910390f35b348015610858575f5ffd5b50610873600480360381019061086e919061224a565b611893565b6040516108809190612275565b60405180910390f35b348015610894575f5ffd5b506108af60048036038101906108aa91906122b8565b6118a8565b005b3480156108bc575f5ffd5b506108c56118d6565b6040516108d29190612275565b60405180910390f35b3480156108e6575f5ffd5b506108ef6118e2565b6040516108fc91906123ff565b60405180910390f35b348015610910575f5ffd5b5061092b600480360381019061092691906122b8565b611907565b005b348015610938575f5ffd5b506109416119a0565b60405161094e9190612371565b60405180910390f35b348015610962575f5ffd5b5061096b6119b2565b005b348015610978575f5ffd5b50610981611aa8565b60405161098e91906123ff565b60405180910390f35b3480156109a2575f5ffd5b506109ab611acd565b6040516109b89190612275565b60405180910390f35b3480156109cc575f5ffd5b506109e760048036038101906109e291906122b8565b611ad3565b6040516109f49190612275565b60405180910390f35b348015610a08575f5ffd5b50610a236004803603810190610a1e919061224a565b611af3565b604051610a309190612275565b60405180910390f35b348015610a44575f5ffd5b50610a4d611b08565b604051610a5a9190612275565b60405180910390f35b348015610a6e575f5ffd5b50610a77610c15565b604051610a849190612275565b60405180910390f35b348015610a98575f5ffd5b50610aa1611b0e565b604051610aae9190612275565b60405180910390f35b348015610ac2575f5ffd5b50610acb611b14565b604051610ad89190612275565b60405180910390f35b5f600a5f9054906101000a900460ff1615610b1a576305f5e10060095483610b099190612085565b610b1391906120f3565b9050610c10565b5f60135f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610b85573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba991906124c6565b5050509150505f8113610bf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be890612587565b60405180910390fd5b6305f5e1008184610c029190612085565b610c0c91906120f3565b9150505b919050565b5f5f610c1f610ccc565b90505f60148054905090505b5f811115610ca7576014600182610c42919061218c565b81548110610c5357610c526121bf565b5b905f5260205f2001548210610c94576015600182610c71919061218c565b81548110610c8257610c816121bf565b5b905f5260205f20015492505050610cc9565b8080610c9f906125a5565b915050610c2b565b5060155f81548110610cbc57610cbb6121bf565b5b905f5260205f2001549150505b90565b5f600554600454600354600254610ce39190612123565b610ced9190612123565b610cf79190612123565b905090565b600f602052805f5260405f205f915090505481565b610d3c60125f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682611b1a565b50565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610dce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc590612616565b60405180910390fd5b806007819055507f532eb26018fa722a98e290cc2e4e2326dafc0e3f6bc758bfd6d9dc6bec2429f481604051610e049190612275565b60405180910390a150565b610e3a60105f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682611b1a565b50565b60045481565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ed2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec990612616565b60405180910390fd5b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd82cad5fdc98633445b90f806f2e1a61a5409f92187ee9cd87f1da18c906926681604051610f419190612427565b60405180910390a150565b600e602052805f5260405f205f915090505481565b600b602052805f5260405f205f915090505481565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611005576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffc90612616565b60405180910390fd5b5f600860016101000a81548160ff0219169083151502179055507fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693360405160405180910390a1565b60135f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61107a611f19565b5f73ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611109576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111009061267e565b60405180910390fd5b60075442101561114e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611145906126e6565b60405180910390fd5b5f600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f81116111d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c89061274e565b60405180910390fd5b5f600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b815260040161126f92919061276c565b6020604051808303815f875af115801561128b573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112af91906127a7565b6112ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e59061281c565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430826040516113349190612275565b60405180910390a250611345611f66565b565b60075481565b600860019054906101000a900460ff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e690612616565b60405180910390fd5b80600a5f6101000a81548160ff02191690831515021790555050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461149a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149190612616565b60405180910390fd5b60085f9054906101000a900460ff16156114e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e090612884565b60405180910390fd5b600160085f6101000a81548160ff0219169083151502179055507f0bd8a3eb532e5fbcd3f5b00335f0fb42fdc11969e9af0fab7c9e71a36ae0d31a60405160405180910390a1565b60148181548110611540575f80fd5b905f5260205f20015f915090505481565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d790612616565b60405180910390fd5b6001600860016101000a81548160ff0219169083151502179055507f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75260405160405180910390a1565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116af90612616565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116f29190612427565b602060405180830381865afa15801561170d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061173191906128a2565b90508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b815260040161178f92919061276c565b6020604051808303815f875af11580156117ab573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117cf91906127a7565b61180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180590612917565b60405180910390fd5b5050565b60105f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085f9054906101000a900460ff1681565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d602052805f5260405f205f915090505481565b6118d360115f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682611b1a565b50565b670de0b6b3a764000081565b60115f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198d90612616565b60405180910390fd5b8060098190555050565b600a5f9054906101000a900460ff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3890612616565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015611aa5573d5f5f3e3d5ffd5b50565b60125f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60095481565b60158181548110611ae2575f80fd5b905f5260205f20015f915090505481565b600c602052805f5260405f205f915090505481565b60055481565b60035481565b60025481565b600860019054906101000a900460ff1615611b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6190611fc9565b60405180910390fd5b60085f9054906101000a900460ff1615611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090612031565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401611bf693929190612935565b6020604051808303815f875af1158015611c12573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c3691906127a7565b611c75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6c9061281c565b60405180910390fd5b5f81905060105f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611ce6578060035f828254611cde9190612123565b925050819055505b60115f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d53578060045f828254611d4b9190612123565b925050819055505b60125f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611dc0578060055f828254611db89190612123565b925050819055505b5f611dc9610c15565b90505f81670de0b6b3a764000084611de19190612085565b611deb91906120f3565b905080600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611e399190612123565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167f5f7675b09617d2c9fa4fd13058ee5877a9538f626b0308816736e83748a450408483604051611e88929190612165565b60405180910390a260146001601480549050611ea4919061218c565b81548110611eb557611eb46121bf565b5b905f5260205f200154611ec6610ccc565b10611f1257600160085f6101000a81548160ff0219169083151502179055507f0bd8a3eb532e5fbcd3f5b00335f0fb42fdc11969e9af0fab7c9e71a36ae0d31a60405160405180910390a15b5050505050565b60025f5403611f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f54906129b4565b60405180910390fd5b60025f81905550565b60015f81905550565b5f82825260208201905092915050565b7f50726573616c65207061757365640000000000000000000000000000000000005f82015250565b5f611fb3600e83611f6f565b9150611fbe82611f7f565b602082019050919050565b5f6020820190508181035f830152611fe081611fa7565b9050919050565b7f50726573616c6520656e646564000000000000000000000000000000000000005f82015250565b5f61201b600d83611f6f565b915061202682611fe7565b602082019050919050565b5f6020820190508181035f8301526120488161200f565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61208f8261204f565b915061209a8361204f565b92508282026120a88161204f565b915082820484148315176120bf576120be612058565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6120fd8261204f565b91506121088361204f565b925082612118576121176120c6565b5b828204905092915050565b5f61212d8261204f565b91506121388361204f565b92508282019050808211156121505761214f612058565b5b92915050565b61215f8161204f565b82525050565b5f6040820190506121785f830185612156565b6121856020830184612156565b9392505050565b5f6121968261204f565b91506121a18361204f565b92508282039050818111156121b9576121b8612058565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612219826121f0565b9050919050565b6122298161220f565b8114612233575f5ffd5b50565b5f8135905061224481612220565b92915050565b5f6020828403121561225f5761225e6121ec565b5b5f61226c84828501612236565b91505092915050565b5f6020820190506122885f830184612156565b92915050565b6122978161204f565b81146122a1575f5ffd5b50565b5f813590506122b28161228e565b92915050565b5f602082840312156122cd576122cc6121ec565b5b5f6122da848285016122a4565b91505092915050565b5f819050919050565b5f6123066123016122fc846121f0565b6122e3565b6121f0565b9050919050565b5f612317826122ec565b9050919050565b5f6123288261230d565b9050919050565b6123388161231e565b82525050565b5f6020820190506123515f83018461232f565b92915050565b5f8115159050919050565b61236b81612357565b82525050565b5f6020820190506123845f830184612362565b92915050565b61239381612357565b811461239d575f5ffd5b50565b5f813590506123ae8161238a565b92915050565b5f602082840312156123c9576123c86121ec565b5b5f6123d6848285016123a0565b91505092915050565b5f6123e98261230d565b9050919050565b6123f9816123df565b82525050565b5f6020820190506124125f8301846123f0565b92915050565b6124218161220f565b82525050565b5f60208201905061243a5f830184612418565b92915050565b5f69ffffffffffffffffffff82169050919050565b61245e81612440565b8114612468575f5ffd5b50565b5f8151905061247981612455565b92915050565b5f819050919050565b6124918161247f565b811461249b575f5ffd5b50565b5f815190506124ac81612488565b92915050565b5f815190506124c08161228e565b92915050565b5f5f5f5f5f60a086880312156124df576124de6121ec565b5b5f6124ec8882890161246b565b95505060206124fd8882890161249e565b945050604061250e888289016124b2565b935050606061251f888289016124b2565b92505060806125308882890161246b565b9150509295509295909350565b7f496e76616c6964207072696365000000000000000000000000000000000000005f82015250565b5f612571600d83611f6f565b915061257c8261253d565b602082019050919050565b5f6020820190508181035f83015261259e81612565565b9050919050565b5f6125af8261204f565b91505f82036125c1576125c0612058565b5b600182039050919050565b7f4e6f74206f776e657200000000000000000000000000000000000000000000005f82015250565b5f612600600983611f6f565b915061260b826125cc565b602082019050919050565b5f6020820190508181035f83015261262d816125f4565b9050919050565b7f546f6b656e206e6f7420736574000000000000000000000000000000000000005f82015250565b5f612668600d83611f6f565b915061267382612634565b602082019050919050565b5f6020820190508181035f8301526126958161265c565b9050919050565b7f436c61696d206e6f7420756e6c6f636b656400000000000000000000000000005f82015250565b5f6126d0601283611f6f565b91506126db8261269c565b602082019050919050565b5f6020820190508181035f8301526126fd816126c4565b9050919050565b7f4e6f20746f6b656e73206f7765640000000000000000000000000000000000005f82015250565b5f612738600e83611f6f565b915061274382612704565b602082019050919050565b5f6020820190508181035f8301526127658161272c565b9050919050565b5f60408201905061277f5f830185612418565b61278c6020830184612156565b9392505050565b5f815190506127a18161238a565b92915050565b5f602082840312156127bc576127bb6121ec565b5b5f6127c984828501612793565b91505092915050565b7f5472616e73666572206661696c656400000000000000000000000000000000005f82015250565b5f612806600f83611f6f565b9150612811826127d2565b602082019050919050565b5f6020820190508181035f830152612833816127fa565b9050919050565b7f50726573616c6520616c726561647920656e64656400000000000000000000005f82015250565b5f61286e601583611f6f565b91506128798261283a565b602082019050919050565b5f6020820190508181035f83015261289b81612862565b9050919050565b5f602082840312156128b7576128b66121ec565b5b5f6128c4848285016124b2565b91505092915050565b7f5769746864726177206661696c656400000000000000000000000000000000005f82015250565b5f612901600f83611f6f565b915061290c826128cd565b602082019050919050565b5f6020820190508181035f83015261292e816128f5565b9050919050565b5f6060820190506129485f830186612418565b6129556020830185612418565b6129626040830184612156565b949350505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f61299e601f83611f6f565b91506129a98261296a565b602082019050919050565b5f6020820190508181035f8301526129cb81612992565b905091905056fea2646970667358221220ac5cf2bc64f61a868ecedabe2036c5da25831740cb2765a2d88c1b7f0ad8ddcc64736f6c634300081d0033
Verified Source Code Partial Match
Compiler: v0.8.29+commit.ab55807c
EVM: cancun
Optimization: No
CSWEPPresale.sol 271 lines
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.9.0 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/
*/
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
// File: CSWEPPresale.sol
pragma solidity ^0.8.19;
interface IERC20 {
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
interface AggregatorV3Interface {
function latestRoundData() external view returns (
uint80, int, uint, uint, uint80
);
}
contract CSWEPPresale is ReentrancyGuard {
address public owner;
uint256 public totalRaisedETH;
uint256 public totalRaisedUSDC;
uint256 public totalRaisedUSDT;
uint256 public totalRaisedDAI;
address public tokenAddress;
uint256 public claimUnlockTime;
bool public saleEnded = false;
bool public paused = false;
uint256 public fallbackPrice = 0;
bool public useFallback = false;
mapping(address => uint256) public tokensOwed;
mapping(address => uint256) public ethContributions;
mapping(address => uint256) public usdcContributions;
mapping(address => uint256) public usdtContributions;
mapping(address => uint256) public daiContributions;
IERC20 public USDC;
IERC20 public USDT;
IERC20 public DAI;
AggregatorV3Interface public ethUsdPriceFeed;
uint256 public constant usdUnit = 1e18;
uint256[] public phaseThresholds = [
0 * usdUnit,
25000 * usdUnit,
50000 * usdUnit,
75000 * usdUnit,
100000 * usdUnit,
150000 * usdUnit,
200000 * usdUnit,
300000 * usdUnit,
400000 * usdUnit,
500000 * usdUnit,
650000 * usdUnit,
800000 * usdUnit,
1000000 * usdUnit
];
uint256[] public tokenPrices = [
1e15, 2e15, 3e15, 4e15, 5e15,
6e15, 7e15, 8e15, 9e15, 1e16,
11e15, 12e15, 13e15
];
event Contribution(address indexed buyer, uint256 usdValue, uint256 tokensAllocated);
event TokensClaimed(address indexed buyer, uint256 amount);
event TokenAddressSet(address token);
event ClaimUnlockTimeSet(uint256 timestamp);
event SaleEnded();
event Paused();
event Unpaused();
modifier onlyOwner() {
require(msg.sender == owner, "Not owner");
_;
}
modifier notPaused() {
require(!paused, "Presale paused");
_;
}
constructor(address _usdc, address _usdt, address _dai, address _priceFeed) {
owner = msg.sender;
USDC = IERC20(_usdc);
USDT = IERC20(_usdt);
DAI = IERC20(_dai);
ethUsdPriceFeed = AggregatorV3Interface(_priceFeed);
}
receive() external payable notPaused {
require(!saleEnded, "Presale ended");
uint256 usdAmount = getEthInUsd(msg.value);
uint256 price = getCurrentPrice();
uint256 tokenAmount = (usdAmount * 1e18) / price;
totalRaisedETH += usdAmount;
ethContributions[msg.sender] += usdAmount;
tokensOwed[msg.sender] += tokenAmount;
emit Contribution(msg.sender, usdAmount, tokenAmount);
if (getTotalRaisedUSD() >= phaseThresholds[phaseThresholds.length - 1]) {
saleEnded = true;
emit SaleEnded();
}
}
function contributeStable(address token, uint256 amount) internal notPaused {
require(!saleEnded, "Presale ended");
require(IERC20(token).transferFrom(msg.sender, address(this), amount), "Transfer failed");
uint256 usdAmount = amount;
if (token == address(USDC)) totalRaisedUSDC += usdAmount;
if (token == address(USDT)) totalRaisedUSDT += usdAmount;
if (token == address(DAI)) totalRaisedDAI += usdAmount;
uint256 price = getCurrentPrice();
uint256 tokenAmount = (usdAmount * 1e18) / price;
tokensOwed[msg.sender] += tokenAmount;
emit Contribution(msg.sender, usdAmount, tokenAmount);
if (getTotalRaisedUSD() >= phaseThresholds[phaseThresholds.length - 1]) {
saleEnded = true;
emit SaleEnded();
}
}
function contributeUSDC(uint256 amount) external {
contributeStable(address(USDC), amount);
}
function contributeUSDT(uint256 amount) external {
contributeStable(address(USDT), amount);
}
function contributeDAI(uint256 amount) external {
contributeStable(address(DAI), amount);
}
function claim() external nonReentrant {
require(tokenAddress != address(0), "Token not set");
require(block.timestamp >= claimUnlockTime, "Claim not unlocked");
uint256 amount = tokensOwed[msg.sender];
require(amount > 0, "No tokens owed");
tokensOwed[msg.sender] = 0;
require(IERC20(tokenAddress).transfer(msg.sender, amount), "Transfer failed");
emit TokensClaimed(msg.sender, amount);
}
function getEthInUsd(uint256 ethAmount) internal view returns (uint256) {
if (useFallback) return (ethAmount * fallbackPrice) / 1e8;
(, int price,,,) = ethUsdPriceFeed.latestRoundData();
require(price > 0, "Invalid price");
return (ethAmount * uint256(price)) / 1e8;
}
function getCurrentPrice() public view returns (uint256) {
uint256 totalUSD = getTotalRaisedUSD();
for (uint256 i = phaseThresholds.length; i > 0; i--) {
if (totalUSD >= phaseThresholds[i - 1]) {
return tokenPrices[i - 1];
}
}
return tokenPrices[0];
}
function getTotalRaisedUSD() public view returns (uint256) {
return totalRaisedETH + totalRaisedUSDC + totalRaisedUSDT + totalRaisedDAI;
}
function setTokenAddress(address _token) external onlyOwner {
tokenAddress = _token;
emit TokenAddressSet(_token);
}
function setClaimUnlockTime(uint256 _timestamp) external onlyOwner {
claimUnlockTime = _timestamp;
emit ClaimUnlockTimeSet(_timestamp);
}
function manualEndPresale() external onlyOwner {
require(!saleEnded, "Presale already ended");
saleEnded = true;
emit SaleEnded();
}
function withdrawToken(address token) external onlyOwner {
uint256 balance = IERC20(token).balanceOf(address(this));
require(IERC20(token).transfer(owner, balance), "Withdraw failed");
}
function withdrawETH() external onlyOwner {
payable(owner).transfer(address(this).balance);
}
function pause() external onlyOwner {
paused = true;
emit Paused();
}
function unpause() external onlyOwner {
paused = false;
emit Unpaused();
}
function setFallbackPrice(uint256 price) external onlyOwner {
fallbackPrice = price;
}
function toggleFallback(bool use) external onlyOwner {
useFallback = use;
}
}
Read Contract
DAI 0xe0bab4c4 → address
USDC 0x89a30271 → address
USDT 0xc54e44eb → address
claimUnlockTime 0x50d3c3b1 → uint256
daiContributions 0x0783cb2e → uint256
ethContributions 0xe730395a → uint256
ethUsdPriceFeed 0x42f6fb29 → address
fallbackPrice 0xe28a1b86 → uint256
getCurrentPrice 0xeb91d37e → uint256
getTotalRaisedUSD 0x8d1eccd7 → uint256
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
phaseThresholds 0x7cc1ab5d → uint256
saleEnded 0x9b8906ae → bool
tokenAddress 0x9d76ea58 → address
tokenPrices 0xe5afe3e6 → uint256
tokensOwed 0x3d5dff53 → uint256
totalRaisedDAI 0xe93ed224 → uint256
totalRaisedETH 0xf71e4bef → uint256
totalRaisedUSDC 0xf02cbb95 → uint256
totalRaisedUSDT 0x2675249b → uint256
usdUnit 0xc3f01a19 → uint256
usdcContributions 0xa2e78dfa → uint256
usdtContributions 0x2b2da7c8 → uint256
useFallback 0xd3a4eb14 → bool
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
claim 0x4e71d92d
No parameters
contributeDAI 0x0b8b1e25
uint256 amount
contributeUSDC 0x21914939
uint256 amount
contributeUSDT 0xbd4c1c6d
uint256 amount
manualEndPresale 0x6e621978
No parameters
pause 0x8456cb59
No parameters
setClaimUnlockTime 0x19d13c5d
uint256 _timestamp
setFallbackPrice 0xce4391df
uint256 price
setTokenAddress 0x26a4e8d2
address _token
toggleFallback 0x5f6deb29
bool use
unpause 0x3f4ba83a
No parameters
withdrawETH 0xe086e5ec
No parameters
withdrawToken 0x89476069
address token
Recent Transactions
No transactions found for this address