Registering Tokens with Users
Valora includes a default list of popular tokens. Each token in the default list must meet the asset listing requirements. However, there are many tokens that users want to manage and transact with in Valora that do not meet the requirements. To support these tokens well, Valora implements a deeplink handler so that a dapp can construct deeplinks that make it easy for their users to add arbitrary tokens to Valora.
Using deeplinks
This feature is in-development and not fully supported yet!
Valora's deeplink handler requires the contract address. If your
ERC-20 contract implements
symbol
and decimals
Valora will fetch the token symbol and
decimals from your contract. If your ERC-20 contract does not implement
symbol
or decimals
, you must specify them in the deeplink URL.
// Required: The address that the token is at
const address = '0xb92463e2262e700e29c16416270c9fdfa17934d7'
// Required if not implemented in contract: a ticker symbol or shorthand, up to 5 chars.
const symbol = 'C4P'
// Required if not implemented in contract: the number of decimals in the token
const decimals = 6
// Optional: a URL to download token image (must be a 256 x 256 PNG)
const image = 'https://image-hosting.foo/256x256.png'
const watchAssetDeeplink = `valora://wallet/watchAsset?address=${address}&symbol=${symbol}&decimals=${decimals}&image=${encodeURIComponent(
image
)}`
Upcoming: using EIP-747
This feature is planned and will be supported soon!
Valora aims to support EIP-747 to make it easy for dapp integrated with MetaMask's watch token functionality to also support Valora.