Skip to content

Commit 6b34fdd

Browse files
authored
Merge pull request #173 from KomodoPlatform/add-gas-atom
update gas info for Cosmos
2 parents 834180f + f699cb7 commit 6b34fdd

File tree

8 files changed

+451
-96
lines changed

8 files changed

+451
-96
lines changed

data-for-gpts/all-content.txt

+98-19
Original file line numberDiff line numberDiff line change
@@ -27036,10 +27036,54 @@ The `FeeInfo` response object includes the following items for [withdraw (v2)](/
2703627036

2703727037
| Parameter | Type | Description |
2703827038
| ---------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
27039-
| type | string | Type of transaction fee; possible values: `UtxoFixed`, `UtxoPerKbyte`, `EthGas` |
27039+
| type | string | Type of transaction fee; possible values: `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas` |
2704027040
| amount | string (numeric) | Fee amount in coin units, used only when type is `UtxoFixed` (fixed amount not depending on tx size) or `UtxoPerKbyte` (amount per Kbyte) |
27041-
| gas\_price | string (numeric) | Used only when fee type is EthGas; sets the gas price in `gwei` units |
27042-
| gas | number (integer) | Used only when fee type is EthGas; sets the gas limit for transaction |
27041+
| gas\_price | string (numeric) | Used only when fee type is `Qrc20Gas` or `EthGas`; sets the gas price in `gwei` units. |
27042+
| gas\_price | number (double) | Used only when fee type is `CosmosGas`; sets the gas price. |
27043+
| gas | number (integer) | Used only when fee type is `EthGas`; sets the gas limit for transaction |
27044+
| gas\_limit | number (integer) | Used only when fee type is `Qrc20Gas` or `CosmosGas`; sets the gas limit for transaction |
27045+
27046+
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
27047+
#### Examples
27048+
27049+
```json
27050+
{
27051+
"type": "UtxoFixed",
27052+
"amount": "0.0001"
27053+
}
27054+
```
27055+
27056+
```json
27057+
{
27058+
"type": "UtxoPerKbyte",
27059+
"amount": "0.0001"
27060+
}
27061+
```
27062+
27063+
```json
27064+
{
27065+
"type": "EthGas",
27066+
"gas_price": "10",
27067+
"gas": 21000
27068+
}
27069+
```
27070+
27071+
```json
27072+
{
27073+
"type": "Qrc20Gas",
27074+
"gas_price": "10",
27075+
"gas_limit": 21000
27076+
}
27077+
```
27078+
27079+
```json
27080+
{
27081+
"type": "CosmosGas",
27082+
"gas_price": 0.05,
27083+
"gas_limit": 21000
27084+
}
27085+
```
27086+
</CollapsibleSection>
2704327087

2704427088
### ExtendedFeeInfo
2704527089

@@ -43055,20 +43099,6 @@ The request was failed due to an AtomicDEX API internal error.
4305543099
"id": 0
4305643100
}
4305743101
```
43058-
43059-
#### Response (InvalidFeePolicy error - attempt to use EthGas for UTXO coin)
43060-
43061-
```json
43062-
{
43063-
"mmrpc": "2.0",
43064-
"error": "Invalid fee policy: Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
43065-
"error_path": "utxo_common",
43066-
"error_trace": "utxo_common:1371]",
43067-
"error_type": "InvalidFeePolicy",
43068-
"error_data": "Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
43069-
"id": 0
43070-
}
43071-
```
4307243102
</CollapsibleSection>
4307343103

4307443104
#### Withdraw BTC, KMD, and other BTC-based forks, 1 coin per Kbyte fee
@@ -43390,7 +43420,7 @@ The request was failed due to an AtomicDEX API internal error.
4339043420
```
4339143421
</CollapsibleSection>
4339243422

43393-
##### Withdraw Tendermint coins with a memo
43423+
##### Withdraw Tendermint coins with a memo and custom gas fee
4339443424

4339543425
<CodeGroup title="Withdraw" tag="POST" label="withdraw" mm2MethodDecorate="true">
4339643426
```json
@@ -43402,7 +43432,12 @@ The request was failed due to an AtomicDEX API internal error.
4340243432
"coin": "IRIS",
4340343433
"to": "iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k",
4340443434
"amount": 13,
43405-
"memo": "It was a bright cold day in April, and the clocks were striking thirteen."
43435+
"memo": "It was a bright cold day in April, and the clocks were striking thirteen.",
43436+
"fee": {
43437+
"type": "CosmosGas",
43438+
"gas_price": 0.05,
43439+
"gas_limit": 150000
43440+
}
4340643441
},
4340743442
"id": 0
4340843443
}
@@ -43441,6 +43476,50 @@ The request was failed due to an AtomicDEX API internal error.
4344143476

4344243477
You can see the memo is included on the [block explorer](https://irishub.iobscan.io/#/txs/E00982A2A8442D7140916A34E29E287A0B1CBB4B38940372D1966BA7ACDE5BD6)
4344343478
</CollapsibleSection>
43479+
43480+
### Error Responses
43481+
43482+
#### InvalidRequest: Unknown fee type
43483+
43484+
```json
43485+
{
43486+
"mmrpc": "2.0",
43487+
"error": "Error parsing request: unknown variant `Tendermint`, expected one of `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas`",
43488+
"error_path": "dispatcher",
43489+
"error_trace": "dispatcher:109]",
43490+
"error_type": "InvalidRequest",
43491+
"error_data": "unknown variant `Tendermint`, expected one of `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas`",
43492+
"id": 0
43493+
}
43494+
```
43495+
43496+
#### InvalidRequest: wrong parameter type
43497+
43498+
```json
43499+
{
43500+
"mmrpc": "2.0",
43501+
"error": "Error parsing request: invalid type: string \"0.1\", expected f64",
43502+
"error_path": "dispatcher",
43503+
"error_trace": "dispatcher:109]",
43504+
"error_type": "InvalidRequest",
43505+
"error_data": "invalid type: string \"0.1\", expected f64",
43506+
"id": 0
43507+
}
43508+
```
43509+
43510+
#### InvalidFeePolicy: attempt to use EthGas for UTXO coin
43511+
43512+
```json
43513+
{
43514+
"mmrpc": "2.0",
43515+
"error": "Invalid fee policy: Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
43516+
"error_path": "utxo_common",
43517+
"error_trace": "utxo_common:1371]",
43518+
"error_type": "InvalidFeePolicy",
43519+
"error_data": "Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
43520+
"id": 0
43521+
}
43522+
```
4344443523
export const title = "AtomicDEX Method: Get Current MTP";
4344543524
export const description = "The get_current_mtp method returns the Median Time Past (MTP) from electrum servers for UTXO coins.";
4344643525

data-for-gpts/atomicdex-content.txt

+98-19
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,54 @@ The `FeeInfo` response object includes the following items for [withdraw (v2)](/
342342

343343
| Parameter | Type | Description |
344344
| ---------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
345-
| type | string | Type of transaction fee; possible values: `UtxoFixed`, `UtxoPerKbyte`, `EthGas` |
345+
| type | string | Type of transaction fee; possible values: `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas` |
346346
| amount | string (numeric) | Fee amount in coin units, used only when type is `UtxoFixed` (fixed amount not depending on tx size) or `UtxoPerKbyte` (amount per Kbyte) |
347-
| gas\_price | string (numeric) | Used only when fee type is EthGas; sets the gas price in `gwei` units |
348-
| gas | number (integer) | Used only when fee type is EthGas; sets the gas limit for transaction |
347+
| gas\_price | string (numeric) | Used only when fee type is `Qrc20Gas` or `EthGas`; sets the gas price in `gwei` units. |
348+
| gas\_price | number (double) | Used only when fee type is `CosmosGas`; sets the gas price. |
349+
| gas | number (integer) | Used only when fee type is `EthGas`; sets the gas limit for transaction |
350+
| gas\_limit | number (integer) | Used only when fee type is `Qrc20Gas` or `CosmosGas`; sets the gas limit for transaction |
351+
352+
<CollapsibleSection expandedText="Hide Example" collapsedText="Show Example">
353+
#### Examples
354+
355+
```json
356+
{
357+
"type": "UtxoFixed",
358+
"amount": "0.0001"
359+
}
360+
```
361+
362+
```json
363+
{
364+
"type": "UtxoPerKbyte",
365+
"amount": "0.0001"
366+
}
367+
```
368+
369+
```json
370+
{
371+
"type": "EthGas",
372+
"gas_price": "10",
373+
"gas": 21000
374+
}
375+
```
376+
377+
```json
378+
{
379+
"type": "Qrc20Gas",
380+
"gas_price": "10",
381+
"gas_limit": 21000
382+
}
383+
```
384+
385+
```json
386+
{
387+
"type": "CosmosGas",
388+
"gas_price": 0.05,
389+
"gas_limit": 21000
390+
}
391+
```
392+
</CollapsibleSection>
349393

350394
### ExtendedFeeInfo
351395

@@ -16361,20 +16405,6 @@ The request was failed due to an AtomicDEX API internal error.
1636116405
"id": 0
1636216406
}
1636316407
```
16364-
16365-
#### Response (InvalidFeePolicy error - attempt to use EthGas for UTXO coin)
16366-
16367-
```json
16368-
{
16369-
"mmrpc": "2.0",
16370-
"error": "Invalid fee policy: Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
16371-
"error_path": "utxo_common",
16372-
"error_trace": "utxo_common:1371]",
16373-
"error_type": "InvalidFeePolicy",
16374-
"error_data": "Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
16375-
"id": 0
16376-
}
16377-
```
1637816408
</CollapsibleSection>
1637916409

1638016410
#### Withdraw BTC, KMD, and other BTC-based forks, 1 coin per Kbyte fee
@@ -16696,7 +16726,7 @@ The request was failed due to an AtomicDEX API internal error.
1669616726
```
1669716727
</CollapsibleSection>
1669816728

16699-
##### Withdraw Tendermint coins with a memo
16729+
##### Withdraw Tendermint coins with a memo and custom gas fee
1670016730

1670116731
<CodeGroup title="Withdraw" tag="POST" label="withdraw" mm2MethodDecorate="true">
1670216732
```json
@@ -16708,7 +16738,12 @@ The request was failed due to an AtomicDEX API internal error.
1670816738
"coin": "IRIS",
1670916739
"to": "iaa16drqvl3u8sukfsu4lm3qsk28jr3fahja9vsv6k",
1671016740
"amount": 13,
16711-
"memo": "It was a bright cold day in April, and the clocks were striking thirteen."
16741+
"memo": "It was a bright cold day in April, and the clocks were striking thirteen.",
16742+
"fee": {
16743+
"type": "CosmosGas",
16744+
"gas_price": 0.05,
16745+
"gas_limit": 150000
16746+
}
1671216747
},
1671316748
"id": 0
1671416749
}
@@ -16747,6 +16782,50 @@ The request was failed due to an AtomicDEX API internal error.
1674716782

1674816783
You can see the memo is included on the [block explorer](https://irishub.iobscan.io/#/txs/E00982A2A8442D7140916A34E29E287A0B1CBB4B38940372D1966BA7ACDE5BD6)
1674916784
</CollapsibleSection>
16785+
16786+
### Error Responses
16787+
16788+
#### InvalidRequest: Unknown fee type
16789+
16790+
```json
16791+
{
16792+
"mmrpc": "2.0",
16793+
"error": "Error parsing request: unknown variant `Tendermint`, expected one of `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas`",
16794+
"error_path": "dispatcher",
16795+
"error_trace": "dispatcher:109]",
16796+
"error_type": "InvalidRequest",
16797+
"error_data": "unknown variant `Tendermint`, expected one of `UtxoFixed`, `UtxoPerKbyte`, `EthGas`, `Qrc20Gas`, `CosmosGas`",
16798+
"id": 0
16799+
}
16800+
```
16801+
16802+
#### InvalidRequest: wrong parameter type
16803+
16804+
```json
16805+
{
16806+
"mmrpc": "2.0",
16807+
"error": "Error parsing request: invalid type: string \"0.1\", expected f64",
16808+
"error_path": "dispatcher",
16809+
"error_trace": "dispatcher:109]",
16810+
"error_type": "InvalidRequest",
16811+
"error_data": "invalid type: string \"0.1\", expected f64",
16812+
"id": 0
16813+
}
16814+
```
16815+
16816+
#### InvalidFeePolicy: attempt to use EthGas for UTXO coin
16817+
16818+
```json
16819+
{
16820+
"mmrpc": "2.0",
16821+
"error": "Invalid fee policy: Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
16822+
"error_path": "utxo_common",
16823+
"error_trace": "utxo_common:1371]",
16824+
"error_type": "InvalidFeePolicy",
16825+
"error_data": "Expected 'UtxoFixed' or 'UtxoPerKbyte' fee types, found EthGas",
16826+
"id": 0
16827+
}
16828+
```
1675016829
export const title = "AtomicDEX Method: Get Current MTP";
1675116830
export const description = "The get_current_mtp method returns the Median Time Past (MTP) from electrum servers for UTXO coins.";
1675216831

0 commit comments

Comments
 (0)