Token

@Serializable
@SerialName(value = "token")
data class Token(val network: Network, val contract: String, val tokenType: TokenType, val symbol: String = "", val tokenId: String = "", val decimals: Int = 18) : Asset

Represents a token on a blockchain network (e.g., ERC-20).

Tokens are assets that exist on top of a blockchain through smart contracts. They follow specific standards (ERC-20, ERC-721, etc.) that define how they can be transferred and interacted with.

See also

Constructors

Link copied to clipboard
constructor(network: Network, contract: String, tokenType: TokenType, symbol: String = "", tokenId: String = "", decimals: Int = 18)

Properties

Link copied to clipboard
open override val contract: String

The smart contract address of the token (required)

Link copied to clipboard

The number of decimal places for the token (typically 18 for ERC-20)

Link copied to clipboard
open override val network: Network

The blockchain network this token exists on

Link copied to clipboard

The token's trading symbol (e.g., "USDT", "USDC")

Link copied to clipboard

The token ID for ERC-721/ERC-1155 NFTs (empty for fungible tokens)

Link copied to clipboard

The token standard (ERC20, ERC721, etc.)