relevant tag icon
ETH Faucet
copy icon
anarancio
• version 1.0.0
Faucet
ETH
Deployable

ETH Faucet

A faucet contract that allows users to request a small amount of ETH. Users can request ETH once every 24 hours. The contract has a balance that can be funded by the owner. The owner can also change the amount of ETH given on each request

*Visit desktop site to download or deploy

Version

1.0.0

Creator

anarancio

Last Publish

1/27/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
owner() :
Returns the address of the current owner.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
requestEth(address) :
function to request a small amount of ETHThe function checks if the contract has enough balanceThe function also checks if the user has requested beforeIf all the conditions are met, the function will transfer the amount stored in transferEthAmount to the user address - _to: address to send the eth
setTransferEthAmount(uint256) :
function that allows the owner to change the value of the transferEthAmountThe function will be executed only by the owner of the contract - _amount: new amount that should be equal or greater than zero
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
withdraw() :
function that allows the owner to withdraw the contract balancethe function checks that the contract has a balance greater than zeroThe function will be executed only by the owner of the contract

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i eth-faucet
copy icon

Bytecode

Download

Verification

Download

Last Publish

1/27/2023

Solidity Compiler

v0.8.17+commit.8df45f5f

Version

1.0.0

Creator

anarancio

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.