From dfd14569314a9ac13a3a88e7db82af5de99012a3 Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 17 Jul 2024 17:02:21 +0800 Subject: [PATCH 1/4] Add gas limit options --- .../tutorials/listing-a-new-coin/index.mdx | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx index 1263f976..032544ef 100644 --- a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx +++ b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx @@ -128,10 +128,27 @@ The token's contract **must** have `approve` and `transferFrom` methods. Additio | Parameter | Type | Description | | ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | chain\_id | integer | To find the EVM chain ID, see [Chainlist](https://chainlist.org/) | +| gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations, useful for tokens called ovcer proxy contracts which often require more than the default gas. See the `Gas Limit Options` table below for more information. | | protocol.type | string | Platform / protocol - e.g `ETH` for Ethereum, `ERC20` for ERC20 tokens on the Ethereum network | | protocol.protocol\_data | object | Required for tokens only. | | protocol.protocol\_data.platform | string | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens | -| protocol.protocol\_data.contract\_address | string | **Must be mixed case** The indentifying hex string for the token's contract. Can be found on sites like [EthScan](https://etherscan.io/), [BscScan](https://bscscan.com/) & [PolygonScan](https://polygonscan.com/) | +| protocol.protocol\_data.contract\_address | string | **Must be mixed case** The identifying hex string for the token's contract. Can be found on sites like [EthScan](https://etherscan.io/), [BscScan](https://bscscan.com/) & [PolygonScan](https://polygonscan.com/) | + + +### Gas Limit Options + +| Parameter | Type | Description | +| ----------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| eth_send_coins | integer | Gas limit for sending coins. | +| eth_send_erc20 | integer | Gas limit for sending ERC20 tokens. | +| eth_payment | integer | Gas limit for swap payment tx with coins. | +| erc20_payment | integer | Gas limit for swap payment tx with ERC20 tokens. | +| eth_receiver_spend | integer | Gas limit for swap receiver spend tx with coins. | +| erc20_receiver_spend | integer | Gas limit for swap receiver spend tx with ERC20 tokens. | +| eth_sender_refund | integer | Gas limit for swap refund tx with coins. | +| erc20_sender_refund | integer | Gas limit for swap refund tx with with ERC20 tokens. | +| eth_max_trade_gas | integer | Gas limit for other operations. | + ### ERC20 token example @@ -152,6 +169,17 @@ The token's contract **must** have `approve` and `transferFrom` methods. Additio "platform": "ETH", "contract_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" } + }, + "gas_limit": { + "eth_send_coins": 21000, + "eth_send_erc20": 65000, + "eth_payment": 75000, + "erc20_payment": 120000, + "eth_receiver_spend": 55000, + "erc20_receiver_spend": 130000, + "eth_sender_refund": 110000, + "erc20_sender_refund": 110000, + "eth_max_trade_gas": 150000 } } ``` From 4c0861edcd9fb617a71772c4d31d80c0014ed13a Mon Sep 17 00:00:00 2001 From: smk762 Date: Wed, 17 Jul 2024 09:22:02 +0000 Subject: [PATCH 2/4] [Bot] File and author data updated, validated and updated internal links, formatted md content, checked presence of file and dirs based on sidebar, checked presence of h1 in every file, update Komodo DeFi Framework methods table, adds/updates preview images when base is main --- filepathSlugs.json | 1 + .../tutorials/listing-a-new-coin/index.mdx | 38 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/filepathSlugs.json b/filepathSlugs.json index b6fbea9b..2c86cba9 100644 --- a/filepathSlugs.json +++ b/filepathSlugs.json @@ -3791,6 +3791,7 @@ "utxo-coin-example", "antara-smartchain-example", "1c-evm-like-tokens-eth-erc-20-matic-plg-20-bnb-bep-20", + "gas-limit-options", "erc-20-token-example", "bep-20-token-example", "1d-qrc-20-tokens", diff --git a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx index 032544ef..01cdb750 100644 --- a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx +++ b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx @@ -125,30 +125,28 @@ The token's contract **must** have `approve` and `transferFrom` methods. Additio * Protocol `"type"` field: `"ETH"` or `"ERC20"` * Protocol `"protocol_data"` field (ERC20 only): `"platform"` - `"ETH"`, `"ETC"` or other Ethereum forks. `"contract_address"` - ERC20 token [checksummed](https://coincodex.com/article/2078/ethereum-address-checksum-explained/) smart contract address. -| Parameter | Type | Description | -| ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| chain\_id | integer | To find the EVM chain ID, see [Chainlist](https://chainlist.org/) | +| Parameter | Type | Description | +| ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| chain\_id | integer | To find the EVM chain ID, see [Chainlist](https://chainlist.org/) | | gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations, useful for tokens called ovcer proxy contracts which often require more than the default gas. See the `Gas Limit Options` table below for more information. | -| protocol.type | string | Platform / protocol - e.g `ETH` for Ethereum, `ERC20` for ERC20 tokens on the Ethereum network | -| protocol.protocol\_data | object | Required for tokens only. | -| protocol.protocol\_data.platform | string | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens | -| protocol.protocol\_data.contract\_address | string | **Must be mixed case** The identifying hex string for the token's contract. Can be found on sites like [EthScan](https://etherscan.io/), [BscScan](https://bscscan.com/) & [PolygonScan](https://polygonscan.com/) | - +| protocol.type | string | Platform / protocol - e.g `ETH` for Ethereum, `ERC20` for ERC20 tokens on the Ethereum network | +| protocol.protocol\_data | object | Required for tokens only. | +| protocol.protocol\_data.platform | string | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens | +| protocol.protocol\_data.contract\_address | string | **Must be mixed case** The identifying hex string for the token's contract. Can be found on sites like [EthScan](https://etherscan.io/), [BscScan](https://bscscan.com/) & [PolygonScan](https://polygonscan.com/) | ### Gas Limit Options -| Parameter | Type | Description | -| ----------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| eth_send_coins | integer | Gas limit for sending coins. | -| eth_send_erc20 | integer | Gas limit for sending ERC20 tokens. | -| eth_payment | integer | Gas limit for swap payment tx with coins. | -| erc20_payment | integer | Gas limit for swap payment tx with ERC20 tokens. | -| eth_receiver_spend | integer | Gas limit for swap receiver spend tx with coins. | -| erc20_receiver_spend | integer | Gas limit for swap receiver spend tx with ERC20 tokens. | -| eth_sender_refund | integer | Gas limit for swap refund tx with coins. | -| erc20_sender_refund | integer | Gas limit for swap refund tx with with ERC20 tokens. | -| eth_max_trade_gas | integer | Gas limit for other operations. | - +| Parameter | Type | Description | +| ---------------------- | ------- | ------------------------------------------------------- | +| eth\_send\_coins | integer | Gas limit for sending coins. | +| eth\_send\_erc20 | integer | Gas limit for sending ERC20 tokens. | +| eth\_payment | integer | Gas limit for swap payment tx with coins. | +| erc20\_payment | integer | Gas limit for swap payment tx with ERC20 tokens. | +| eth\_receiver\_spend | integer | Gas limit for swap receiver spend tx with coins. | +| erc20\_receiver\_spend | integer | Gas limit for swap receiver spend tx with ERC20 tokens. | +| eth\_sender\_refund | integer | Gas limit for swap refund tx with coins. | +| erc20\_sender\_refund | integer | Gas limit for swap refund tx with with ERC20 tokens. | +| eth\_max\_trade\_gas | integer | Gas limit for other operations. | ### ERC20 token example From 2eaece917c5bf79c05fdb060b5477f4677c514d9 Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 9 Sep 2024 19:45:20 +0800 Subject: [PATCH 3/4] fix typo --- .../tutorials/listing-a-new-coin/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx index 01cdb750..1d5e7d46 100644 --- a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx +++ b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx @@ -128,7 +128,7 @@ The token's contract **must** have `approve` and `transferFrom` methods. Additio | Parameter | Type | Description | | ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | chain\_id | integer | To find the EVM chain ID, see [Chainlist](https://chainlist.org/) | -| gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations, useful for tokens called ovcer proxy contracts which often require more than the default gas. See the `Gas Limit Options` table below for more information. | +| gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations. Some tokens called over proxy contracts which often require more gas, though users may be able to choose higher/lower values than the default where required. See the `Gas Limit Options` table below for more information. | | protocol.type | string | Platform / protocol - e.g `ETH` for Ethereum, `ERC20` for ERC20 tokens on the Ethereum network | | protocol.protocol\_data | object | Required for tokens only. | | protocol.protocol\_data.platform | string | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens | From fbb85dfcbca50f2487ae6177f070bfbbbd1556a2 Mon Sep 17 00:00:00 2001 From: smk762 Date: Mon, 9 Sep 2024 19:45:45 +0800 Subject: [PATCH 4/4] add missing word --- .../tutorials/listing-a-new-coin/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx index 1d5e7d46..554d85db 100644 --- a/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx +++ b/src/pages/komodo-defi-framework/tutorials/listing-a-new-coin/index.mdx @@ -128,7 +128,7 @@ The token's contract **must** have `approve` and `transferFrom` methods. Additio | Parameter | Type | Description | | ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | chain\_id | integer | To find the EVM chain ID, see [Chainlist](https://chainlist.org/) | -| gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations. Some tokens called over proxy contracts which often require more gas, though users may be able to choose higher/lower values than the default where required. See the `Gas Limit Options` table below for more information. | +| gas\_limit | object | Optional, required for tokens only. Defines more precise gas prices for swap or transaction operations. Some tokens are called over proxy contracts which often require more gas, though users may be able to choose higher/lower values than the default where required. See the `Gas Limit Options` table below for more information. | | protocol.type | string | Platform / protocol - e.g `ETH` for Ethereum, `ERC20` for ERC20 tokens on the Ethereum network | | protocol.protocol\_data | object | Required for tokens only. | | protocol.protocol\_data.platform | string | The parent coin of the token's platform - e.g `MATIC` for PLG20 tokens |