Skip to content

Smart contract that holds an ERC20 token and provides getTokens method to claim free tokens.

License

Notifications You must be signed in to change notification settings

ShipChain/erc20faucet-contracts

 
 

Repository files navigation

erc20faucet-contracts

Smart contract that holds an ERC20 token and provides getTokens method to claim free tokens.

Constructors

  1. _erc20ContractAddress: The address of the ERC20 token the faucet holds.

  2. _maxAllowanceInclusive: The maximum amount (inclusive) allowed to claim. This can be changed later via setMaxAllowance.

Example

TRST faucet on Rinkeby used for TrustedLendingCircle
How to get free TRST on Rinkeby Network
  • Add TRST token address 0x87099add3bcc0821b5b151307c147215f839a110 on Rinkeby to Metamask following this handy guide.
  • To claim free TRST, copy and paste ./scripts/getTokens.js raw content into Chrome's console that is connected to Metamask on Rinkeby. The default amount to claim in the script is 1 TRST. You can change the value of amountToClaim in the script to the amount you want to claim but the maximum amount allowed is _maxAllowanceInclusive.
  • Submit the transaction in the Metamask popup modal.
  • The amount of claimed TRST should be displayed on Metamask once the transaction is mined on Rinkeby.

License

GPL-3.0

About

Smart contract that holds an ERC20 token and provides getTokens method to claim free tokens.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%