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.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
erc20_tokens_requests | array of objects | ✗ | - | A list of standard TokensRequest objects. |
fallback_swap_contract | string | ✗ | - | Address of backup etomic swap smart contract. |
gap_limit | integer | ✗ | - | 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_decimals | integer | ✗ | 8 | For ETH/ERC20 and other gas model chains. Defines the decimals used to denominate the gas station response to gwei units. |
gas_station_policy.policy | string | ✗ | MeanAverageFast | For ETH/ERC20 and other gas model chains. Defines the method of gas price calculation from the station response. Value can be GasStationPolicyEnum. |
gas_station_url | string | ✗ | - | A url for gas station api. |
get_balances | boolean | ✗ | true | If false, coin and token balances will not be returned in the response, and the response will be returned more quickly. |
min_addresses_number | integer | ✗ | - | HD wallets only. How many additional addresses to generate at a minimum. |
mm2 | integer | ✗ | - | 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_req | object | ✗ | - | Non-HD only. Encapsulates the request parameters for NFT activation, including NFT provider configuration. |
nodes | array of objects | ✓ | - | A list of standard CoinNode objects. |
path_to_address | object | ✗ | - | HD wallets only. A standard AddressDerivationPath object. |
priv_key_policy | string | ✗ | ContextPrivKey | Value can be PrivKeyActivationPolicyEnum. |
required_confirmations | integer | ✗ | 3 | When 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_notarization | boolean | ✗ | false | If true, coins protected by Komodo Platform's dPoW security will wait for a notarization before progressing to the next atomic swap transactions step. |
rpc_mode | string | ✗ | Default | Value can be EthRpcModeEnum. |
save_in_history | boolean | ✗ | true | If 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_policy | string | ✗ | - | HD wallets only. Whether or not to scan for new addresses. See ScanPolicyEnum. |
swap_contract_address | string | ✓ | - | Address of etomic swap smart contract. |
swap_v2_contracts | object | ✗ | - | Must be provided if "use_trading_proto_v2" is true in your configuration. A standard SwapV2Contracts object. |
ticker | string | ✓ | - | Ticker of the EVM platform coin you want to enable. |
tx_history | boolean | ✗ | false | If 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. |
Parameter | Type | Description |
---|---|---|
status | string | A short indication of how the enabling is progressing. |
details | object | Depending 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 completedWaitingForTrezorToConnect
: Waiting for the user to plugin a Trezor deviceFollowHwDeviceInstructions
: 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:
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": "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
}
}