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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
nodes | array 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_address | string | ✓ | - | Address of the Komodo atomic-swap smart-contract deployed on the target chain. |
ticker | string | ✓ | - | Ticker of the ETH-based platform coin you want to enable. |
contract_supports_watchers | boolean | ✗ | false | Set to true if the deployed swap contract supports watcher extensions. |
erc20_tokens_requests | array of TokensRequest objects | ✗ | - | Token activation requests to execute along with the platform coin. |
fallback_swap_contract | string | ✗ | - | Optional fallback contract address used when the primary swap_contract_address fails. |
gap_limit | integer | ✗ | 20 | HD-wallet gap-limit to use when scanning for used addresses. |
get_balances | boolean | ✗ | true | When false , balances are not queried after activation, making the call return faster. |
path_to_address | AddressDerivationPath object | ✗ | - | Explicit HD path of the address to use for swaps. Applies only to HD wallets. |
priv_key_policy | object (EthPrivKeyActivationPolicyEnum) | ✗ | { "type": "ContextPrivKey" } | Determines where the private key comes from. |
required_confirmations | integer | ✗ | 3 | Number of block confirmations to wait for critical swap steps. |
rpc_mode | string (EthRpcModeEnum) | ✗ | "Default" | Set to "Metamask" when activating through MetaMask (web only). |
swap_v2_contracts | SwapV2Contracts object | ✗ | - | Advanced: addresses of maker-, taker- and NFT-swap V2 contracts, if they differ from the defaults. |
Parameter | Type | Description |
---|---|---|
task_id | integer | An 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
}
}