Add token
ArConnect Injected API addToken() function
In the new ArConnect version, the extension only shows tokens that the user has added. Tokens can be added via the addToken()
function, after the user has approved it.
Argument | Type | Description |
---|---|---|
|
| The contract ID of the token to add to ArConnect |
|
| Type of the token (determinates how it'll be displayed) |
|
| Custom DRE node (url) to load the token state with |
Note: This function does not require any permissions or the app to be connected to ArConnect.
Note: The type
argument is optional, if it is not provided, the extension will try to guess it.
Note: The dre
argument is optional, if it is not provided, the extension will find an appropriate DRE node from a pre-determined list of nodes. This DRE node will also automatically change, should the provided node no longer return the state of the token.
Note: You can check if a token has been added with the isTokenAdded()
function.
Example usage
Last updated