You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for enabling custom EVM (ERC20, PLG20, etc..) tokens without requiring them to be in the coins config. This allows users to interact with any ERC20 token by providing the contract address.
New RPC: get_token_info
Retrieves token information (symbol/ticker, decimals) from the contract. This RPC should be used before enabling a token to:
Get token details for GUI display
Check if token exists in config
Determine activation method (custom or config)
Request
{
"userpass": "**********",
"mmrpc": "2.0",
"method": "get_token_info",
"params": {
// Protocol information required for custom tokens, same format as protocol info used in config"protocol": {
"type": "ERC20",
"protocol_data": {
"platform": "ETH",
"contract_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"
}
}
}
}
Response (Success)
{
"mmrpc": "2.0",
"result": {
"type": "ERC20",
"info": {
"symbol": "QTC", // The ticker to populate for the GUI user."decimals": 8// The decimals to populate for GUI user.
}
}
}
Response (Success) - Case for if the same contract address is used for a coin in configuration
{
"mmrpc": "2.0",
"result": {
"config_ticker": "ERC20DEV", // This will show the ticker used in config, we should populate this to the user and use it to enable the token from config in the activation request. If we can show the user the contract ticker it would be good as well."type": "ERC20",
"info": {
"symbol": "QTC",
"decimals": 8
}
}
}
Both should work for custom tokens, but we should be moving to task manager ones for trezor support.
Request (Enable a custom token)
{
"userpass": "**********",
"mmrpc": "2.0",
"method": "task::enable_erc20::init",
"params": {
"ticker": "QTC", // // New Field: protocol field required for custom tokens, same format as protocol info used in config"protocol": {
"type": "ERC20",
"protocol_data": {
"platform": "ETH",
"contract_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"
}
}
// Other fields are the same
}
Success Response should be the same as response for non custom tokens but should be shown as wallet only in GUIs
Response (Error) - Token with this contract is already activated
KDF PR: KomodoPlatform/komodo-defi-framework#2141
Adds support for enabling custom EVM (ERC20, PLG20, etc..) tokens without requiring them to be in the coins config. This allows users to interact with any ERC20 token by providing the contract address.
New RPC:
get_token_info
Retrieves token information (symbol/ticker, decimals) from the contract. This RPC should be used before enabling a token to:
Request
Response (Success)
Response (Success) - Case for if the same contract address is used for a coin in configuration
Updated RPC:
task::enable_erc20::init
/enable_erc20
Both should work for custom tokens, but we should be moving to task manager ones for trezor support.
Request (Enable a custom token)
Success Response should be the same as response for non custom tokens but should be shown as wallet only in GUIs
Response (Error) - Token with this contract is already activated
This error indicates the contract is already activated with ticker "QTC".
Response (Error) - Token with this contract is in coin config
This error indicates the token should be enabled using the config ticker "ERC20DEV".
Important notes:
get_token_info
before enabling a custom token to:The text was updated successfully, but these errors were encountered: