Sepolia Testnet

Contract

0xe403E74BB5454307f021F7f64e95cd4D088aF5A6
Source Code
Transaction Hash
Method
Block
From
To
Value
Get EUR Oe44628762023-10-10 11:20:4859 days 7 hrs ago1696936848IN
0xe403E7...088aF5A6
0 ETH0.000085621.50000002
Get EUR Oe44368412023-10-06 13:34:1263 days 5 hrs ago1696599252IN
0xe403E7...088aF5A6
0 ETH0.000085621.50000129
Get EUR Oe41975532023-08-31 12:14:2499 days 7 hrs ago1693484064IN
0xe403E7...088aF5A6
0 ETH0.000136361.50057248
Get EUR Oe41587602023-08-25 16:09:12105 days 3 hrs ago1692979752IN
0xe403E7...088aF5A6
0 ETH0.000794848.74660032
Get EUR Oe39938482023-07-30 14:38:24131 days 4 hrs ago1690727904IN
0xe403E7...088aF5A6
0 ETH0.000136761.50494291
Get EUR Oe35893122023-05-30 12:52:48192 days 6 hrs ago1685451168IN
0xe403E7...088aF5A6
0 ETH0.000024191
Get EUR Oe35829562023-05-29 13:42:12193 days 5 hrs ago1685367732IN
0xe403E7...088aF5A6
0 ETH0.000090871
Get EUR Oe35829542023-05-29 13:41:48193 days 5 hrs ago1685367708IN
0xe403E7...088aF5A6
0 ETH0.000090871
0x6080604035825942023-05-29 12:22:36193 days 6 hrs ago1685362956IN
 Create: Faucet
0 ETH0.001241942.5

Advanced mode:
Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Faucet

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2023-05-29
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

interface ERC20 {
    function transfer(address to, uint256 value) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    function balanceOf(address account) external view returns (uint256);
}
/**
@title A faucet contract for dispersing ERC20 tokens, such as EUROe
@author Membrane Finance
@notice This contract lets anyone withdraw and top up the tokens in the contract
 */
contract Faucet {
    uint256 constant public tokenAmount = 100000000; // 100 EUROe
    uint256 constant public cooldown = 24 hours; // Must wait 24h between faucet calls per address

    ERC20 public tokenAddress;

    mapping(address => uint256) lastUse;

    constructor(address _tokenAddress) {
        tokenAddress = ERC20(_tokenAddress);
    }

    /**
     * @dev Gives the caller 100 EUROe
     */
    function getEUROe() public {
        require(withdrawalAllowed(msg.sender), "You can only withdraw from the contract every 24 hours");
        tokenAddress.transfer(msg.sender, tokenAmount);
        lastUse[msg.sender] = block.timestamp;
    }

    /**
     * @dev Returns the contract's current EUROe balance. Please notify the team if the contract is empty
     */
    function getBalance() public view returns (uint256) {
        return ERC20(tokenAddress).balanceOf(address(this));
    }

    /**
     * @dev Determines if withdrawals are allowed to caller's address
     */
    function withdrawalAllowed(address _address) public view returns (bool) {
        if (lastUse[_address] == 0) {
            return true;
        } 
        else if (block.timestamp >= lastUse[_address] + cooldown) {
            return true;
        }
        else {
            return false;
        }
        
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"cooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEUROe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenAddress","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"withdrawalAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161089e38038061089e8339818101604052810190610032919061008d565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506100ff565b600081519050610087816100e8565b92915050565b60006020828403121561009f57600080fd5b60006100ad84828501610078565b91505092915050565b60006100c1826100c8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6100f1816100b6565b81146100fc57600080fd5b50565b6107908061010e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806312065fe014610067578063196428c514610085578063685ca1941461008f578063787a08a6146100bf5780639d76ea58146100dd578063eec7faa1146100fb575b600080fd5b61006f610119565b60405161007c91906105a9565b60405180910390f35b61008d6101ca565b005b6100a960048036038101906100a49190610435565b61030a565b6040516100b69190610553565b60405180910390f35b6100c76103c3565b6040516100d491906105a9565b60405180910390f35b6100e56103ca565b6040516100f2919061056e565b60405180910390f35b6101036103ee565b60405161011091906105a9565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610175919061050f565b60206040518083038186803b15801561018d57600080fd5b505afa1580156101a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c59190610487565b905090565b6101d33361030a565b610212576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020990610589565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336305f5e1006040518363ffffffff1660e01b815260040161027192919061052a565b602060405180830381600087803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c3919061045e565b5042600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561035c57600190506103be565b62015180600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103aa91906105d5565b42106103b957600190506103be565b600090505b919050565b6201518081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6305f5e10081565b60008135905061040581610715565b92915050565b60008151905061041a8161072c565b92915050565b60008151905061042f81610743565b92915050565b60006020828403121561044757600080fd5b6000610455848285016103f6565b91505092915050565b60006020828403121561047057600080fd5b600061047e8482850161040b565b91505092915050565b60006020828403121561049957600080fd5b60006104a784828501610420565b91505092915050565b6104b98161062b565b82525050565b6104c88161063d565b82525050565b6104d781610673565b82525050565b60006104ea6036836105c4565b91506104f5826106c6565b604082019050919050565b61050981610669565b82525050565b600060208201905061052460008301846104b0565b92915050565b600060408201905061053f60008301856104b0565b61054c6020830184610500565b9392505050565b600060208201905061056860008301846104bf565b92915050565b600060208201905061058360008301846104ce565b92915050565b600060208201905081810360008301526105a2816104dd565b9050919050565b60006020820190506105be6000830184610500565b92915050565b600082825260208201905092915050565b60006105e082610669565b91506105eb83610669565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106205761061f610697565b5b828201905092915050565b600061063682610649565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061067e82610685565b9050919050565b600061069082610649565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f596f752063616e206f6e6c792077697468647261772066726f6d20746865206360008201527f6f6e747261637420657665727920323420686f75727300000000000000000000602082015250565b61071e8161062b565b811461072957600080fd5b50565b6107358161063d565b811461074057600080fd5b50565b61074c81610669565b811461075757600080fd5b5056fea2646970667358221220761878e48b7a5544c7bbc411f9b4f7d8c58a67d5a1381cb3439210d9f8be272a64736f6c63430008040033000000000000000000000000a089a21902914c3f3325dbe2334e9b466071e5f1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c806312065fe014610067578063196428c514610085578063685ca1941461008f578063787a08a6146100bf5780639d76ea58146100dd578063eec7faa1146100fb575b600080fd5b61006f610119565b60405161007c91906105a9565b60405180910390f35b61008d6101ca565b005b6100a960048036038101906100a49190610435565b61030a565b6040516100b69190610553565b60405180910390f35b6100c76103c3565b6040516100d491906105a9565b60405180910390f35b6100e56103ca565b6040516100f2919061056e565b60405180910390f35b6101036103ee565b60405161011091906105a9565b60405180910390f35b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610175919061050f565b60206040518083038186803b15801561018d57600080fd5b505afa1580156101a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c59190610487565b905090565b6101d33361030a565b610212576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020990610589565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336305f5e1006040518363ffffffff1660e01b815260040161027192919061052a565b602060405180830381600087803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c3919061045e565b5042600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561035c57600190506103be565b62015180600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103aa91906105d5565b42106103b957600190506103be565b600090505b919050565b6201518081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6305f5e10081565b60008135905061040581610715565b92915050565b60008151905061041a8161072c565b92915050565b60008151905061042f81610743565b92915050565b60006020828403121561044757600080fd5b6000610455848285016103f6565b91505092915050565b60006020828403121561047057600080fd5b600061047e8482850161040b565b91505092915050565b60006020828403121561049957600080fd5b60006104a784828501610420565b91505092915050565b6104b98161062b565b82525050565b6104c88161063d565b82525050565b6104d781610673565b82525050565b60006104ea6036836105c4565b91506104f5826106c6565b604082019050919050565b61050981610669565b82525050565b600060208201905061052460008301846104b0565b92915050565b600060408201905061053f60008301856104b0565b61054c6020830184610500565b9392505050565b600060208201905061056860008301846104bf565b92915050565b600060208201905061058360008301846104ce565b92915050565b600060208201905081810360008301526105a2816104dd565b9050919050565b60006020820190506105be6000830184610500565b92915050565b600082825260208201905092915050565b60006105e082610669565b91506105eb83610669565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106205761061f610697565b5b828201905092915050565b600061063682610649565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061067e82610685565b9050919050565b600061069082610649565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f596f752063616e206f6e6c792077697468647261772066726f6d20746865206360008201527f6f6e747261637420657665727920323420686f75727300000000000000000000602082015250565b61071e8161062b565b811461072957600080fd5b50565b6107358161063d565b811461074057600080fd5b50565b61074c81610669565b811461075757600080fd5b5056fea2646970667358221220761878e48b7a5544c7bbc411f9b4f7d8c58a67d5a1381cb3439210d9f8be272a64736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a089a21902914c3f3325dbe2334e9b466071e5f1

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0xA089a21902914C3f3325dBE2334E9B466071E5f1

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a089a21902914c3f3325dbe2334e9b466071e5f1


Deployed Bytecode Sourcemap

495:1354:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1300:122;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;920:247;;;:::i;:::-;;1519:327;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;585:43;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;687:25;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;518:47;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1300:122;1343:7;1376:12;;;;;;;;;;;1370:29;;;1408:4;1370:44;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1363:51;;1300:122;:::o;920:247::-;966:29;984:10;966:17;:29::i;:::-;958:96;;;;;;;;;;;;:::i;:::-;;;;;;;;;1065:12;;;;;;;;;;:21;;;1087:10;556:9;1065:46;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1144:15;1122:7;:19;1130:10;1122:19;;;;;;;;;;;;;;;:37;;;;920:247::o;1519:327::-;1585:4;1627:1;1606:7;:17;1614:8;1606:17;;;;;;;;;;;;;;;;:22;1602:227;;;1652:4;1645:11;;;;1602:227;620:8;1707:7;:17;1715:8;1707:17;;;;;;;;;;;;;;;;:28;;;;:::i;:::-;1688:15;:47;1684:145;;1759:4;1752:11;;;;1684:145;1812:5;1805:12;;1519:327;;;;:::o;585:43::-;620:8;585:43;:::o;687:25::-;;;;;;;;;;;;:::o;518:47::-;556:9;518:47;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:137::-;206:5;237:6;231:13;222:22;;253:30;277:5;253:30;:::i;:::-;212:77;;;;:::o;295:143::-;352:5;383:6;377:13;368:22;;399:33;426:5;399:33;:::i;:::-;358:80;;;;:::o;444:262::-;503:6;552:2;540:9;531:7;527:23;523:32;520:2;;;568:1;565;558:12;520:2;611:1;636:53;681:7;672:6;661:9;657:22;636:53;:::i;:::-;626:63;;582:117;510:196;;;;:::o;712:278::-;779:6;828:2;816:9;807:7;803:23;799:32;796:2;;;844:1;841;834:12;796:2;887:1;912:61;965:7;956:6;945:9;941:22;912:61;:::i;:::-;902:71;;858:125;786:204;;;;:::o;996:284::-;1066:6;1115:2;1103:9;1094:7;1090:23;1086:32;1083:2;;;1131:1;1128;1121:12;1083:2;1174:1;1199:64;1255:7;1246:6;1235:9;1231:22;1199:64;:::i;:::-;1189:74;;1145:128;1073:207;;;;:::o;1286:118::-;1373:24;1391:5;1373:24;:::i;:::-;1368:3;1361:37;1351:53;;:::o;1410:109::-;1491:21;1506:5;1491:21;:::i;:::-;1486:3;1479:34;1469:50;;:::o;1525:155::-;1624:49;1667:5;1624:49;:::i;:::-;1619:3;1612:62;1602:78;;:::o;1686:366::-;1828:3;1849:67;1913:2;1908:3;1849:67;:::i;:::-;1842:74;;1925:93;2014:3;1925:93;:::i;:::-;2043:2;2038:3;2034:12;2027:19;;1832:220;;;:::o;2058:118::-;2145:24;2163:5;2145:24;:::i;:::-;2140:3;2133:37;2123:53;;:::o;2182:222::-;2275:4;2313:2;2302:9;2298:18;2290:26;;2326:71;2394:1;2383:9;2379:17;2370:6;2326:71;:::i;:::-;2280:124;;;;:::o;2410:332::-;2531:4;2569:2;2558:9;2554:18;2546:26;;2582:71;2650:1;2639:9;2635:17;2626:6;2582:71;:::i;:::-;2663:72;2731:2;2720:9;2716:18;2707:6;2663:72;:::i;:::-;2536:206;;;;;:::o;2748:210::-;2835:4;2873:2;2862:9;2858:18;2850:26;;2886:65;2948:1;2937:9;2933:17;2924:6;2886:65;:::i;:::-;2840:118;;;;:::o;2964:246::-;3069:4;3107:2;3096:9;3092:18;3084:26;;3120:83;3200:1;3189:9;3185:17;3176:6;3120:83;:::i;:::-;3074:136;;;;:::o;3216:419::-;3382:4;3420:2;3409:9;3405:18;3397:26;;3469:9;3463:4;3459:20;3455:1;3444:9;3440:17;3433:47;3497:131;3623:4;3497:131;:::i;:::-;3489:139;;3387:248;;;:::o;3641:222::-;3734:4;3772:2;3761:9;3757:18;3749:26;;3785:71;3853:1;3842:9;3838:17;3829:6;3785:71;:::i;:::-;3739:124;;;;:::o;3869:169::-;3953:11;3987:6;3982:3;3975:19;4027:4;4022:3;4018:14;4003:29;;3965:73;;;;:::o;4044:305::-;4084:3;4103:20;4121:1;4103:20;:::i;:::-;4098:25;;4137:20;4155:1;4137:20;:::i;:::-;4132:25;;4291:1;4223:66;4219:74;4216:1;4213:81;4210:2;;;4297:18;;:::i;:::-;4210:2;4341:1;4338;4334:9;4327:16;;4088:261;;;;:::o;4355:96::-;4392:7;4421:24;4439:5;4421:24;:::i;:::-;4410:35;;4400:51;;;:::o;4457:90::-;4491:7;4534:5;4527:13;4520:21;4509:32;;4499:48;;;:::o;4553:126::-;4590:7;4630:42;4623:5;4619:54;4608:65;;4598:81;;;:::o;4685:77::-;4722:7;4751:5;4740:16;;4730:32;;;:::o;4768:150::-;4830:9;4863:49;4906:5;4863:49;:::i;:::-;4850:62;;4840:78;;;:::o;4924:125::-;4986:9;5019:24;5037:5;5019:24;:::i;:::-;5006:37;;4996:53;;;:::o;5055:180::-;5103:77;5100:1;5093:88;5200:4;5197:1;5190:15;5224:4;5221:1;5214:15;5241:241;5381:34;5377:1;5369:6;5365:14;5358:58;5450:24;5445:2;5437:6;5433:15;5426:49;5347:135;:::o;5488:122::-;5561:24;5579:5;5561:24;:::i;:::-;5554:5;5551:35;5541:2;;5600:1;5597;5590:12;5541:2;5531:79;:::o;5616:116::-;5686:21;5701:5;5686:21;:::i;:::-;5679:5;5676:32;5666:2;;5722:1;5719;5712:12;5666:2;5656:76;:::o;5738:122::-;5811:24;5829:5;5811:24;:::i;:::-;5804:5;5801:35;5791:2;;5850:1;5847;5840:12;5791:2;5781:79;:::o

Swarm Source

ipfs://761878e48b7a5544c7bbc411f9b4f7d8c58a67d5a1381cb3439210d9f8be272a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.