Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/1inch methods #397

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
65 changes: 64 additions & 1 deletion filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,11 @@
"order-data-v1",
"order-data-v2",
"order-summary-data",
"match-by"
"match-by",
"1inch-token-info",
"1inch-protocol-info",
"1inch-tx-fields",
"1inch-protocol-image"
],
"src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx": [
"swap-structures",
Expand Down Expand Up @@ -3226,6 +3230,16 @@
"invalid-request-wrong-parameter-type",
"invalid-fee-policy-attempt-to-use-eth-gas-for-utxo-coin"
],
"src/pages/komodo-defi-framework/api/v20-dev/approve_token/index.mdx": [
"approve-token",
"arguments",
"response",
"examples",
"command",
"response-2",
"error-token-config-not-activated",
"error-insufficient-funds"
],
"src/pages/komodo-defi-framework/api/v20-dev/get_locked_amount/index.mdx": [
"get-locked-amount",
"arguments",
Expand All @@ -3235,6 +3249,15 @@
"response-success",
"response-error"
],
"src/pages/komodo-defi-framework/api/v20-dev/get_token_allowance/index.mdx": [
"get-token-allowance",
"arguments",
"response",
"examples",
"command",
"response-success",
"error-token-config-not-activated"
],
"src/pages/komodo-defi-framework/api/v20-dev/hd_address_management/index.mdx": [
"hierarchical-deterministic-address-management",
"get-new-address",
Expand Down Expand Up @@ -3518,6 +3541,45 @@
"transport-error-unable-to-estimate-gas",
"not-enough-nfts-amount-trying-to-send-more-nfts-than-you-have"
],
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/index.mdx": [
"1inch-v6-0-classic-swap-create",
"arguments",
"response",
"examples",
"command",
"response-2",
"error-configuration-missing",
"error-authentication-failure"
],
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_liquidity_sources/index.mdx": [
"1inch-v6-0-classic-swap-liquidity-sources",
"arguments",
"response",
"examples",
"command",
"response-2",
"error-configuration-missing",
"error-authentication-failure"
],
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_quote/index.mdx": [
"1inch-v6-0-classic-swap-quote",
"arguments",
"response",
"examples",
"command",
"response-2",
"error-configuration-missing",
"error-authentication-failure"
],
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_tokens/index.mdx": [
"1inch-v6-0-classic-swap-tokens",
"arguments",
"response",
"token-info",
"examples",
"command",
"response-2"
],
"src/pages/komodo-defi-framework/api/v20-dev/task_account_balance/index.mdx": [
"account-balance-tasks",
"init",
Expand Down Expand Up @@ -3764,6 +3826,7 @@
"example-using-gas-api",
"example-wss-with-certificates",
"example-with-wallet-name-and-wallet-password",
"example-with-1inch-api",
"example-for-hd-wallets",
"coins-file-configuration",
"optional-environment-variables",
Expand Down
1,030 changes: 1,006 additions & 24 deletions postman/collections/komodo_defi.postman_collection.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions src/data/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,35 @@
"titleLink": "/komodo-defi-framework/api/v20-dev/",
"links": []
},
{
"title": "1inch Integration",
"links": [
{
"title": "approve_token",
"href": "/komodo-defi-framework/api/v20-dev/approve_token/"
},
{
"title": "get_token_allowance",
"href": "/komodo-defi-framework/api/v20-dev/get_token_allowance/"
},
{
"title": "one_inch_v6_0_classic_swap_create",
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/"
},
{
"title": "one_inch_v6_0_classic_swap_liquidity_sources",
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_liquidity_sources/"
},
{
"title": "one_inch_v6_0_classic_swap_quote",
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_quote/"
},
{
"title": "one_inch_v6_0_classic_swap_tokens",
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_tokens/"
}
]
},
{
"title": "HD Wallet Tasks",
"links": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,45 @@ export const description = "Each order on the Komodo Defi oderbook can be querie
}
```
</CollapsibleSection>

### 1inchTokenInfo

| Structure | Type | Description |
| --------- | -------------- | ---------------------------------------------------------- |
| address | string | Token contract address. |
| symbol | string | Token symbol. |
| name | string | Token name. |
| decimals | numeric | Number of digits after decimal point for the token amount. |
| eip2612 | boolean | Is Eip-2612 supported. |
| is\_fot | boolean | Is FoT token. |
| logo\_uri | string | Token logo uri. |
| tags | list of string | Token tags. |

### 1inchProtocolInfo

| Structure | Type | Description |
| -------------------- | ------- | ---------------------------- |
| name | string | Liquidity source name. |
| part | numeric | Protocol part. |
| from\_token\_address | string | From-token contract address. |
| to\_token\_address | numeric | To-token contract address. |

### 1inchTxFields

| Structure | Type | Description |
| ---------- | ------- | ----------------- |
| from | string | From address |
| to | string | To address |
| data | string | Transaction data |
| value | numeric | Transaction value |
| gas\_price | float | Gas price |
| gas | numeric | Gas |

### 1inchProtocolImage

| Structure | Type | Description |
| ---------- | ------ | ----------------------------- |
| id | string | Protocol id. |
| title | string | Protocol title. |
| img | string | Link to protocol image. |
| img\_color | string | Link to protocol image color. |
Loading
Loading