Contract API
Coin
The ERC-20 token, with genesis liquidity and ongoing Mine emissions.
Loading…
Browse documentation
Contract API
The ERC-20 token, with genesis liquidity and ongoing Mine emissions.
Loading…
Contract API
The ERC-20 token, with genesis liquidity and ongoing Mine emissions.
This reference is generated from the repository contracts. Check the deployed version before using a signature or constant. The audit covers a specific source revision.
Source: src/core/Coin.sol
Artifact: out/Coin.sol/Coin.json
Transferable token used for genesis liquidity, mining, signaling, and Fund redemption.
Starts with zero supply. The setup authority can mint before permanently handing mint authority to one Mine exactly once. Launchpad mints its configured genesis allocation, then immediately binds Mine; every later canonical mint settles slot emission. Burns never reopen or alter mint authority. Coin uses 18 decimals inherited from ERC20 and supports ERC-2612 approvals through ERC20Permit. There is no protocol-defined economic supply cap; supply always reconciles as totalSupply() == lifetimeMinted - lifetimeBurned.
Public ABI: 26 functions, 8 events, 23 custom errors, 1 constructor, 0 receive entries, 0 fallback entries.
constructor(string,string,address)constructor(string name_, string symbol_, address initialMinter);Creates Coin with immutable name and symbol, minimal ERC-1046 metadata, and zero supply. initialMinter may mint during setup and perform the one-time handoff to Mine.
Parameters
initialMinter: Initial owner and setup mint authority; ownership and mint authority are independent.name_: Immutable ERC-20 name and ERC-2612 permit domain name.symbol_: Immutable ERC-20 ticker.DOMAIN_SEPARATOR()function DOMAIN_SEPARATOR() external view returns (bytes32 arg0);Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
MAX_METADATA_URI_BYTES()function MAX_METADATA_URI_BYTES() external view returns (uint256 arg0);Maximum raw byte length of the owner-controlled ERC-1046 metadata URI.
allowance(address,address)function allowance(address owner, address spender) external view returns (uint256 arg0);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.
approve(address,uint256)function approve(address spender, uint256 value) external returns (bool arg0);See {IERC20-approve}. NOTE: If value is the maximum uint256, the allowance is not updated on transferFrom. This is semantically equivalent to an infinite approval. Requirements: - spender cannot be the zero address.
balanceOf(address)function balanceOf(address account) external view returns (uint256 arg0);Returns the value of tokens owned by account.
burn(uint256)function burn(uint256 amount) external;Permanently burns Coin held by the caller. Requires the caller to hold at least amount; increases the monotonic lifetime-burned count and does not alter or reopen mint authority.
Parameters
amount: Nonzero raw Coin amount to burn from the caller.decimals()function decimals() external view returns (uint8 arg0);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}.
eip712Domain()function eip712Domain() external view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions);returns the fields and values that describe the domain separator used by this contract for EIP-712 signature.
lifetimeBurned()function lifetimeBurned() external view returns (uint256 arg0);Cumulative raw Coin units permanently destroyed by all burns.
lifetimeMinted()function lifetimeMinted() external view returns (uint256 arg0);Cumulative raw Coin units created during setup and by the permanently selected Mine.
mint(address,uint256)function mint(address account, uint256 amount) external;Mints Coin through the current setup authority or permanently selected Mine. Callable only by minter. Increases both total supply and the monotonic lifetime-minted count.
Parameters
account: Nonzero account receiving the newly issued Coin.amount: Nonzero raw Coin amount to mint.minter()function minter() external view returns (address arg0);Current mint and setup authority before locking, or sole mint caller after the one-time Mine handoff.
minterLocked()function minterLocked() external view returns (bool arg0);Whether the one-time Mine handoff has permanently completed.
name()function name() external view returns (string arg0);Returns the name of the token.
nonces(address)function nonces(address owner) external view returns (uint256 arg0);Returns the current nonce for owner. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases owner's nonce by one. This prevents a signature from being used multiple times.
owner()function owner() external view returns (address arg0);Returns the address of the current owner.
permit(address,address,uint256,uint256,uint8,bytes32,bytes32)function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;Sets value as the allowance of spender over owner's tokens, given owner's signed approval. IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also applies here. Emits an {Approval} event. Requirements: - spender cannot be the zero address. - deadline must be a timestamp in the future. - v, r and s must be a valid secp256k1 signature from owner over the EIP712-formatted function arguments. - the signature must use owner's current nonce (see {nonces}). For more information on the signature format, see the https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. CAUTION: See Security Considerations above.
renounceOwnership()function renounceOwnership() external;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.
setMinter(address)function setMinter(address newMinter) external;Permanently assigns mint authority to the canonical Mine. Callable only by the current minter while unlocked. newMinter must contain deployed code. Sets minterLocked forever; burns cannot reopen the handoff.
Parameters
newMinter: Canonical Mine contract that will become the sole lifetime mint caller.setTokenURI(string)function setTokenURI(string newURI) external;Replaces the ERC-1046 metadata URI without affecting minting or balances. Empty input restores minimal ERC-1046 metadata. Replacement documents must follow the ERC-1046 schema. Only the current Coin owner can update it; ownership transfers immediately.
symbol()function symbol() external view returns (string arg0);Returns the symbol of the token, usually a shorter version of the name.
tokenURI()function tokenURI() external view returns (string arg0);Owner-controlled ERC-1046 metadata URI stored directly on this Coin.
totalSupply()function totalSupply() external view returns (uint256 arg0);Returns the value of tokens in existence.
transfer(address,uint256)function transfer(address to, uint256 value) external returns (bool arg0);See {IERC20-transfer}. Requirements: - to cannot be the zero address. - the caller must have a balance of at least value.
transferFrom(address,address,uint256)function transferFrom(address from, address to, uint256 value) external returns (bool arg0);See {IERC20-transferFrom}. Skips emitting an {Approval} event indicating an allowance update. This is not required by the ERC. See {xref-ERC20-\approve-address-address-uint256-bool-}[approve]. NOTE: Does not update the allowance if the current allowance is the maximum uint256. Requirements: - from and to cannot be the zero address. - from must have a balance of at least value. - the caller must have allowance for from's tokens of at least value.
transferOwnership(address)function transferOwnership(address newOwner) external;Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Approval(address,address,uint256)event Approval(address indexed owner, address indexed spender, uint256 value);Emitted when the allowance of a spender for an owner is set by a call to {approve}. value is the new allowance.
Burned(address,uint256)event Burned(address indexed account, uint256 amount);Emitted after an account permanently burns Coin.
Parameters
account: Account whose Coin balance was burned.amount: Raw Coin amount burned.EIP712DomainChanged()event EIP712DomainChanged();MAY be emitted to signal that the domain could have changed.
Minted(address,uint256)event Minted(address indexed account, uint256 amount);Emitted after the current mint authority mints Coin to an account.
Parameters
account: Account that received the newly minted Coin.amount: Raw Coin amount minted.MinterSet(address,address)event MinterSet(address indexed previousMinter, address indexed newMinter);Emitted when setup permanently binds mint authority to the canonical Mine.
Parameters
newMinter: Canonical Mine that becomes the sole lifetime mint caller.previousMinter: Previous setup authority that initiated the handoff.OwnershipTransferred(address,address)event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);No additional NatSpec notice is present in the compiled artifact.
TokenURISet(string,string)event TokenURISet(string previousURI, string newURI);Emitted when the Coin owner changes its ERC-1046 metadata URI.
Transfer(address,address,uint256)event Transfer(address indexed from, address indexed to, uint256 value);Emitted when value tokens are moved from one account (from) to another (to). Note that value may be zero.
AddressHasNoCode(address)error AddressHasNoCode(address account);No additional NatSpec notice is present in the compiled artifact.
ECDSAInvalidSignature()error ECDSAInvalidSignature();No additional NatSpec notice is present in the compiled artifact.
ECDSAInvalidSignatureLength(uint256)error ECDSAInvalidSignatureLength(uint256 length);No additional NatSpec notice is present in the compiled artifact.
ECDSAInvalidSignatureS(bytes32)error ECDSAInvalidSignatureS(bytes32 s);No additional NatSpec notice is present in the compiled artifact.
ERC20InsufficientAllowance(address,uint256,uint256)error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);No additional NatSpec notice is present in the compiled artifact.
ERC20InsufficientBalance(address,uint256,uint256)error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);No additional NatSpec notice is present in the compiled artifact.
ERC20InvalidApprover(address)error ERC20InvalidApprover(address approver);No additional NatSpec notice is present in the compiled artifact.
ERC20InvalidReceiver(address)error ERC20InvalidReceiver(address receiver);No additional NatSpec notice is present in the compiled artifact.
ERC20InvalidSender(address)error ERC20InvalidSender(address sender);No additional NatSpec notice is present in the compiled artifact.
ERC20InvalidSpender(address)error ERC20InvalidSpender(address spender);No additional NatSpec notice is present in the compiled artifact.
ERC2612ExpiredSignature(uint256)error ERC2612ExpiredSignature(uint256 deadline);No additional NatSpec notice is present in the compiled artifact.
ERC2612InvalidSigner(address,address)error ERC2612InvalidSigner(address signer, address owner);No additional NatSpec notice is present in the compiled artifact.
InvalidAccountNonce(address,uint256)error InvalidAccountNonce(address account, uint256 currentNonce);No additional NatSpec notice is present in the compiled artifact.
InvalidShortString()error InvalidShortString();No additional NatSpec notice is present in the compiled artifact.
MetadataURITooLong(uint256)error MetadataURITooLong(uint256 length);No additional NatSpec notice is present in the compiled artifact.
MinterAlreadyLocked()error MinterAlreadyLocked();No additional NatSpec notice is present in the compiled artifact.
NotMinter(address)error NotMinter(address caller);No additional NatSpec notice is present in the compiled artifact.
OwnableInvalidOwner(address)error OwnableInvalidOwner(address owner);No additional NatSpec notice is present in the compiled artifact.
OwnableUnauthorizedAccount(address)error OwnableUnauthorizedAccount(address account);No additional NatSpec notice is present in the compiled artifact.
SameMinter()error SameMinter();No additional NatSpec notice is present in the compiled artifact.
StringTooLong(string)error StringTooLong(string str);No additional NatSpec notice is present in the compiled artifact.
ZeroAddress()error ZeroAddress();No additional NatSpec notice is present in the compiled artifact.
ZeroAmount()error ZeroAmount();No additional NatSpec notice is present in the compiled artifact.