TestnetCollateral
TestnetCollateral
Addresses
Chain | Address |
---|---|
Arbitrum Sepolia | 0x124906528892104fd915b06c7Ce0801aC6069FBe |
Base Sepolia | 0x15caC25E45599680aeed48c3f0D5843221719599 |
Functions
constructor
constructor() public
decimals
function decimals() public view virtual returns (uint8)
Returns the number of decimals used to get its user representation.
For example, if decimals
equals 2
, a balance of 505
tokens should
be displayed to a user as 5.05
(505 / 10 ** 2
).
Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden.
NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
setSystemAccount
Exempt an account from mint/transfer restrictions
function setSystemAccount(address account, bool isSystemAcc) external
setMintDelay
function setMintDelay(uint256 newDelay) external
setMintAmount
function setMintAmount(uint256 newMaxMint) external
mint
function mint(address account, uint256 amount) external
_update
function _update(address from, address to, uint256 value) internal
Transfers a value
amount of tokens from from
to to
, or alternatively mints (or burns) if from
(or to
) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
this function.
Emits a {Transfer} event.
_beforeTokenTransfer
function _beforeTokenTransfer(address, address, uint256) internal
_afterTokenTransfer
function _afterTokenTransfer(address from, address to, uint256) internal view
clear
function clear(address account) external
Errors
OnlySelfMint
regular users can only mint to their own accounts
error OnlySelfMint()
MintCooldown
Attempted to mint, but the cooldown hadn't finished
error MintCooldown(uint256 remainingWait)
UnauthorizedTransfer
Attempted to transfer between two user accounts. Can't do that
error UnauthorizedTransfer(address from, address to)
MintLimit
Attempted to mint more than mintAmount
error MintLimit(uint256 attemptedMint, uint256 mintLimit)
Variables
unrestricted
lastMint
mintDelay
how long users must wait to get new testnet tokens
mintAmount
max amount users can mint at once