On this page

Enable ETH Task: Init

API-v2task::enable_eth::init

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

ParameterTypeRequiredDefaultDescription
nodesarray of CoinNode objects-One or more RPC nodes used to communicate with the Ethereum network. Each object must include a url (string) and may include komodo_proxy (boolean).
swap_contract_addressstring-Address of the Komodo atomic-swap smart-contract deployed on the target chain.
tickerstring-Ticker of the ETH-based platform coin you want to enable.
contract_supports_watchersbooleanfalseSet to true if the deployed swap contract supports watcher extensions.
erc20_tokens_requestsarray of TokensRequest objects-Token activation requests to execute along with the platform coin.
fallback_swap_contractstring-Optional fallback contract address used when the primary swap_contract_address fails.
gap_limitinteger20HD-wallet gap-limit to use when scanning for used addresses.
get_balancesbooleantrueWhen false, balances are not queried after activation, making the call return faster.
path_to_addressAddressDerivationPath object-Explicit HD path of the address to use for swaps. Applies only to HD wallets.
priv_key_policyobject (EthPrivKeyActivationPolicyEnum){ "type": "ContextPrivKey" }Determines where the private key comes from.
required_confirmationsinteger3Number of block confirmations to wait for critical swap steps.
rpc_modestring (EthRpcModeEnum)"Default"Set to "Metamask" when activating through MetaMask (web only).
swap_v2_contractsSwapV2Contracts object-Advanced: addresses of maker-, taker- and NFT-swap V2 contracts, if they differ from the defaults.

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": "ETH",
    "swap_contract_address": "0x24abe4c71fc658c91313b6552cd40cd808b3ea80",
    "nodes": [
      {
        "url": "https://0xrpc.io/eth"
      },
      {
        "url": "https://ethereum-rpc.publicnode.com"
      }
    ],
    "priv_key_policy": {
      "type": "Trezor"
    },
    "erc20_tokens_requests": [
      {
        "ticker": "USDT"
      },
      {
        "ticker": "DAI",
        "required_confirmations": 3
      }
    ],
    "required_confirmations": 5
  }
}

ETH/EVM Activation (WalletConnect)

POST
task::enable_eth::init
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::enable_eth::init",
  "params": {
    "ticker": "ETH",
    "swap_contract_address": "0x24abe4c71fc658c91313b6552cd40cd808b3ea80",
    "nodes": [
      {
        "url": "https://0xrpc.io/eth"
      },
      {
        "url": "https://ethereum-rpc.publicnode.com"
      }
    ],
    "priv_key_policy": {
      "type": "WalletConnect",
      "params": {
        "session_topic": "YOUR_WALLETCONNECT_SESSION_TOPIC"
      }
    },
    "erc20_tokens_requests": [],
    "required_confirmations": 3
  }
}
Replace YOUR_WALLETCONNECT_SESSION_TOPIC with the topic returned by the wc_new_connection RPC. See the WalletConnect integration notes in PR #2223 for full details.

ETH/EVM Activation (ContextPrivKey)

POST
task::enable_eth::init
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::enable_eth::init",
  "params": {
    "ticker": "ETH",
    "swap_contract_address": "0x24abe4c71fc658c91313b6552cd40cd808b3ea80",
    "nodes": [
      {
        "url": "https://0xrpc.io/eth"
      },
      {
        "url": "https://ethereum-rpc.publicnode.com"
      }
    ],
    "priv_key_policy": {
      "type": "ContextPrivKey"
    },
    "erc20_tokens_requests": [],
    "required_confirmations": 3
  }
}

ETH/EVM Activation (Metamask)

POST
task::enable_eth::init
{
  "userpass": "RPC_UserP@SSW0RD",
  "mmrpc": "2.0",
  "method": "task::enable_eth::init",
  "params": {
    "ticker": "ETH",
    "swap_contract_address": "0x24abe4c71fc658c91313b6552cd40cd808b3ea80",
    "rpc_mode": "Metamask",
    "nodes": [],
    "priv_key_policy": {
      "type": "Metamask"
    },
    "erc20_tokens_requests": [],
    "required_confirmations": 3
  }
}