You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/cheqd-cli/cheqd-cli-fee-abstraction.md
+29-20
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,33 @@ Fees for transactions cannot be denominated in arbitrary alternative tokens, whe
14
14
15
15
## Prerequisites for using Fee Abstraction
16
16
17
-
The equivalent IBC denomination amount is required to pay for transactions. **Ensure this amount is available in the equivalent Osmosis account** related to the cheqd account/key provided in the transaction.
17
+
The equivalent IBC denomination amount is required to pay for transactions. **Ensure this amount is available in the equivalent cheqd account** related to the cheqd account/key provided in the transaction, bridged from any Osmosis account.
18
18
19
-
### Looking up balance of equivalent Osmosis account
19
+
### Bridging from Osmosis
20
20
21
21
You can find out if you've got sufficient balance in supported IBC denominations using the following methods:
22
22
23
23
1.**Through Leap Wallet**
24
24
1. Ensure you have added the cheqd wallet you want to use for transactions to a supported desktop/mobile wallet. The recommended wallet app is [Leap Wallet](https://www.leapwallet.io/download). If you previously used Keplr Wallet, we recommend [migrating from Keplr Wallet to Leap Wallet](https://docs.cheqd.io/product/network/wallets/migrate) as it has better support for [looking up real-time gas prices](./cheqd-cli-token-transactions.md).
25
25
2. Once you've added the cheqd wallet account to Leap Wallet, use the network switcher to switch to **Osmosis**. This will allow you to see the balances you have on Osmosis chain, including native OSMO as well as any IBC denominations such as USDC.
26
-
2.**Converting your cheqd address to Osmosis using CLI**
27
-
1. Use a [bech32 converter tool like this one](https://cosmosdrops.io/en/tools/bech32-converter) to convert a cheqd wallet address to an Osmosis address (use the prefix `osmo` for target address to convert to).
28
-
2. Once you have obtained your Osmosis address, you can look up its balance using the [Osmosis CLI](https://docs.osmosis.zone/osmosis-core/osmosisd/) or through a block explorer like [Mintscan](https://mintscan.io/osmosis).
26
+
2.**Sending tokens over IBC**
27
+
1. If you have an existing Osmosis account, you can send tokens over IBC to your cheqd account. This is done by sending the tokens from your Osmosis account to the address of your cheqd account. Use the `Swap` flow to send tokens over IBC. The tokens will be sent to the cheqd account and will be available for use in transactions. Otherwise, you can use the `cheqd-noded tx ibc-transfer transfer` command to send tokens over IBC from your Osmosis account to your cheqd account. The command will look like this:
2. Once the tokens are sent over IBC, you can use the `cheqd-noded query bank balances <address>` command to check the balance of your cheqd account. This will show you the balance of the tokens that were sent over IBC. Refer to [Appendix](./cheqd-cli-fee-abstraction.md#appendix) for the IBC denomination of the tokens.
29
31
30
32
### Getting sufficient balance of supported IBC denominations on equivalent Osmosis account
31
33
32
34
If you do not have sufficient balances in supported IBC denominations on Osmosis, you need to top-up the specific token you want in your Osmosis account
33
35
34
36
#### For USDC
35
37
36
-
1. If you already have USDC (regardless of which chain it is on), use [Noble Express Transfer](https://express.noble.xyz/) to transfer it as Cosmos-native Noble USDC into Osmosis.
37
-
2. Acquire USDC on Osmosis by [swapping existing tokens to USDC](https://docs.osmosis.zone/overview/educate/getting-started#swapping-tokens).
38
+
1. If you already have USDC (regardless of which chain it is on), use [Noble Express Transfer](https://express.noble.xyz/) to transfer it first as Cosmos-native Noble USDC into Osmosis, before bridging it to cheqd. This is the fastest way to get USDC on Osmosis.
39
+
2. Acquire USDC on Osmosis by [swapping existing tokens to USDC](https://docs.osmosis.zone/overview/educate/getting-started#swapping-tokens). You can use any token you have on Osmosis to swap for USDC. The most common tokens to swap for USDC are OSMO and ATOM. You can use the [Osmosis DEX](https://app.osmosis.zone/) to swap tokens.
40
+
3. Once you have sufficient USDC on Osmosis, you can use the CLI or Leap Wallet to send the USDC over IBC to your cheqd account. The command will look like this:
4. Once the USDC is sent over IBC, you can use the `cheqd-noded query bank balances <address>` command to check the balance of your cheqd account. This will show you the balance of USDC that was sent over IBC. Refer to [Appendix](./cheqd-cli-fee-abstraction.md#appendix) for the IBC denomination of USDC on Osmosis.
43
+
5. You can also use the `cheqd-noded query feeabs osmo-arithmetic-twap <ibc_denom>` command to check the real-time rate for USDC on cheqd. This will show you the exchange rate in USDC that is required to pay for transactions on cheqd.
1. The `ibc_denom` is the IBC denomination of the supported asset **on Osmsosis** (not the IBC denomination of the asset on cheqd).
69
-
2. If the `status` is `0`, the IBC denomination is allowed for transactions. If the `status` is `1`, the IBC denomination is not allowed for transactions. Also, if the IBC denomination is not included in the response, it is not allowed for transactions.
74
+
1. The `ibc_denom` is the IBC denomination of the supported asset **on cheqd** (not the IBC denomination of the asset on Osmosis).
75
+
2. The `osmosis_pool_token_denom_in` is the IBC denomination of the asset on Osmosis.
76
+
3. The `pool_id` is the ID of the liquidity pool on Osmosis that is used for the conversion.
77
+
4. If the `status` is `0`, the IBC denomination is allowed for transactions. If the `status` is `1`, the IBC denomination is not allowed for transactions. Also, if the IBC denomination is not included in the response, it is not allowed for transactions. The status can vary based on the relaying channel and whether outdated and / or frozen or not.
70
78
71
79
### Querying allowed IBC denominations via REST API
72
80
@@ -81,7 +89,7 @@ You can also query allowed IBC denominations using the REST API, which can be us
*`amount`: The amount to send, in the format `1000ncheq`. The amount must be in the chain-native denomination, which is `ncheq`
154
162
*`gas`: The amount of gas to use or `auto` to calculate the gas automatically
155
-
*`gas_prices`: The gas prices to use, in the format `5000ncheq` or `0.00000016ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4`
156
-
*`fees`: The fees to pay, in the format `1000000000ncheq` or `0.032ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4`
163
+
*`gas_prices`: The gas prices to use, in the format `5000ncheq` or `0.00000016ibc/F5FABF52B54E65064B57BF6DBD8E5FAD22CEE9F4B8A57ADBB20CCD0173AA72A4`
164
+
*`fees`: The fees to pay, in the format `1000000000ncheq` or `0.032ibc/F5FABF52B54E65064B57BF6DBD8E5FAD22CEE9F4B8A57ADBB20CCD0173AA72A4`
157
165
*`--node`: IP address or URL of node to send the request to
158
166
159
167
> **Note**: Use either `--gas` and `--gas-prices` or `--fees` to declare fees in transactions. If `--fees` is used, the `--gas` and `--gas-prices` flags are ignored.
0 commit comments