Skip to content

Commit 4a03a49

Browse files
authored
Merge pull request #397 from KomodoPlatform/add/1inch-methods
2 parents 4c7dbd7 + d1a8ac1 commit 4a03a49

File tree

12 files changed

+1107
-163
lines changed

12 files changed

+1107
-163
lines changed

filepathSlugs.json

+64-1
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,11 @@
20922092
"order-data-v1",
20932093
"order-data-v2",
20942094
"order-summary-data",
2095-
"match-by"
2095+
"match-by",
2096+
"1inch-token-info",
2097+
"1inch-protocol-info",
2098+
"1inch-tx-fields",
2099+
"1inch-protocol-image"
20962100
],
20972101
"src/pages/komodo-defi-framework/api/common_structures/swaps/index.mdx": [
20982102
"swap-structures",
@@ -3718,9 +3722,67 @@
37183722
"response-error-coin-not-supported",
37193723
"response-error-coin-not-active"
37203724
],
3725+
"src/pages/komodo-defi-framework/api/v20-dev/approve_token/index.mdx": [
3726+
"approve-token",
3727+
"arguments",
3728+
"response",
3729+
"examples",
3730+
"command",
3731+
"response-2",
3732+
"error-token-config-not-activated",
3733+
"error-insufficient-funds"
3734+
],
3735+
"src/pages/komodo-defi-framework/api/v20-dev/get_token_allowance/index.mdx": [
3736+
"get-token-allowance",
3737+
"arguments",
3738+
"response",
3739+
"examples",
3740+
"command",
3741+
"response-success",
3742+
"error-token-config-not-activated"
3743+
],
37213744
"src/pages/komodo-defi-framework/api/v20-dev/index.mdx": [
37223745
"komodo-de-fi-framework-api-rpc-protocol-v2-0-dev"
37233746
],
3747+
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/index.mdx": [
3748+
"1inch-v6-0-classic-swap-create",
3749+
"arguments",
3750+
"response",
3751+
"examples",
3752+
"command",
3753+
"response-2",
3754+
"error-configuration-missing",
3755+
"error-authentication-failure"
3756+
],
3757+
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_liquidity_sources/index.mdx": [
3758+
"1inch-v6-0-classic-swap-liquidity-sources",
3759+
"arguments",
3760+
"response",
3761+
"examples",
3762+
"command",
3763+
"response-2",
3764+
"error-configuration-missing",
3765+
"error-authentication-failure"
3766+
],
3767+
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_quote/index.mdx": [
3768+
"1inch-v6-0-classic-swap-quote",
3769+
"arguments",
3770+
"response",
3771+
"examples",
3772+
"command",
3773+
"response-2",
3774+
"error-configuration-missing",
3775+
"error-authentication-failure"
3776+
],
3777+
"src/pages/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_tokens/index.mdx": [
3778+
"1inch-v6-0-classic-swap-tokens",
3779+
"arguments",
3780+
"response",
3781+
"token-info",
3782+
"examples",
3783+
"command",
3784+
"response-2"
3785+
],
37243786
"src/pages/komodo-defi-framework/changelog/index.mdx": [
37253787
"change-log",
37263788
"komodo-de-fi-framework-v2-3-0-beta",
@@ -3776,6 +3838,7 @@
37763838
"example-using-gas-api",
37773839
"example-wss-with-certificates",
37783840
"example-with-wallet-name-and-wallet-password",
3841+
"example-with-1inch-api",
37793842
"example-for-hd-wallets",
37803843
"coins-file-configuration",
37813844
"optional-environment-variables",

src/data/sidebar.json

+29
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,35 @@
674674
"titleLink": "/komodo-defi-framework/api/v20-dev/",
675675
"links": []
676676
},
677+
{
678+
"title": "1inch Integration",
679+
"links": [
680+
{
681+
"title": "approve_token",
682+
"href": "/komodo-defi-framework/api/v20-dev/approve_token/"
683+
},
684+
{
685+
"title": "get_token_allowance",
686+
"href": "/komodo-defi-framework/api/v20-dev/get_token_allowance/"
687+
},
688+
{
689+
"title": "one_inch_v6_0_classic_swap_create",
690+
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_create/"
691+
},
692+
{
693+
"title": "one_inch_v6_0_classic_swap_liquidity_sources",
694+
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_liquidity_sources/"
695+
},
696+
{
697+
"title": "one_inch_v6_0_classic_swap_quote",
698+
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_quote/"
699+
},
700+
{
701+
"title": "one_inch_v6_0_classic_swap_tokens",
702+
"href": "/komodo-defi-framework/api/v20-dev/one_inch_v6_0_classic_swap_tokens/"
703+
}
704+
]
705+
},
677706
{
678707
"title": "Lightning Network",
679708
"links": [

src/pages/komodo-defi-framework/api/common_structures/orders/index.mdx

+42
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,45 @@ export const description = "Each order on the Komodo Defi oderbook can be querie
337337
}
338338
```
339339
</CollapsibleSection>
340+
341+
### 1inchTokenInfo
342+
343+
| Structure | Type | Description |
344+
| --------- | -------------- | ---------------------------------------------------------- |
345+
| address | string | Token contract address. |
346+
| symbol | string | Token symbol. |
347+
| name | string | Token name. |
348+
| decimals | numeric | Number of digits after decimal point for the token amount. |
349+
| eip2612 | boolean | Is Eip-2612 supported. |
350+
| is\_fot | boolean | Is FoT token. |
351+
| logo\_uri | string | Token logo uri. |
352+
| tags | list of string | Token tags. |
353+
354+
### 1inchProtocolInfo
355+
356+
| Structure | Type | Description |
357+
| -------------------- | ------- | ---------------------------- |
358+
| name | string | Liquidity source name. |
359+
| part | numeric | Protocol part. |
360+
| from\_token\_address | string | From-token contract address. |
361+
| to\_token\_address | numeric | To-token contract address. |
362+
363+
### 1inchTxFields
364+
365+
| Structure | Type | Description |
366+
| ---------- | ------- | ----------------- |
367+
| from | string | From address |
368+
| to | string | To address |
369+
| data | string | Transaction data |
370+
| value | numeric | Transaction value |
371+
| gas\_price | float | Gas price |
372+
| gas | numeric | Gas |
373+
374+
### 1inchProtocolImage
375+
376+
| Structure | Type | Description |
377+
| ---------- | ------ | ----------------------------- |
378+
| id | string | Protocol id. |
379+
| title | string | Protocol title. |
380+
| img | string | Link to protocol image. |
381+
| img\_color | string | Link to protocol image color. |

0 commit comments

Comments
 (0)