ETH Price: $1,599.65 (+8.16%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim137097362021-11-29 16:56:061227 days ago1638204966IN
0x57b0391d...96C996903
0 ETH0.00674939150.51510563
Claim136817792021-11-25 5:53:231232 days ago1637819603IN
0x57b0391d...96C996903
0 ETH0.00684584102.28976124
Claim136723092021-11-23 18:00:321233 days ago1637690432IN
0x57b0391d...96C996903
0 ETH0.00916756136.98066959
Claim136686952021-11-23 4:19:341234 days ago1637641174IN
0x57b0391d...96C996903
0 ETH0.00719344107.48350181
Claim136667192021-11-22 20:51:121234 days ago1637614272IN
0x57b0391d...96C996903
0 ETH0.00738993110.41946619
Claim136666962021-11-22 20:46:121234 days ago1637613972IN
0x57b0391d...96C996903
0 ETH0.00693205116.29403706
Claim136665232021-11-22 20:07:201234 days ago1637611640IN
0x57b0391d...96C996903
0 ETH0.00915699184.00838031
Claim136662942021-11-22 19:18:401234 days ago1637608720IN
0x57b0391d...96C996903
0 ETH0.01084551162.05238211
Claim136639842021-11-22 10:35:511234 days ago1637577351IN
0x57b0391d...96C996903
0 ETH0.00736389110.03034708
Claim136639372021-11-22 10:23:151234 days ago1637576595IN
0x57b0391d...96C996903
0 ETH0.00731103109.24053872
Claim136635892021-11-22 9:04:431235 days ago1637571883IN
0x57b0391d...96C996903
0 ETH0.00709826106.06138229
Claim136497092021-11-20 4:13:141237 days ago1637381594IN
0x57b0391d...96C996903
0 ETH0.00805568120.36704759
Claim136451362021-11-19 10:40:141237 days ago1637318414IN
0x57b0391d...96C996903
0 ETH0.0053036779.2469208
Claim136376462021-11-18 6:11:211239 days ago1637215881IN
0x57b0391d...96C996903
0 ETH0.01092339163.2160194
Claim136354622021-11-17 21:46:461239 days ago1637185606IN
0x57b0391d...96C996903
0 ETH0.00994838148.64757077
Claim136258602021-11-16 9:37:481241 days ago1637055468IN
0x57b0391d...96C996903
0 ETH0.00790282118.08304519
Claim136258462021-11-16 9:34:191241 days ago1637055259IN
0x57b0391d...96C996903
0 ETH0.0026757192.26605326
Claim136256212021-11-16 8:46:521241 days ago1637052412IN
0x57b0391d...96C996903
0 ETH0.00987532147.55583122
Claim136254342021-11-16 7:59:311241 days ago1637049571IN
0x57b0391d...96C996903
0 ETH0.00693908103.68289177
Claim136222882021-11-15 20:02:121241 days ago1637006532IN
0x57b0391d...96C996903
0 ETH0.00628812150.11404941
Claim136182912021-11-15 4:41:581242 days ago1636951318IN
0x57b0391d...96C996903
0 ETH0.0030040396.90449255
Claim136182562021-11-15 4:34:091242 days ago1636950849IN
0x57b0391d...96C996903
0 ETH0.003035697.9227948
Claim136182462021-11-15 4:32:371242 days ago1636950757IN
0x57b0391d...96C996903
0 ETH0.00935543139.78769376
Claim136182402021-11-15 4:30:371242 days ago1636950637IN
0x57b0391d...96C996903
0 ETH0.00729637109.02150073
Claim136182232021-11-15 4:26:461242 days ago1636950406IN
0x57b0391d...96C996903
0 ETH0.00670371134.71012068
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Faucet

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 2000000 runs

Other Settings:
default evmVersion, MPL-2.0 license

Contract Source Code (Solidity Multiple files format)

File 1 of 2: faucet.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "./IERC20.sol";

contract Faucet {
    //once an address has claimed, it cannot claim anymore
    mapping(address => bool) private _used;
    //the ERC20 to be spent
    IERC20 private _contractAddress;
    //the owner of the generous token provider for this faucet
    address private _tokenOwner;
    //how much tokens we want to spend per claim
    uint256 private _tokensPerClaim;

    event Claim(address claimer, uint256 amount);

    constructor(address contractAddress, address tokenOwner, uint256 tokensPerClaim) {
        _contractAddress = IERC20(contractAddress);
        _tokenOwner = tokenOwner;
        _tokensPerClaim = tokensPerClaim;
    }

    function claim() external {
        require(!_used[msg.sender], "Same address cannot claim twice");
        //send tokens to the one who called this contract
        _contractAddress.transferFrom(_tokenOwner, msg.sender, _tokensPerClaim);
        //mark the address of the one who called this contract,
        //so this address cannot claim again
        _used[msg.sender] = true;
        emit Claim(msg.sender, _tokensPerClaim);
    }
}

File 2 of 2: IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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);
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"uint256","name":"tokensPerClaim","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610083565b600180546001600160a01b039485166001600160a01b03199182161790915560028054939094169216919091179091556003556100bf565b80516001600160a01b038116811461007e57600080fd5b919050565b60008060006060848603121561009857600080fd5b6100a184610067565b92506100af60208501610067565b9150604084015190509250925092565b610234806100ce6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80634e71d92d14610030575b600080fd5b61003861003a565b005b3360009081526020819052604090205460ff16156100b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53616d6520616464726573732063616e6e6f7420636c61696d20747769636500604482015260640160405180910390fd5b6001546002546003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316600482015233602482015260448101919091529116906323b872dd906064016020604051808303816000875af115801561013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016191906101d5565b50336000818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556003548251938452908301527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4910160405180910390a1565b6000602082840312156101e757600080fd5b815180151581146101f757600080fd5b939250505056fea26469706673582212200c51dcffed474648a1b35a326f3fde44739341bd48267301e02a9203cca1663564736f6c634300080a0033000000000000000000000000108a850856db3f85d0269a2693d896b394c8032500000000000000000000000069102b434be1d245961e7a1114b6e49a2d1283f20000000000000000000000000000000000000000000000000de0b6b3a7640000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80634e71d92d14610030575b600080fd5b61003861003a565b005b3360009081526020819052604090205460ff16156100b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f53616d6520616464726573732063616e6e6f7420636c61696d20747769636500604482015260640160405180910390fd5b6001546002546003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff928316600482015233602482015260448101919091529116906323b872dd906064016020604051808303816000875af115801561013d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016191906101d5565b50336000818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556003548251938452908301527f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4910160405180910390a1565b6000602082840312156101e757600080fd5b815180151581146101f757600080fd5b939250505056fea26469706673582212200c51dcffed474648a1b35a326f3fde44739341bd48267301e02a9203cca1663564736f6c634300080a0033

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

000000000000000000000000108a850856db3f85d0269a2693d896b394c8032500000000000000000000000069102b434be1d245961e7a1114b6e49a2d1283f20000000000000000000000000000000000000000000000000de0b6b3a7640000

-----Decoded View---------------
Arg [0] : contractAddress (address): 0x108a850856Db3f85d0269a2693D896B394C80325
Arg [1] : tokenOwner (address): 0x69102B434be1D245961E7a1114b6e49a2d1283f2
Arg [2] : tokensPerClaim (uint256): 1000000000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000108a850856db3f85d0269a2693d896b394c80325
Arg [1] : 00000000000000000000000069102b434be1d245961e7a1114b6e49a2d1283f2
Arg [2] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000


Deployed Bytecode Sourcemap

81:1084:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;727:436;;;:::i;:::-;;;778:10;772:5;:17;;;;;;;;;;;;;771:18;763:62;;;;;;;216:2:2;763:62:1;;;198:21:2;255:2;235:18;;;228:30;294:33;274:18;;;267:61;345:18;;763:62:1;;;;;;;;893:16;;923:11;;948:15;;893:71;;;;;:16;923:11;;;893:71;;;637:34:2;936:10:1;687:18:2;;;680:43;739:18;;;732:34;;;;893:16:1;;;:29;;549:18:2;;893:71:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;1089:10:1;1083:5;:17;;;;;;;;;;;;:24;;;;1103:4;1083:24;;;1140:15;;1122:34;;1233:74:2;;;1323:18;;;1316:34;1122::1;;1206:18:2;1122:34:1;;;;;;;727:436::o;777:277:2:-;844:6;897:2;885:9;876:7;872:23;868:32;865:52;;;913:1;910;903:12;865:52;945:9;939:16;998:5;991:13;984:21;977:5;974:32;964:60;;1020:1;1017;1010:12;964:60;1043:5;777:277;-1:-1:-1;;;777:277:2:o

Swarm Source

ipfs://0c51dcffed474648a1b35a326f3fde44739341bd48267301e02a9203cca16635

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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