Address Contract Verified
Address
0xE8D9Bc2dFF7C0BCFDa1630c9E3978bca4A9B63ce
Balance
0 ETH
Nonce
1
Code Size
17644 bytes
Creator
0x8e0BC91a...070D at tx 0xfc2da9de...b25888
Indexed Transactions
0
Contract Bytecode
17644 bytes
0x6080604052600436106102555760003560e01c8063715018a611610139578063b3e089a2116100b6578063ce3079d61161007a578063ce3079d614610826578063e8f62aa014610851578063eff691721461087c578063f2fde38b146108a7578063f4b464f0146108d0578063fc0c546a146108f95761025c565b8063b3e089a214610755578063b3f006741461077e578063b9d2d9e0146107a9578063c314a1e9146107d2578063c54e44eb146107fb5761025c565b80638da5cb5b116100fd5780638da5cb5b14610682578063acfb2355146106ad578063adf1cba5146106d8578063af2f14ca14610703578063b14f2a391461072c5761025c565b8063715018a6146105c35780637a08ed48146105da57806384345ee3146106035780638980f11f1461062e57806389a30271146106575761025c565b80633dcc0db2116101d257806354f63ee51161019657806354f63ee5146104e6578063578cd32f146104fd57806361d027b31461053a57806369d89575146105655780636bd0f0b91461057c5780636e34d929146105985761025c565b80633dcc0db21461041757806343f9444014610440578063503e3ba71461046957806350c1b92314610492578063512539b6146104bb5761025c565b806330e4f9aa1161021957806330e4f9aa14610320578063333e99db1461034b578063393d7de6146103885780633c47681e146103c55780633d57f1c1146103ee5761025c565b80630412a0b114610261578063153b0d1e1461028c57806318fd84d7146102b55780631ad2ad1a146102e057806320f199e0146102f75761025c565b3661025c57005b600080fd5b34801561026d57600080fd5b50610276610924565b6040516102839190613583565b60405180910390f35b34801561029857600080fd5b506102b360048036038101906102ae9190613639565b61092a565b005b3480156102c157600080fd5b506102ca610a1a565b6040516102d79190613583565b60405180910390f35b3480156102ec57600080fd5b506102f5610a20565b005b34801561030357600080fd5b5061031e600480360381019061031991906136a5565b610ad2565b005b34801561032c57600080fd5b50610335610b71565b6040516103429190613583565b60405180910390f35b34801561035757600080fd5b50610372600480360381019061036d91906136d2565b610b79565b60405161037f919061370e565b60405180910390f35b34801561039457600080fd5b506103af60048036038101906103aa91906136a5565b610b99565b6040516103bc9190613583565b60405180910390f35b3480156103d157600080fd5b506103ec60048036038101906103e791906136d2565b610bcc565b005b3480156103fa57600080fd5b5061041560048036038101906104109190613729565b610ca5565b005b34801561042357600080fd5b5061043e600480360381019061043991906137a7565b6112d7565b005b34801561044c57600080fd5b50610467600480360381019061046291906136a5565b6113b0565b005b34801561047557600080fd5b50610490600480360381019061048b91906137d4565b61144f565b005b34801561049e57600080fd5b506104b960048036038101906104b491906137a7565b611581565b005b3480156104c757600080fd5b506104d061165a565b6040516104dd9190613823565b60405180910390f35b3480156104f257600080fd5b506104fb611680565b005b34801561050957600080fd5b50610524600480360381019061051f91906136a5565b611732565b6040516105319190613583565b60405180910390f35b34801561054657600080fd5b5061054f611788565b60405161055c9190613823565b60405180910390f35b34801561057157600080fd5b5061057a6117ae565b005b6105966004803603810190610591919061387c565b61188c565b005b3480156105a457600080fd5b506105ad611ede565b6040516105ba9190613583565b60405180910390f35b3480156105cf57600080fd5b506105d8611f7f565b005b3480156105e657600080fd5b5061060160048036038101906105fc91906136d2565b6120d2565b005b34801561060f57600080fd5b506106186121ab565b6040516106259190613583565b60405180910390f35b34801561063a57600080fd5b50610655600480360381019061065091906137d4565b6121b1565b005b34801561066357600080fd5b5061066c612337565b6040516106799190613908565b60405180910390f35b34801561068e57600080fd5b5061069761235d565b6040516106a49190613823565b60405180910390f35b3480156106b957600080fd5b506106c2612386565b6040516106cf919061370e565b60405180910390f35b3480156106e457600080fd5b506106ed612399565b6040516106fa919061393f565b60405180910390f35b34801561070f57600080fd5b5061072a600480360381019061072591906136a5565b6123ac565b005b34801561073857600080fd5b50610753600480360381019061074e91906136d2565b61244b565b005b34801561076157600080fd5b5061077c600480360381019061077791906137a7565b612524565b005b34801561078a57600080fd5b506107936125fd565b6040516107a09190613823565b60405180910390f35b3480156107b557600080fd5b506107d060048036038101906107cb919061395a565b612623565b005b3480156107de57600080fd5b506107f960048036038101906107f491906136a5565b61270a565b005b34801561080757600080fd5b506108106127a9565b60405161081d9190613908565b60405180910390f35b34801561083257600080fd5b5061083b6127cf565b6040516108489190613583565b60405180910390f35b34801561085d57600080fd5b506108666127d5565b6040516108739190613583565b60405180910390f35b34801561088857600080fd5b506108916127db565b60405161089e91906139ce565b60405180910390f35b3480156108b357600080fd5b506108ce60048036038101906108c991906136d2565b612801565b005b3480156108dc57600080fd5b506108f760048036038101906108f29190613729565b6129c2565b005b34801561090557600080fd5b5061090e612fec565b60405161091b9190613908565b60405180910390f35b60085481565b610932613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b690613a46565b60405180910390fd5b80600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60095481565b610a28613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac90613a46565b60405180910390fd5b6000600f60016101000a81548160ff021916908315150217905550565b610ada613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5e90613a46565b60405180910390fd5b80600e8190555050565b600047905090565b600c6020528060005260406000206000915054906101000a900460ff1681565b6000610bc5620f4240610bb78460085461301a90919063ffffffff16565b61309490919063ffffffff16565b9050919050565b610bd4613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5890613a46565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610cad6130de565b60011515600f60019054906101000a900460ff16151514610d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfa90613ab2565b60405180910390fd5b600b544210610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90613b1e565b60405180910390fd5b60008211610d8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8190613b8a565b60405180910390fd5b60001515600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610e1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1490613bf6565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610e8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8290613c62565b60405180910390fd5b6000610e9683610b99565b9050600a54610eb8610ea785610b99565b60095461312490919063ffffffff16565b1115610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090613cce565b60405180910390fd5b610f6a33600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613182909392919063ffffffff16565b60006064600e5483610f7c9190613d1d565b610f869190613d8e565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036110a757600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b815260040161105e93929190613dbf565b6020604051808303816000875af115801561107d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a19190613e0b565b50611232565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b815260040161112893929190613dbf565b6020604051808303816000875af1158015611147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116b9190613e0b565b50600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685846040518463ffffffff1660e01b81526004016111ed93929190613dbf565b6020604051808303816000875af115801561120c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112309190613e0b565b505b6112478260095461312490919063ffffffff16565b600981905550600f60009054906101000a900460ff1660ff168373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f113270191b650b68e996dac81142faa9248c3da0e0a45dc0f6822be1abf4218d8585896040516112c193929190613e38565b60405180910390a450506112d361320b565b5050565b6112df613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461136c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136390613a46565b60405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6113b8613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611445576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143c90613a46565b60405180910390fd5b8060088190555050565b611457613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613a46565b60405180910390fd5b61157d3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611532573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115569190613e84565b828473ffffffffffffffffffffffffffffffffffffffff166132149092919063ffffffff16565b5050565b611589613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160d90613a46565b60405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611688613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170c90613a46565b60405180910390fd5b6001600f60016101000a81548160ff021916908315150217905550565b600080670de0b6b3a7640000611746611ede565b846117519190613d1d565b61175b9190613d8e565b905060006305f5e100600854836117729190613d1d565b61177c9190613d8e565b90508092505050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6117b6613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183a90613a46565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611889573d6000803e3d6000fd5b50565b6118946130de565b60011515600f60019054906101000a900460ff161515146118ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e190613ab2565b60405180910390fd5b600b54421061192e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192590613b1e565b60405180910390fd5b60003411611971576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196890613b8a565b60405180910390fd5b60001515600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611a04576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fb90613bf6565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611a72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a6990613c62565b60405180910390fd5b6000611a7d34611732565b9050600a54611a978260095461312490919063ffffffff16565b1115611ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acf90613cce565b60405180910390fd5b60006064600e5483611aea9190613d1d565b611af49190613d8e565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015611b5e573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611c7e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b8152600401611c3593929190613dbf565b6020604051808303816000875af1158015611c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c789190613e0b565b50611e09565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b8152600401611cff93929190613dbf565b6020604051808303816000875af1158015611d1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d429190613e0b565b50600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685846040518463ffffffff1660e01b8152600401611dc493929190613ed2565b6020604051808303816000875af1158015611de3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e079190613e0b565b505b611e1e8260095461312490919063ffffffff16565b600981905550600f60009054906101000a900460ff1660ff168373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f113270191b650b68e996dac81142faa9248c3da0e0a45dc0f6822be1abf4218d85856064670de0b6b3a7640000611e9b611ede565b34611ea69190613d1d565b611eb09190613d8e565b611eba9190613d8e565b604051611ec993929190613e38565b60405180910390a45050611edb61320b565b50565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f729190613f96565b5050509150508091505090565b611f87613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612014576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161200b90613a46565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6120da613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215e90613a46565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b6121b9613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223d90613a46565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d19190613e84565b836040518363ffffffff1660e01b81526004016122ef929190614011565b6020604051808303816000875af115801561230e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123329190613e0b565b505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600f60019054906101000a900460ff1681565b600f60009054906101000a900460ff1681565b6123b4613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612441576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243890613a46565b60405180910390fd5b80600a8190555050565b612453613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146124e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124d790613a46565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61252c613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146125b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b090613a46565b60405180910390fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61262b613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146126b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126af90613a46565b60405180910390fd5b8260088190555081600a8190555080600b81905550600f600081819054906101000a900460ff16809291906126ec9061403a565b91906101000a81548160ff021916908360ff16021790555050505050565b612712613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461279f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279690613a46565b60405180910390fd5b80600b8190555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b600e5481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612809613012565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161288d90613a46565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128fc906140d5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6129ca6130de565b60011515600f60019054906101000a900460ff16151514612a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1790613ab2565b60405180910390fd5b600b544210612a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5b90613b1e565b60405180910390fd5b60008211612aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9e90613b8a565b60405180910390fd5b60001515600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3190613bf6565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614612ba8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b9f90613c62565b60405180910390fd5b6000612bb383610b99565b9050600a54612bcd8260095461312490919063ffffffff16565b1115612c0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c0590613cce565b60405180910390fd5b612c7f33600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16613182909392919063ffffffff16565b60006064600e5483612c919190613d1d565b612c9b9190613d8e565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612dbc57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b8152600401612d7393929190613dbf565b6020604051808303816000875af1158015612d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db69190613e0b565b50612f47565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518463ffffffff1660e01b8152600401612e3d93929190613dbf565b6020604051808303816000875af1158015612e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e809190613e0b565b50600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685846040518463ffffffff1660e01b8152600401612f0293929190613dbf565b6020604051808303816000875af1158015612f21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f459190613e0b565b505b612f5c8260095461312490919063ffffffff16565b600981905550600f60009054906101000a900460ff1660ff168373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f113270191b650b68e996dac81142faa9248c3da0e0a45dc0f6822be1abf4218d858589604051612fd693929190613e38565b60405180910390a45050612fe861320b565b5050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600080830361302c576000905061308e565b6000828461303a9190613d1d565b90508284826130499190613d8e565b14613089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161308090614167565b60405180910390fd5b809150505b92915050565b60006130d683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061329a565b905092915050565b60026001540361311a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b60008082846131339190614187565b905083811015613178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316f90614207565b60405180910390fd5b8091505092915050565b613205846323b872dd60e01b8585856040516024016131a393929190613dbf565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506132fd565b50505050565b60018081905550565b6132958363a9059cbb60e01b8484604051602401613233929190614011565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506132fd565b505050565b600080831182906132e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132d891906142a6565b60405180910390fd5b50600083856132f09190613d8e565b9050809150509392505050565b600061335f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166133c49092919063ffffffff16565b90506000815111156133bf578080602001905181019061337f9190613e0b565b6133be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133b59061433a565b60405180910390fd5b5b505050565b60606133d384846000856133dc565b90509392505050565b606082471015613421576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613418906143cc565b60405180910390fd5b61342a856134f0565b613469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161346090614438565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613492919061449f565b60006040518083038185875af1925050503d80600081146134cf576040519150601f19603f3d011682016040523d82523d6000602084013e6134d4565b606091505b50915091506134e4828286613503565b92505050949350505050565b600080823b905060008111915050919050565b6060831561351357829050613563565b6000835111156135265782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161355a91906142a6565b60405180910390fd5b9392505050565b6000819050919050565b61357d8161356a565b82525050565b60006020820190506135986000830184613574565b92915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006135ce826135a3565b9050919050565b6135de816135c3565b81146135e957600080fd5b50565b6000813590506135fb816135d5565b92915050565b60008115159050919050565b61361681613601565b811461362157600080fd5b50565b6000813590506136338161360d565b92915050565b600080604083850312156136505761364f61359e565b5b600061365e858286016135ec565b925050602061366f85828601613624565b9150509250929050565b6136828161356a565b811461368d57600080fd5b50565b60008135905061369f81613679565b92915050565b6000602082840312156136bb576136ba61359e565b5b60006136c984828501613690565b91505092915050565b6000602082840312156136e8576136e761359e565b5b60006136f6848285016135ec565b91505092915050565b61370881613601565b82525050565b600060208201905061372360008301846136ff565b92915050565b600080604083850312156137405761373f61359e565b5b600061374e85828601613690565b925050602061375f858286016135ec565b9150509250929050565b6000613774826135c3565b9050919050565b61378481613769565b811461378f57600080fd5b50565b6000813590506137a18161377b565b92915050565b6000602082840312156137bd576137bc61359e565b5b60006137cb84828501613792565b91505092915050565b600080604083850312156137eb576137ea61359e565b5b60006137f9858286016135ec565b925050602061380a85828601613690565b9150509250929050565b61381d816135c3565b82525050565b60006020820190506138386000830184613814565b92915050565b6000613849826135a3565b9050919050565b6138598161383e565b811461386457600080fd5b50565b60008135905061387681613850565b92915050565b6000602082840312156138925761389161359e565b5b60006138a084828501613867565b91505092915050565b6000819050919050565b60006138ce6138c96138c4846135a3565b6138a9565b6135a3565b9050919050565b60006138e0826138b3565b9050919050565b60006138f2826138d5565b9050919050565b613902816138e7565b82525050565b600060208201905061391d60008301846138f9565b92915050565b600060ff82169050919050565b61393981613923565b82525050565b60006020820190506139546000830184613930565b92915050565b6000806000606084860312156139735761397261359e565b5b600061398186828701613690565b935050602061399286828701613690565b92505060406139a386828701613690565b9150509250925092565b60006139b8826138d5565b9050919050565b6139c8816139ad565b82525050565b60006020820190506139e360008301846139bf565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a306020836139e9565b9150613a3b826139fa565b602082019050919050565b60006020820190508181036000830152613a5f81613a23565b9050919050565b7f50726573616c65203a2050726573616c65206973206e6f742073746172746564600082015250565b6000613a9c6020836139e9565b9150613aa782613a66565b602082019050919050565b60006020820190508181036000830152613acb81613a8f565b9050919050565b7f50726573616c65203a2053616c652068617320656e6465640000000000000000600082015250565b6000613b086018836139e9565b9150613b1382613ad2565b602082019050919050565b60006020820190508181036000830152613b3781613afb565b9050919050565b7f50726573616c65203a20556e7375697461626c6520416d6f756e740000000000600082015250565b6000613b74601b836139e9565b9150613b7f82613b3e565b602082019050919050565b60006020820190508181036000830152613ba381613b67565b9050919050565b7f50726573616c65203a20796f752061726520626c61636b6c6973746564000000600082015250565b6000613be0601d836139e9565b9150613beb82613baa565b602082019050919050565b60006020820190508181036000830152613c0f81613bd3565b9050919050565b7f50726573616c65203a2063616c6c6572206973206120636f6e74726163740000600082015250565b6000613c4c601e836139e9565b9150613c5782613c16565b602082019050919050565b60006020820190508181036000830152613c7b81613c3f565b9050919050565b7f4861726463617020526561636865642100000000000000000000000000000000600082015250565b6000613cb86010836139e9565b9150613cc382613c82565b602082019050919050565b60006020820190508181036000830152613ce781613cab565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613d288261356a565b9150613d338361356a565b9250828202613d418161356a565b91508282048414831517613d5857613d57613cee565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613d998261356a565b9150613da48361356a565b925082613db457613db3613d5f565b5b828204905092915050565b6000606082019050613dd46000830186613814565b613de16020830185613814565b613dee6040830184613574565b949350505050565b600081519050613e058161360d565b92915050565b600060208284031215613e2157613e2061359e565b5b6000613e2f84828501613df6565b91505092915050565b6000606082019050613e4d6000830186613574565b613e5a6020830185613574565b613e676040830184613574565b949350505050565b600081519050613e7e816135d5565b92915050565b600060208284031215613e9a57613e9961359e565b5b6000613ea884828501613e6f565b91505092915050565b6000613ebc826138d5565b9050919050565b613ecc81613eb1565b82525050565b6000606082019050613ee76000830186613814565b613ef46020830185613ec3565b613f016040830184613574565b949350505050565b600069ffffffffffffffffffff82169050919050565b613f2881613f09565b8114613f3357600080fd5b50565b600081519050613f4581613f1f565b92915050565b6000819050919050565b613f5e81613f4b565b8114613f6957600080fd5b50565b600081519050613f7b81613f55565b92915050565b600081519050613f9081613679565b92915050565b600080600080600060a08688031215613fb257613fb161359e565b5b6000613fc088828901613f36565b9550506020613fd188828901613f6c565b9450506040613fe288828901613f81565b9350506060613ff388828901613f81565b925050608061400488828901613f36565b9150509295509295909350565b60006040820190506140266000830185613814565b6140336020830184613574565b9392505050565b600061404582613923565b915060ff820361405857614057613cee565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006140bf6026836139e9565b91506140ca82614063565b604082019050919050565b600060208201905081810360008301526140ee816140b2565b9050919050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006141516021836139e9565b915061415c826140f5565b604082019050919050565b6000602082019050818103600083015261418081614144565b9050919050565b60006141928261356a565b915061419d8361356a565b92508282019050808211156141b5576141b4613cee565b5b92915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006141f1601b836139e9565b91506141fc826141bb565b602082019050919050565b60006020820190508181036000830152614220816141e4565b9050919050565b600081519050919050565b60005b83811015614250578082015181840152602081019050614235565b60008484015250505050565b6000601f19601f8301169050919050565b600061427882614227565b61428281856139e9565b9350614292818560208601614232565b61429b8161425c565b840191505092915050565b600060208201905081810360008301526142c0818461426d565b905092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000614324602a836139e9565b915061432f826142c8565b604082019050919050565b6000602082019050818103600083015261435381614317565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006143b66026836139e9565b91506143c18261435a565b604082019050919050565b600060208201905081810360008301526143e5816143a9565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000614422601d836139e9565b915061442d826143ec565b602082019050919050565b6000602082019050818103600083015261445181614415565b9050919050565b600081519050919050565b600081905092915050565b600061447982614458565b6144838185614463565b9350614493818560208601614232565b80840191505092915050565b60006144ab828461446e565b91508190509291505056fea264697066735822122068b1dd61405714c8916f3c1f995975d583d03c7168529e3f389fa83afbbf579e64736f6c634300081a0033
Verified Source Code Full Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: paris
Optimization: No
RyfinPresale.sol 917 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{value: amount}("");
require(
success,
"Address: unable to send value, recipient may have reverted"
);
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
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"
);
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{value: value}(
data
);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data
) internal view returns (bytes memory) {
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
library SafeERC20 {
using SafeMath for uint256;
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)
);
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
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).add(
value
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(
value,
"SafeERC20: decreased allowance below zero"
);
_callOptionalReturn(
token,
abi.encodeWithSelector(
token.approve.selector,
spender,
newAllowance
)
);
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(
data,
"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"
);
}
}
}
contract Context {
function _msgSender() internal view virtual returns (address payable) {
return payable(msg.sender);
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
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
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// ETH LIVE PRICE
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
function getRoundData(
uint80 _roundId
)
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
}
/**
* @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 EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* 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/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}
contract RyfnPresale is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
AggregatorV3Interface public priceFeedETH;
address public feeReceiver;
address public treasury;
IERC20 public USDT;
IERC20 public USDC;
IERC20 public token;
uint256 public TokenPricePerUsdt;
uint256 public TokenSold;
uint256 public maxTokeninPresale;
uint256 public currentPhaseEndTimestamp;
mapping(address => bool) public isBlacklist;
address public Nulladdress = 0x0000000000000000000000000000000000000000;
uint256 public ReferralFee = 5; //5%
uint8 public onGoingPhaseId;
bool public presaleStatus;
event TokenSale(
address indexed buyer,
address indexed referrer,
uint8 indexed phaseId,
uint256 amount,
uint256 referralAmount,
uint256 usdValue
);
constructor(
IERC20 _USDT,
IERC20 _USDC,
IERC20 _token,
address _treasury,
address _feeRec
) {
priceFeedETH = AggregatorV3Interface(
0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 //ETH mainnet aggregator
);
USDT = _USDT;
USDC = _USDC;
token = _token;
treasury = _treasury;
feeReceiver = _feeRec;
}
receive() external payable {
// React to receiving ETH
}
// to get real time price of ETH
function getLatestPriceETH() public view returns (uint256) {
(, int256 price, , , ) = priceFeedETH.latestRoundData();
return uint256(price);
}
function setaggregatorv3(address _priceFeedETH) external onlyOwner {
priceFeedETH = AggregatorV3Interface(_priceFeedETH);
}
function setUpNewPhase(
uint256 _newTokenPricePerUsdtIn18Decimals,
uint256 _newMaxTokenInPresaleIn18Decimals,
uint256 _newPhaseEndTimestamp
) external onlyOwner {
TokenPricePerUsdt = _newTokenPricePerUsdtIn18Decimals;
maxTokeninPresale = _newMaxTokenInPresaleIn18Decimals;
currentPhaseEndTimestamp = _newPhaseEndTimestamp;
onGoingPhaseId++;
}
function BuyWithETH(
address payable _refferal
) external payable nonReentrant {
require(presaleStatus == true, "Presale : Presale is not started");
require(
block.timestamp < currentPhaseEndTimestamp,
"Presale : Sale has ended"
);
require(msg.value > 0, "Presale : Unsuitable Amount");
require(
isBlacklist[msg.sender] == false,
"Presale : you are blacklisted"
);
require(tx.origin == msg.sender, "Presale : caller is a contract");
uint256 tokensToTransfer = ETHToToken(msg.value);
require(
TokenSold.add(tokensToTransfer) <= maxTokeninPresale,
"Hardcap Reached!"
);
uint256 perReferral = (tokensToTransfer * ReferralFee) / 100;
payable(feeReceiver).transfer(msg.value);
if (_refferal == Nulladdress) {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
} else {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
token.transferFrom(treasury, _refferal, perReferral);
}
TokenSold = TokenSold.add(tokensToTransfer);
emit TokenSale(
msg.sender,
_refferal,
onGoingPhaseId,
tokensToTransfer,
perReferral,
((msg.value * (getLatestPriceETH())) / (1 ether)) / 100
);
}
function BuyWithUSDT(
uint256 _amt,
address _refferal
) external nonReentrant {
require(presaleStatus == true, "Presale : Presale is not started");
require(
block.timestamp < currentPhaseEndTimestamp,
"Presale : Sale has ended"
);
require(_amt > 0, "Presale : Unsuitable Amount");
require(
isBlacklist[msg.sender] == false,
"Presale : you are blacklisted"
);
require(tx.origin == msg.sender, "Presale : caller is a contract");
uint256 tokensToTransfer = getValuePerUsdt(_amt);
require(
TokenSold.add(tokensToTransfer) <= maxTokeninPresale,
"Hardcap Reached!"
);
IERC20(USDT).safeTransferFrom(msg.sender, feeReceiver, _amt);
uint256 perReferral = (tokensToTransfer * ReferralFee) / 100;
if (_refferal == Nulladdress) {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
} else {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
token.transferFrom(treasury, _refferal, perReferral);
}
TokenSold = TokenSold.add(tokensToTransfer);
emit TokenSale(
msg.sender,
_refferal,
onGoingPhaseId,
tokensToTransfer,
perReferral,
_amt
);
}
function BuyWithUSDC(
uint256 _amt,
address _refferal
) external nonReentrant {
require(presaleStatus == true, "Presale : Presale is not started");
require(
block.timestamp < currentPhaseEndTimestamp,
"Presale : Sale has ended"
);
require(_amt > 0, "Presale : Unsuitable Amount");
require(
isBlacklist[msg.sender] == false,
"Presale : you are blacklisted"
);
require(tx.origin == msg.sender, "Presale : caller is a contract");
uint256 tokensToTransfer = getValuePerUsdt(_amt);
require(
TokenSold.add(getValuePerUsdt(_amt)) <= maxTokeninPresale,
"Hardcap Reached!"
);
IERC20(USDC).safeTransferFrom(msg.sender, feeReceiver, _amt);
uint256 perReferral = (tokensToTransfer * ReferralFee) / 100;
if (_refferal == Nulladdress) {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
} else {
token.transferFrom(treasury, msg.sender, tokensToTransfer);
token.transferFrom(treasury, _refferal, perReferral);
}
TokenSold = TokenSold.add(tokensToTransfer);
emit TokenSale(
msg.sender,
_refferal,
onGoingPhaseId,
tokensToTransfer,
perReferral,
_amt
);
}
function getValuePerUsdt(uint256 _amt) public view returns (uint256) {
return (TokenPricePerUsdt.mul(_amt)).div(1e6);
}
function setPresalePricePerUsdt(uint256 _newPrice) external onlyOwner {
TokenPricePerUsdt = _newPrice;
}
function stopPresale() external onlyOwner {
presaleStatus = false;
}
function resumePresale() external onlyOwner {
presaleStatus = true;
}
function setmaxTokeninPresale(uint256 _value) external onlyOwner {
maxTokeninPresale = _value;
}
function updateCurrentPhaseEndTimestamp(
uint256 _newPhaseEndTimestamp
) external onlyOwner {
currentPhaseEndTimestamp = _newPhaseEndTimestamp;
}
function contractbalance() public view returns (uint256) {
return address(this).balance;
}
function recoverERC20(
address tokenAddress,
uint256 tokenAmount
) external onlyOwner {
IERC20(tokenAddress).transfer(this.owner(), tokenAmount);
}
function EmergencyUSDT(
address _usdt,
uint256 tokenAmount
) external onlyOwner {
IERC20(_usdt).safeTransfer(this.owner(), tokenAmount);
}
function settoken(IERC20 _token) external onlyOwner {
token = _token;
}
function setUSDT(IERC20 _usdt) external onlyOwner {
USDT = _usdt;
}
function setUSDC(IERC20 _USDC) external onlyOwner {
USDC = _USDC;
}
function setBlacklist(address _addr, bool _state) external onlyOwner {
isBlacklist[_addr] = _state;
}
function releaseFunds() external onlyOwner {
payable(msg.sender).transfer(address(this).balance);
}
function ETHToToken(uint256 _amount) public view returns (uint256) {
uint256 ETHToUSD = (_amount * (getLatestPriceETH())) / (1 ether);
uint256 numberOfTokens = (ETHToUSD * (TokenPricePerUsdt)) / (1e8);
return numberOfTokens;
}
function changefeeReceiver(address _newFeeReceiver) external onlyOwner {
feeReceiver = _newFeeReceiver;
}
function changeTreasury(address _newTreasury) external onlyOwner {
treasury = _newTreasury;
}
function change_Fee(uint256 _ReferralFee) external onlyOwner {
ReferralFee = _ReferralFee;
}
}
Read Contract
ETHToToken 0x578cd32f → uint256
Nulladdress 0x512539b6 → address
ReferralFee 0xe8f62aa0 → uint256
TokenPricePerUsdt 0x0412a0b1 → uint256
TokenSold 0x18fd84d7 → uint256
USDC 0x89a30271 → address
USDT 0xc54e44eb → address
contractbalance 0x30e4f9aa → uint256
currentPhaseEndTimestamp 0xce3079d6 → uint256
feeReceiver 0xb3f00674 → address
getLatestPriceETH 0x6e34d929 → uint256
getValuePerUsdt 0x393d7de6 → uint256
isBlacklist 0x333e99db → bool
maxTokeninPresale 0x84345ee3 → uint256
onGoingPhaseId 0xadf1cba5 → uint8
owner 0x8da5cb5b → address
presaleStatus 0xacfb2355 → bool
priceFeedETH 0xeff69172 → address
token 0xfc0c546a → address
treasury 0x61d027b3 → address
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
BuyWithETH 0x6bd0f0b9
address _refferal
BuyWithUSDC 0x3d57f1c1
uint256 _amt
address _refferal
BuyWithUSDT 0xf4b464f0
uint256 _amt
address _refferal
EmergencyUSDT 0x503e3ba7
address _usdt
uint256 tokenAmount
changeTreasury 0xb14f2a39
address _newTreasury
change_Fee 0x20f199e0
uint256 _ReferralFee
changefeeReceiver 0x3c47681e
address _newFeeReceiver
recoverERC20 0x8980f11f
address tokenAddress
uint256 tokenAmount
releaseFunds 0x69d89575
No parameters
renounceOwnership 0x715018a6
No parameters
resumePresale 0x54f63ee5
No parameters
setBlacklist 0x153b0d1e
address _addr
bool _state
setPresalePricePerUsdt 0x43f94440
uint256 _newPrice
setUSDC 0xb3e089a2
address _USDC
setUSDT 0x50c1b923
address _usdt
setUpNewPhase 0xb9d2d9e0
uint256 _newTokenPricePerUsdtIn18Decimals
uint256 _newMaxTokenInPresaleIn18Decimals
uint256 _newPhaseEndTimestamp
setaggregatorv3 0x7a08ed48
address _priceFeedETH
setmaxTokeninPresale 0xaf2f14ca
uint256 _value
settoken 0x3dcc0db2
address _token
stopPresale 0x1ad2ad1a
No parameters
transferOwnership 0xf2fde38b
address newOwner
updateCurrentPhaseEndTimestamp 0xc314a1e9
uint256 _newPhaseEndTimestamp
Recent Transactions
No transactions found for this address