On this page

latest contributor to this doc

Last Edit:

@smk762

Enable ETH Task: Init

API-v2task::enable_eth::init

Use this method for task managed activation of ETH/EVM coins & tokens. Refer to the task managed activation overview for activation of other coin types.

ParameterTypeRequiredDefaultDescription
erc20_tokens_requestsarray of objects-A list of standard TokensRequest objects.
fallback_swap_contractstring-Address of backup etomic swap smart contract.
gap_limitinteger-HD wallets only. The max number of empty addresses in a row. If transactions were sent to an address outside the gap_limit, they will not be identified when scanning.
gas_station_decimalsinteger8For ETH/ERC20 and other gas model chains. Defines the decimals used to denominate the gas station response to gwei units.
gas_station_policy.policystringMeanAverageFastFor ETH/ERC20 and other gas model chains. Defines the method of gas price calculation from the station response. Value can be GasStationPolicyEnum.
gas_station_urlstring-A url for gas station api.
get_balancesbooleantrueIf false, coin and token balances will not be returned in the response, and the response will be returned more quickly.
min_addresses_numberinteger-HD wallets only. How many additional addresses to generate at a minimum.
mm2integer-Required if not set in coins file. Informs the Komodo DeFi Framework API whether or not the coin is expected to function. Accepted values are 0 or 1.
nft_reqobject-Non-HD only. Encapsulates the request parameters for NFT activation, including NFT provider configuration.
nodesarray of objects-A list of standard CoinNode objects.
path_to_addressobject-HD wallets only. A standard AddressDerivationPath object.
priv_key_policystringContextPrivKeyValue can be PrivKeyActivationPolicyEnum.
required_confirmationsinteger3When the platform coin is involved, the number of confirmations for the Komodo DeFi Framework API to wait during the transaction steps of an atomic swap.
requires_notarizationbooleanfalseIf true, coins protected by Komodo Platform's dPoW security will wait for a notarization before progressing to the next atomic swap transactions step.
rpc_modestringDefaultValue can be EthRpcModeEnum.
save_in_historybooleantrueIf true the Komodo DeFi Framework API will preload transaction history as a background process. Must be set to true to use the my_tx_history method.
scan_policystring-HD wallets only. Whether or not to scan for new addresses. See ScanPolicyEnum.
swap_contract_addressstring-Address of etomic swap smart contract.
swap_v2_contractsobject-Must be provided if "use_trading_proto_v2" is true in your configuration. A standard SwapV2Contracts object.
tickerstring-Ticker of the EVM platform coin you want to enable.
tx_historybooleanfalseIf true the Komodo DeFi Framework API will preload transaction history as a background process. Must be set to true to use the my_tx_history method.

ParameterTypeDescription
statusstringA short indication of how the enabling is progressing.
detailsobjectDepending on the state of enabling progress, this will contain different information as shown in the responses below.

Possible status values while activation is in progress:

  • ActivatingCoin: The first step of activation. It does not require any action from the user.
  • RequestingWalletBalance: The first step of activation, while initial balances info is being requested. It does not require any action from the user.
  • Finishing: Activation process completed
  • WaitingForTrezorToConnect: Waiting for the user to plugin a Trezor device
  • FollowHwDeviceInstructions: Waiting for the user to follow the instructions on the device

Once complete, status will be Ok, and the details object will have the following structure:

ParameterTypeDescription
task_idintegerAn identifying number which is used to query task status.

ETH/EVM Activation (Trezor mode)

POST
task::enable_eth::init
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::enable_eth::init",
  "params": {
    "ticker": "MATIC",
    "gas_station_url": "https://gasstation-mainnet.matic.network/",
    "swap_contract_address": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
    "fallback_swap_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
    "swap_v2_contracts": {
      "taker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
      "maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
      "nft_maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE"
    },
    "nodes": [
      {
        "url": "https://polygon-rpc.com"
      },
      {
        "url": "https://poly-rpc.gateway.pokt.network"
      }
    ],
    "erc20_tokens_requests": [
      {
        "ticker": "PGX-PLG20",
        "required_confirmations": 4
      },
      {
        "ticker": "AAVE-PLG20",
        "required_confirmations": 4
      }
    ],
    "required_confirmations": 5,
    "path_to_address": {
      "account_id": 0,
      "chain": "External",
      "address_id": 1
    },
    "gap_limit": 20,
    "scan_policy": "scan_if_new_wallet",
    "min_addresses_number": 3
  }
}