Address Contract Verified
Address
0xEFb77362c77464A89C4E3A5B72AB30a24c94d67b
Balance
0 ETH
Nonce
1
Code Size
1928 bytes
Creator
0xfcee2A4f...Ca50 at tx 0x32819976...584a3f
Indexed Transactions
0
Contract Bytecode
1928 bytes
0x608060405234801561000f575f5ffd5b5060043610610086575f3560e01c8063a2724a4d11610059578063a2724a4d146100da578063e98890a7146100f8578063eadb825914610116578063f2fde38b1461013457610086565b80633e413bee1461008a578063715018a6146100a85780638da5cb5b146100b25780639f678cca146100d0575b5f5ffd5b610092610150565b60405161009f9190610517565b60405180910390f35b6100b0610174565b005b6100ba610187565b6040516100c79190610550565b60405180910390f35b6100d86101ae565b005b6100e26102b7565b6040516100ef9190610581565b60405180910390f35b6101006102bd565b60405161010d9190610581565b60405180910390f35b61011e6102c4565b60405161012b9190610581565b60405180910390f35b61014e600480360381019061014991906105c8565b6102ca565b005b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b61017c61034e565b6101855f6103d5565b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101b661034e565b611c206001546101c69190610620565b421015610208576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ff906106ad565b60405180910390fd5b426001819055507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610253610187565b620f42406040518363ffffffff1660e01b81526004016102749291906106cb565b6020604051808303815f875af1158015610290573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102b49190610727565b50565b611c2081565b620f424081565b60015481565b6102d261034e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610342575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016103399190610550565b60405180910390fd5b61034b816103d5565b50565b610356610496565b73ffffffffffffffffffffffffffffffffffffffff16610374610187565b73ffffffffffffffffffffffffffffffffffffffff16146103d357610397610496565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016103ca9190610550565b60405180910390fd5b565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6104df6104da6104d58461049d565b6104bc565b61049d565b9050919050565b5f6104f0826104c5565b9050919050565b5f610501826104e6565b9050919050565b610511816104f7565b82525050565b5f60208201905061052a5f830184610508565b92915050565b5f61053a8261049d565b9050919050565b61054a81610530565b82525050565b5f6020820190506105635f830184610541565b92915050565b5f819050919050565b61057b81610569565b82525050565b5f6020820190506105945f830184610572565b92915050565b5f5ffd5b6105a781610530565b81146105b1575f5ffd5b50565b5f813590506105c28161059e565b92915050565b5f602082840312156105dd576105dc61059a565b5b5f6105ea848285016105b4565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61062a82610569565b915061063583610569565b925082820190508082111561064d5761064c6105f3565b5b92915050565b5f82825260208201905092915050565b7f436f6f6c646f776e0000000000000000000000000000000000000000000000005f82015250565b5f610697600883610653565b91506106a282610663565b602082019050919050565b5f6020820190508181035f8301526106c48161068b565b9050919050565b5f6040820190506106de5f830185610541565b6106eb6020830184610572565b9392505050565b5f8115159050919050565b610706816106f2565b8114610710575f5ffd5b50565b5f81519050610721816106fd565b92915050565b5f6020828403121561073c5761073b61059a565b5b5f61074984828501610713565b9150509291505056fea2646970667358221220d6a6805a83c3ce0de8366b4c64a8e5ad66b7caca59fa653d1549e4324586500c64736f6c634300081f0033
Verified Source Code Full Match
Compiler: v0.8.31+commit.fd3a2265
EVM: osaka
Optimization: No
main.sol 23 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PersonalUSDCFaucet is Ownable {
IERC20 public immutable usdc;
uint256 public constant DRIP_AMOUNT = 1e6; // 1 USDC
uint256 public constant COOLDOWN = 2 hours;
uint256 public lastDrip;
constructor(address _usdc) Ownable(msg.sender) {
usdc = IERC20(_usdc);
lastDrip = block.timestamp - COOLDOWN;
}
function drip() external onlyOwner {
require(block.timestamp >= lastDrip + COOLDOWN, "Cooldown");
lastDrip = block.timestamp;
usdc.transfer(owner(), DRIP_AMOUNT);
}
}
Ownable.sol 100 lines
// 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);
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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);
}
Context.sol 28 lines
// 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;
}
}
Read Contract
COOLDOWN 0xa2724a4d → uint256
DRIP_AMOUNT 0xe98890a7 → uint256
lastDrip 0xeadb8259 → uint256
owner 0x8da5cb5b → address
usdc 0x3e413bee → address
Write Contract 3 functions
These functions modify contract state and require a wallet transaction to execute.
drip 0x9f678cca
No parameters
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address