Skip to main content

Watch Wallet Asset

Requests that the user track the specified token in the wallet. Returns a boolean indicating if the token was successfully added. Once added, the token is indistinguishable from those added using legacy methods, such as a centralized registry.

Request Parameters

ParameterTypeRequiredDescription
typeStringYesSupports ERC-20, ERC-721, and ERC-1155 tokens.
optionsObjectYesContains the params below
options.addressStringYesThe address of the token contract.
options.symbolStringNoA ticker symbol or shorthand, up to 11 characters (optional for ERC-20 tokens).
options.decimalsIntegerNoThe number of token decimals (optional for ERC-20 tokens).
options.imageStringNoA string URL of the token logo (optional for ERC-20 tokens).
options.tokenIdStringNoThe unique identifier of the NFT (required for ERC-721 and ERC-1155 tokens).

Response Parameters

ParameterTypeDescription
DATABooleantrue if the token was added, false otherwise.

Request Example

ethereum.request({
method: "wallet_watchAsset",
params: {
type: "ERC20",
options: {
address: "0xb60e8dd61c5d32be8058aabeb970870f07233155",
symbol: "FOO",
decimals: 18,
image: "https://foo.io/token-image.svg",
},
},
});

Response Example

true