Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 7005676 | 137 days ago | IN | 0 ETH | 0.00041525 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FaucetERC20
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-11-03 */ // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } // File: contracts/FaucetERC20.sol //SPDX-License-Identifier: MIT pragma solidity 0.8.26; contract FaucetERC20 { IERC20 immutable public tokenContract; mapping(address => uint) public nextTry; uint constant INTERVAL = 86400;//24h uint constant AMOUNT = 0.1 ether; constructor(address tokenAddress){ tokenContract = IERC20(tokenAddress); } function withdraw() external { require(block.timestamp > nextTry[msg.sender], "Invalid withdraw"); nextTry[msg.sender] = block.timestamp + INTERVAL; tokenContract.transfer(msg.sender, AMOUNT); } }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nextTry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561000f575f80fd5b5060405161062b38038061062b833981810160405281019061003191906100c9565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506100f4565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100988261006f565b9050919050565b6100a88161008e565b81146100b2575f80fd5b50565b5f815190506100c38161009f565b92915050565b5f602082840312156100de576100dd61006b565b5b5f6100eb848285016100b5565b91505092915050565b6080516105186101135f395f818161016a015261022401526105185ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80633ccfd60b1461004357806346f812011461004d57806355a373d61461007d575b5f80fd5b61004b61009b565b005b610067600480360381019061006291906102a4565b61020e565b60405161007491906102e7565b60405180910390f35b610085610222565b604051610092919061035b565b60405180910390f35b5f803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20544211610119576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610110906103ce565b60405180910390fd5b62015180426101289190610419565b5f803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3367016345785d8a00006040518363ffffffff1660e01b81526004016101cb92919061045b565b6020604051808303815f875af11580156101e7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020b91906104b7565b50565b5f602052805f5260405f205f915090505481565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102738261024a565b9050919050565b61028381610269565b811461028d575f80fd5b50565b5f8135905061029e8161027a565b92915050565b5f602082840312156102b9576102b8610246565b5b5f6102c684828501610290565b91505092915050565b5f819050919050565b6102e1816102cf565b82525050565b5f6020820190506102fa5f8301846102d8565b92915050565b5f819050919050565b5f61032361031e6103198461024a565b610300565b61024a565b9050919050565b5f61033482610309565b9050919050565b5f6103458261032a565b9050919050565b6103558161033b565b82525050565b5f60208201905061036e5f83018461034c565b92915050565b5f82825260208201905092915050565b7f496e76616c6964207769746864726177000000000000000000000000000000005f82015250565b5f6103b8601083610374565b91506103c382610384565b602082019050919050565b5f6020820190508181035f8301526103e5816103ac565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610423826102cf565b915061042e836102cf565b9250828201905080821115610446576104456103ec565b5b92915050565b61045581610269565b82525050565b5f60408201905061046e5f83018561044c565b61047b60208301846102d8565b9392505050565b5f8115159050919050565b61049681610482565b81146104a0575f80fd5b50565b5f815190506104b18161048d565b92915050565b5f602082840312156104cc576104cb610246565b5b5f6104d9848285016104a3565b9150509291505056fea264697066735822122085106f5e1417d826024ad7d989fa8b6a1d93a963a55bb6ea6a40ac1e23bdf2cb64736f6c634300081a00330000000000000000000000009e08687b0546122689ddea81b784f1ca41166652
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c80633ccfd60b1461004357806346f812011461004d57806355a373d61461007d575b5f80fd5b61004b61009b565b005b610067600480360381019061006291906102a4565b61020e565b60405161007491906102e7565b60405180910390f35b610085610222565b604051610092919061035b565b60405180910390f35b5f803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20544211610119576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610110906103ce565b60405180910390fd5b62015180426101289190610419565b5f803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055507f0000000000000000000000009e08687b0546122689ddea81b784f1ca4116665273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3367016345785d8a00006040518363ffffffff1660e01b81526004016101cb92919061045b565b6020604051808303815f875af11580156101e7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061020b91906104b7565b50565b5f602052805f5260405f205f915090505481565b7f0000000000000000000000009e08687b0546122689ddea81b784f1ca4116665281565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102738261024a565b9050919050565b61028381610269565b811461028d575f80fd5b50565b5f8135905061029e8161027a565b92915050565b5f602082840312156102b9576102b8610246565b5b5f6102c684828501610290565b91505092915050565b5f819050919050565b6102e1816102cf565b82525050565b5f6020820190506102fa5f8301846102d8565b92915050565b5f819050919050565b5f61032361031e6103198461024a565b610300565b61024a565b9050919050565b5f61033482610309565b9050919050565b5f6103458261032a565b9050919050565b6103558161033b565b82525050565b5f60208201905061036e5f83018461034c565b92915050565b5f82825260208201905092915050565b7f496e76616c6964207769746864726177000000000000000000000000000000005f82015250565b5f6103b8601083610374565b91506103c382610384565b602082019050919050565b5f6020820190508181035f8301526103e5816103ac565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610423826102cf565b915061042e836102cf565b9250828201905080821115610446576104456103ec565b5b92915050565b61045581610269565b82525050565b5f60408201905061046e5f83018561044c565b61047b60208301846102d8565b9392505050565b5f8115159050919050565b61049681610482565b81146104a0575f80fd5b50565b5f815190506104b18161048d565b92915050565b5f602082840312156104cc576104cb610246565b5b5f6104d9848285016104a3565b9150509291505056fea264697066735822122085106f5e1417d826024ad7d989fa8b6a1d93a963a55bb6ea6a40ac1e23bdf2cb64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009e08687b0546122689ddea81b784f1ca41166652
-----Decoded View---------------
Arg [0] : tokenAddress (address): 0x9e08687B0546122689DDEA81b784f1ca41166652
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009e08687b0546122689ddea81b784f1ca41166652
Deployed Bytecode Sourcemap
2980:534:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3285:226;;;:::i;:::-;;3054:39;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3010:37;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3285:226;3351:7;:19;3359:10;3351:19;;;;;;;;;;;;;;;;3333:15;:37;3325:66;;;;;;;;;;;;:::i;:::-;;;;;;;;;3131:5;3424:15;:26;;;;:::i;:::-;3402:7;:19;3410:10;3402:19;;;;;;;;;;;;;;;:48;;;;3461:13;:22;;;3484:10;3171:9;3461:42;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3285:226::o;3054:39::-;;;;;;;;;;;;;;;;;:::o;3010:37::-;;;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:329::-;900:6;949:2;937:9;928:7;924:23;920:32;917:119;;;955:79;;:::i;:::-;917:119;1075:1;1100:53;1145:7;1136:6;1125:9;1121:22;1100:53;:::i;:::-;1090:63;;1046:117;841:329;;;;:::o;1176:77::-;1213:7;1242:5;1231:16;;1176:77;;;:::o;1259:118::-;1346:24;1364:5;1346:24;:::i;:::-;1341:3;1334:37;1259:118;;:::o;1383:222::-;1476:4;1514:2;1503:9;1499:18;1491:26;;1527:71;1595:1;1584:9;1580:17;1571:6;1527:71;:::i;:::-;1383:222;;;;:::o;1611:60::-;1639:3;1660:5;1653:12;;1611:60;;;:::o;1677:142::-;1727:9;1760:53;1778:34;1787:24;1805:5;1787:24;:::i;:::-;1778:34;:::i;:::-;1760:53;:::i;:::-;1747:66;;1677:142;;;:::o;1825:126::-;1875:9;1908:37;1939:5;1908:37;:::i;:::-;1895:50;;1825:126;;;:::o;1957:139::-;2020:9;2053:37;2084:5;2053:37;:::i;:::-;2040:50;;1957:139;;;:::o;2102:157::-;2202:50;2246:5;2202:50;:::i;:::-;2197:3;2190:63;2102:157;;:::o;2265:248::-;2371:4;2409:2;2398:9;2394:18;2386:26;;2422:84;2503:1;2492:9;2488:17;2479:6;2422:84;:::i;:::-;2265:248;;;;:::o;2519:169::-;2603:11;2637:6;2632:3;2625:19;2677:4;2672:3;2668:14;2653:29;;2519:169;;;;:::o;2694:166::-;2834:18;2830:1;2822:6;2818:14;2811:42;2694:166;:::o;2866:366::-;3008:3;3029:67;3093:2;3088:3;3029:67;:::i;:::-;3022:74;;3105:93;3194:3;3105:93;:::i;:::-;3223:2;3218:3;3214:12;3207:19;;2866:366;;;:::o;3238:419::-;3404:4;3442:2;3431:9;3427:18;3419:26;;3491:9;3485:4;3481:20;3477:1;3466:9;3462:17;3455:47;3519:131;3645:4;3519:131;:::i;:::-;3511:139;;3238:419;;;:::o;3663:180::-;3711:77;3708:1;3701:88;3808:4;3805:1;3798:15;3832:4;3829:1;3822:15;3849:191;3889:3;3908:20;3926:1;3908:20;:::i;:::-;3903:25;;3942:20;3960:1;3942:20;:::i;:::-;3937:25;;3985:1;3982;3978:9;3971:16;;4006:3;4003:1;4000:10;3997:36;;;4013:18;;:::i;:::-;3997:36;3849:191;;;;:::o;4046:118::-;4133:24;4151:5;4133:24;:::i;:::-;4128:3;4121:37;4046:118;;:::o;4170:332::-;4291:4;4329:2;4318:9;4314:18;4306:26;;4342:71;4410:1;4399:9;4395:17;4386:6;4342:71;:::i;:::-;4423:72;4491:2;4480:9;4476:18;4467:6;4423:72;:::i;:::-;4170:332;;;;;:::o;4508:90::-;4542:7;4585:5;4578:13;4571:21;4560:32;;4508:90;;;:::o;4604:116::-;4674:21;4689:5;4674:21;:::i;:::-;4667:5;4664:32;4654:60;;4710:1;4707;4700:12;4654:60;4604:116;:::o;4726:137::-;4780:5;4811:6;4805:13;4796:22;;4827:30;4851:5;4827:30;:::i;:::-;4726:137;;;;:::o;4869:345::-;4936:6;4985:2;4973:9;4964:7;4960:23;4956:32;4953:119;;;4991:79;;:::i;:::-;4953:119;5111:1;5136:61;5189:7;5180:6;5169:9;5165:22;5136:61;:::i;:::-;5126:71;;5082:125;4869:345;;;;:::o
Swarm Source
ipfs://85106f5e1417d826024ad7d989fa8b6a1d93a963a55bb6ea6a40ac1e23bdf2cb
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.