Sepolia Testnet

Contract

0x26bfAecAe4D5fa93eE1737ce1Ce7D53F2a0E9b2d
Transaction Hash
Method
Block
From
To
Amount
Drip91224522025-09-03 5:17:1297 days ago1756876632IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000048091.80696906
Drip79290082025-03-18 15:28:48265 days ago1742311728IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000242997.63559175
Drip79223062025-03-17 17:07:00266 days ago1742231220IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000075810.94238451
Drip79222792025-03-17 17:01:36266 days ago1742230896IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000107561.33706082
Drip79204002025-03-17 10:39:36267 days ago1742207976IN
0x26bfAecA...F2a0E9b2d
0 ETH0.00054229.40569486
Drip72973702024-12-17 11:38:00356 days ago1734435480IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0041320451.36287526
Drip72973682024-12-17 11:37:36356 days ago1734435456IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0038476747.82806678
Drip72556132024-12-11 7:23:48363 days ago1733901828IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000281153.49482127
Drip72251062024-12-06 19:25:12367 days ago1733513112IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000170395.35442087
Drip72215952024-12-06 7:01:48368 days ago1733468508IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000819610.18798733
Drip72173112024-12-05 15:50:00368 days ago1733413800IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0010286512.78663436
Drip72013112024-12-03 7:05:24371 days ago1733209524IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0008242812.15883966
Drip71896662024-12-01 12:37:00372 days ago1733056620IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0005240212.99051257
Drip71514382024-11-25 18:49:36378 days ago1732560576IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0008648210.75009803
Drip71514362024-11-25 18:49:12378 days ago1732560552IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0006566611.43240527
Drip71514292024-11-25 18:47:36378 days ago1732560456IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0003467810.89693938
Drip71514232024-11-25 18:46:24378 days ago1732560384IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0009645811.99014485
Set Amount71514122024-11-25 18:44:12378 days ago1732560252IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0002863611.83700137
Drip70313632024-11-07 17:14:36396 days ago1730999676IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000509887.52122786
Drip70313472024-11-07 17:10:36396 days ago1730999436IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000236787.44044232
Drip70313212024-11-07 17:04:24396 days ago1730999064IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000475918.22429339
Drip70313102024-11-07 17:02:12396 days ago1730998932IN
0x26bfAecA...F2a0E9b2d
0 ETH0.001479459.03698148
Drip70288772024-11-07 8:02:24397 days ago1730966544IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0016142420.0656881
Drip70288692024-11-07 8:00:48397 days ago1730966448IN
0x26bfAecA...F2a0E9b2d
0 ETH0.0017614521.86535452
Drip69862832024-10-31 22:50:36403 days ago1730415036IN
0x26bfAecA...F2a0E9b2d
0 ETH0.000222213.8620251
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Faucet

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract Faucet is Ownable {

    constructor() Ownable(msg.sender) {}

    mapping (address => uint256) public amount;
    mapping (address => mapping (address => uint)) public lastDrip;

    function setAmount(address token, uint256 amount_) external onlyOwner {
        amount[token] = amount_;
    }

    function drip(address token) external {
        require(block.timestamp - lastDrip[msg.sender][address(token)] >= 1 days, "ERR_DRIP_THROTTLE");
        require(IERC20(token).balanceOf(address(this)) >= amount[token], "ERR_NEEDS_REFILL");
        lastDrip[msg.sender][address(token)] = block.timestamp;
        IERC20(token).transfer(msg.sender, amount[token]);
    }

    function drain(address token) external onlyOwner {
        IERC20(token).transfer(msg.sender, IERC20(token).balanceOf(address(this)));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"drain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"drip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"lastDrip","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"setAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610602806100a56000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063d2fafb191161005b578063d2fafb19146100f8578063eab23a401461010b578063ece5313214610136578063f2fde38b1461014957600080fd5b806367a5cd061461008d578063715018a6146100a25780638da5cb5b146100aa578063b9f0bf66146100ca575b600080fd5b6100a061009b3660046104eb565b61015c565b005b6100a0610331565b6000546040516001600160a01b0390911681526020015b60405180910390f35b6100ea6100d83660046104eb565b60016020526000908152604090205481565b6040519081526020016100c1565b6100a061010636600461050d565b610345565b6100ea610119366004610537565b600260209081526000928352604080842090915290825290205481565b6100a06101443660046104eb565b610369565b6100a06101573660046104eb565b610414565b3360009081526002602090815260408083206001600160a01b0385168452909152902054620151809061018f904261056a565b10156101d65760405162461bcd60e51b81526020600482015260116024820152704552525f445249505f5448524f54544c4560781b60448201526064015b60405180910390fd5b6001600160a01b038116600081815260016020526040908190205490516370a0823160e01b81523060048201529091906370a0823190602401602060405180830381865afa15801561022c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102509190610591565b10156102915760405162461bcd60e51b815260206004820152601060248201526f11549497d391515114d7d4915192531360821b60448201526064016101cd565b3360008181526002602090815260408083206001600160a01b03861680855290835281842042905560019092529182902054915163a9059cbb60e01b8152600481019390935260248301919091529063a9059cbb906044015b6020604051808303816000875af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d91906105aa565b5050565b610339610452565b610343600061047f565b565b61034d610452565b6001600160a01b03909116600090815260016020526040902055565b610371610452565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e39190610591565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016102ea565b61041c610452565b6001600160a01b03811661044657604051631e4fbdf760e01b8152600060048201526024016101cd565b61044f8161047f565b50565b6000546001600160a01b031633146103435760405163118cdaa760e01b81523360048201526024016101cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146104e657600080fd5b919050565b6000602082840312156104fd57600080fd5b610506826104cf565b9392505050565b6000806040838503121561052057600080fd5b610529836104cf565b946020939093013593505050565b6000806040838503121561054a57600080fd5b610553836104cf565b9150610561602084016104cf565b90509250929050565b8181038181111561058b57634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156105a357600080fd5b5051919050565b6000602082840312156105bc57600080fd5b8151801515811461050657600080fdfea2646970667358221220c66b496b3ee4b046653fc1cc8034706683013da30b7b4c75a9380c25ff2e409164736f6c63430008150033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063d2fafb191161005b578063d2fafb19146100f8578063eab23a401461010b578063ece5313214610136578063f2fde38b1461014957600080fd5b806367a5cd061461008d578063715018a6146100a25780638da5cb5b146100aa578063b9f0bf66146100ca575b600080fd5b6100a061009b3660046104eb565b61015c565b005b6100a0610331565b6000546040516001600160a01b0390911681526020015b60405180910390f35b6100ea6100d83660046104eb565b60016020526000908152604090205481565b6040519081526020016100c1565b6100a061010636600461050d565b610345565b6100ea610119366004610537565b600260209081526000928352604080842090915290825290205481565b6100a06101443660046104eb565b610369565b6100a06101573660046104eb565b610414565b3360009081526002602090815260408083206001600160a01b0385168452909152902054620151809061018f904261056a565b10156101d65760405162461bcd60e51b81526020600482015260116024820152704552525f445249505f5448524f54544c4560781b60448201526064015b60405180910390fd5b6001600160a01b038116600081815260016020526040908190205490516370a0823160e01b81523060048201529091906370a0823190602401602060405180830381865afa15801561022c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102509190610591565b10156102915760405162461bcd60e51b815260206004820152601060248201526f11549497d391515114d7d4915192531360821b60448201526064016101cd565b3360008181526002602090815260408083206001600160a01b03861680855290835281842042905560019092529182902054915163a9059cbb60e01b8152600481019390935260248301919091529063a9059cbb906044015b6020604051808303816000875af1158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032d91906105aa565b5050565b610339610452565b610343600061047f565b565b61034d610452565b6001600160a01b03909116600090815260016020526040902055565b610371610452565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e39190610591565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016102ea565b61041c610452565b6001600160a01b03811661044657604051631e4fbdf760e01b8152600060048201526024016101cd565b61044f8161047f565b50565b6000546001600160a01b031633146103435760405163118cdaa760e01b81523360048201526024016101cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146104e657600080fd5b919050565b6000602082840312156104fd57600080fd5b610506826104cf565b9392505050565b6000806040838503121561052057600080fd5b610529836104cf565b946020939093013593505050565b6000806040838503121561054a57600080fd5b610553836104cf565b9150610561602084016104cf565b90509250929050565b8181038181111561058b57634e487b7160e01b600052601160045260246000fd5b92915050565b6000602082840312156105a357600080fd5b5051919050565b6000602082840312156105bc57600080fd5b8151801515811461050657600080fdfea2646970667358221220c66b496b3ee4b046653fc1cc8034706683013da30b7b4c75a9380c25ff2e409164736f6c63430008150033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
0x26bfAecAe4D5fa93eE1737ce1Ce7D53F2a0E9b2d
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.