KomodoPlatform / komodo-docs-mdx

Komodo Platform Docs
https://komodoplatform.com/en/docs/
2 stars 8 forks source link

Document Eth coin with tokens v2 activation update #310

Open laruh opened 3 months ago

laruh commented 3 months ago

related to KDF PR https://github.com/KomodoPlatform/komodo-defi-framework/pull/2129

In the PR optional swap_v2_contracts field was added in EthActivationV2Request request ("enable_eth_with_tokens" RPC).

it is a structure with such fields

    "swap_v2_contracts":{
        "maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
        "taker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
        "nft_maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE"
    }, 

This field MUST be provided if this flag "use_trading_proto_v2":true was provided in kdf json configuration when you start the program.

Req example

curl --url "http://127.0.0.1:7783" --data '{
  "userpass": "'$USERPASS'",
  "method": "enable_eth_with_tokens",
  "mmrpc": "2.0",
  "params": {
    "ticker": "MATIC",
    "mm2": 1,
    "swap_contract_address": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
    "swap_v2_contracts":{
        "maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
        "taker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
        "nft_maker_swap_v2_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE"
    },    
    "fallback_swap_contract": "0x9130b257D37A52E52F21054c4DA3450c72f595CE",
    "nodes": [
      {
        "url": "https://polygon-rpc.com"
      }
    ],
    "erc20_tokens_requests": [],
    "nft_req": {
      "provider":{
        "type": "Moralis",
        "info": {
          "url":"http://localhost:6150/nft-test",
          "proxy_auth":true
        }
      }
    }
  }
}'

Note: optional "proxy_auth" bool field in "nft_req" was added in this req https://github.com/KomodoPlatform/komodo-defi-framework/pull/2100 it means if "proxy_auth":true then Komodo-Proxy url should be provided (https://github.com/KomodoPlatform/komodo-defi-proxy).

laruh commented 3 months ago

upd I suppose this pr is going to fix the issue https://github.com/KomodoPlatform/komodo-docs-mdx/pull/270

smk762 commented 2 months ago

Will be resolved with https://github.com/KomodoPlatform/komodo-docs-mdx/pull/317