walletWatchAssets method

Future<bool> walletWatchAssets(
  1. WatchAssetOptions options, [
  2. String type = 'ERC20'
])

Requests that the user tracks the token in MetaMask.

Returns bool true if token is successfully added.

Most Ethereum wallets support some set of tokens, usually from a centrally curated registry of tokens. wallet_watchAsset enables web3 application developers to ask their users to track tokens in their wallets, at runtime. Once added, the token is indistinguishable from those added via legacy methods, such as a centralized registry.

Implementation

Future<bool> walletWatchAssets(WatchAssetOptions options,
        [String type = 'ERC20']) =>
    request<bool>(
        'wallet_watchAsset', WatchAssetParams(type: type, options: options));