From fe6a4b6ca2e5b899960755211f063df82cb83c3a Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Thu, 31 Oct 2024 15:07:09 -0600 Subject: [PATCH] update cli testnet bridging sections --- .../bridge-to-astria-mainnet-alpha.md | 8 +- .../bridge-to-flame-mainnet-alpha.md | 8 +- .../withdraw-from-astria-mainnet-alpha.md | 8 +- .../testnet/bridge-to-astria-testnet.md | 41 +++++---- .../testnet/bridge-to-flame-testnet.md | 85 +++++-------------- .../testnet/withdraw-from-astria-testnet.md | 51 +++++------ .../testnet/withdraw-from-flame-testnet.md | 54 +++--------- docs/components/_bridge-to-astria-testnet.md | 49 +++++++++++ .../_bridge-to-flame-via-astria-testnet.md | 32 +++++++ .../_bridge-to-flame-via-ibc-testnet.md | 37 ++++++++ .../_check-flame-balances-testnet.md | 18 ++++ .../_withdraw-from-astria-testnet.md | 47 ++++++++++ 12 files changed, 270 insertions(+), 168 deletions(-) create mode 100644 docs/components/_bridge-to-astria-testnet.md create mode 100644 docs/components/_bridge-to-flame-via-astria-testnet.md create mode 100644 docs/components/_bridge-to-flame-via-ibc-testnet.md create mode 100644 docs/components/_check-flame-balances-testnet.md create mode 100644 docs/components/_withdraw-from-astria-testnet.md diff --git a/docs/bridging/mainnet-alpha/bridge-to-astria-mainnet-alpha.md b/docs/bridging/mainnet-alpha/bridge-to-astria-mainnet-alpha.md index c4f421c3..903c7fb1 100644 --- a/docs/bridging/mainnet-alpha/bridge-to-astria-mainnet-alpha.md +++ b/docs/bridging/mainnet-alpha/bridge-to-astria-mainnet-alpha.md @@ -1,9 +1,11 @@ # Bridging to the Astria Mainnet Alpha -Bridging commands from Celestia and Noble Mainnets to the Astria Mainnet. +Bridging commands from Celestia, Noble, Osmosis, and Stride Mainnets to the +Astria Mainnet Alpha. -You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow -the install steps [here](../overview.md#bridging-dependencies). +You will need the `astria-cli`, `celestia-appd`, `nobled`, `osmosisd`, and +`strided` installed. Follow the install steps +[here](../overview.md#bridging-dependencies). You can export the following to make the commands below easily copy and pastable. diff --git a/docs/bridging/mainnet-alpha/bridge-to-flame-mainnet-alpha.md b/docs/bridging/mainnet-alpha/bridge-to-flame-mainnet-alpha.md index 2f6a7fbf..c3836706 100644 --- a/docs/bridging/mainnet-alpha/bridge-to-flame-mainnet-alpha.md +++ b/docs/bridging/mainnet-alpha/bridge-to-flame-mainnet-alpha.md @@ -1,9 +1,11 @@ # Bridging to Flame on Mainnet Alpha -Bridging commands from Celestia and Noble Mainnets to the Astria Mainnet. +Bridging commands from Astria, Celestia, Noble, Osmosis, and Stride Mainnets to +Flame running on Astria Mainnet Alpha. -You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow -the install steps [here](./overview.md#bridging-dependencies). +You will need the `astria-cli`, `celestia-appd`, `nobled`, `osmosisd`, and +`strided` installed. Follow the install steps +[here](../overview.md#bridging-dependencies). You can export the following to make the commands below easily copy and pastable. diff --git a/docs/bridging/mainnet-alpha/withdraw-from-astria-mainnet-alpha.md b/docs/bridging/mainnet-alpha/withdraw-from-astria-mainnet-alpha.md index 15a9f234..d4104b5d 100644 --- a/docs/bridging/mainnet-alpha/withdraw-from-astria-mainnet-alpha.md +++ b/docs/bridging/mainnet-alpha/withdraw-from-astria-mainnet-alpha.md @@ -2,10 +2,12 @@ # Withdraw from the Astria Mainnet Alpha -Withdrawal commands from Astria Mainnet to Celestia and Noble Mainnets. +Withdrawal commands from Astria Mainnet to Celestia, Noble, Osmosis, and Stride +Mainnets. -You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow -the install steps [here](../overview.md#bridging-dependencies). +You will need the `astria-cli`, `celestia-appd`, `nobled`, `osmosisd`, and +`strided` installed. Follow the install steps +[here](../overview.md#bridging-dependencies). You can export the following to make the commands below easily copy and pastable. diff --git a/docs/bridging/testnet/bridge-to-astria-testnet.md b/docs/bridging/testnet/bridge-to-astria-testnet.md index ab302a26..94de8966 100644 --- a/docs/bridging/testnet/bridge-to-astria-testnet.md +++ b/docs/bridging/testnet/bridge-to-astria-testnet.md @@ -1,9 +1,11 @@ # Bridging to the Astria `dawn` Testnet -Bridging commands from Celestia and Noble testnets to the Astria `dawn` testnet. +Bridging commands from Celestia, Noble, and Stride Testnets to the Astria `dawn` +Testnet. -You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow -the install steps [here](../overview.md#bridging-dependencies). +You will need the `astria-cli`, `celestia-appd`, `nobled`, and `strided` +installed. Follow the install steps +[here](../overview.md#bridging-dependencies). You can export the following to make the commands below easily copy and pastable. @@ -15,21 +17,13 @@ export CELESTIA_KEY_NAME="" export CELESTIA_ADDRESS="" export NOBLE_KEY_NAME="" export NOBLE_ADDRESS="" +export STRIDE_KEY_NAME="" +export STRIDE_ADDRESS="" ``` ## Bridge to Astria -### From Celestia - -```bash -celestia-appd tx ibc-transfer transfer transfer channel-160 $ASTRIA_ADDRESS 1000000utia --fees=420utia --from $CELESTIA_KEY_NAME --node=https://rpc-mocha.pops.one:443 --chain-id mocha-4 --packet-timeout-height 0-0 -``` - -### From Noble - -```bash -nobled tx ibc-transfer transfer transfer channel-232 $ASTRIA_ADDRESS 1000000uusdc --from $NOBLE_KEY_NAME --node https://noble-testnet-rpc.polkachu.com:443 --chain-id grand-1 --packet-timeout-height 0-0 -``` + ## Check Your Balances on Astria @@ -37,12 +31,15 @@ nobled tx ibc-transfer transfer transfer channel-232 $ASTRIA_ADDRESS 1000000uusd astria-cli sequencer balance get $ASTRIA_ADDRESS --sequencer-url https://rpc.sequencer.dawn-1.astria.org/ ``` -### View Transactions on [Mintscan](https://www.mintscan.io/) +## View Transactions on [Mintscan](https://www.mintscan.io/) + +You can view your transactions by visiting the following: + +- `https://www.mintscan.io/celestia/address/` +- `https://www.mintscan.io/noble/address/` +- `https://www.mintscan.io/stride/address/` -You can view your transactions by visiting -`https://www.mintscan.io/noble-testnet/address/` or -`https://www.mintscan.io/noble-testnet/address/`. You can -also go directly to [Mintscan](https://www.mintscan.io/) and search for the -`txhash` that is returned after sending your transaction, but it is recommended -to view your address transaction history as this will show if an acknowledgement -for your transfer was received. +You can also go directly to [Mintscan](https://www.mintscan.io/) and search for +the `txhash` that is returned after sending your transaction, but it is +recommended to view your address transaction history as this will show if an +acknowledgement for your transfer was received. diff --git a/docs/bridging/testnet/bridge-to-flame-testnet.md b/docs/bridging/testnet/bridge-to-flame-testnet.md index 5a60ea71..60528d6e 100644 --- a/docs/bridging/testnet/bridge-to-flame-testnet.md +++ b/docs/bridging/testnet/bridge-to-flame-testnet.md @@ -20,82 +20,35 @@ export FLAME_ADDRESS="" ## Bridge to Flame -### From Celestia +### Via IBC -```bash -celestia-appd tx ibc-transfer transfer \ - transfer \ - channel-160 \ - astria1lepnry7tlpzvrukp5xej4v5wp532k2f94vxqnr \ - "10000utia" \ - --fees=420utia \ - --memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \ - --chain-id="mocha-4" \ - --from="$CELESTIA_KEY_NAME" \ - --node=https://rpc-mocha.pops.one:443 \ - --packet-timeout-height 0-0 -``` - -### From Noble + -```bash -nobled tx ibc-transfer transfer \ - transfer \ - channel-232 \ - astria1u6ewl0tejz0df2l6tzc7k2degx6mqsjahldqxd \ - "100000uusdc" \ - --memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \ - --chain-id="grand-1" \ - --from="$NOBLE_KEY_NAME" \ - --node=https://noble-testnet-rpc.polkachu.com:443 \ - --packet-timeout-height 0-0 -``` +### Direct from Astria -### TIA from Astria - -```bash -astria-cli sequencer bridge-lock astria1lepnry7tlpzvrukp5xej4v5wp532k2f94vxqnr \ - --amount 10000 \ - --destination-chain-address $FLAME_ADDRESS \ - --private-key $PRIV_KEY \ - --sequencer.chain-id dawn-1 \ - --sequencer-url https://rpc.sequencer.dawn-1.astria.org/ \ - --fee-asset=transfer/channel-0/utia --asset=transfer/channel-0/utia -``` - -### USDC from Astria - -```bash -astria-cli sequencer bridge-lock astria1u6ewl0tejz0df2l6tzc7k2degx6mqsjahldqxd \ - --amount 10000 \ - --destination-chain-address $FLAME_ADDRESS \ - --private-key $PRIV_KEY \ - --sequencer.chain-id dawn-1 \ - --sequencer-url https://rpc.sequencer.dawn-1.astria.org/ \ - --fee-asset=transfer/channel-0/utia --asset=transfer/channel-1/uusdc -``` + ## Check Your Balances on Flame -### TIA + -```bash -cast balance $FLAME_ADDRESS --rpc-url https://rpc.flame.dawn-1.astria.org +## View Your Transactions on Flame -``` +Open the [Flame `dawn` Block Explorer](https://explorer.flame.dawn-1.astria.org) +and search for your Flame address to see your transactions. -### USDC - - -```bash -cast balance $FLAME_ADDRESS --erc20 0x6e18cE6Ec3Fc7b8E3EcFca4fA35e25F3f6FA879a --rpc-url https://rpc.flame.dawn-1.astria.org +On the account page you can view your TIA balance directly. To view your USDC +balance, select the `Tokens` tab. -``` +## View Transactions on [Mintscan](https://www.mintscan.io/) -## View Your Transactions +If you bridge from an IBC chain, you can view your transactions by visiting +the following: -Open the [Flame Block Explorer](https://explorer.flame.dawn-1.astria.org) and -search for your Flame address to see your transactions. +- `https://www.mintscan.io/celestia-testnet/address/` +- `https://www.mintscan.io/noble-testnet/address/` -On the account page you can view your TIA balance directly. To view your USDC -balance, select the `Tokens` tab. +You can also go directly to [Mintscan](https://www.mintscan.io/) and search for +the `txhash` that is returned after sending your transaction, but it is +recommended to view your address transaction history as this will show if an +acknowledgement for your transfer was received. diff --git a/docs/bridging/testnet/withdraw-from-astria-testnet.md b/docs/bridging/testnet/withdraw-from-astria-testnet.md index e14e5ee9..1aa65ff3 100644 --- a/docs/bridging/testnet/withdraw-from-astria-testnet.md +++ b/docs/bridging/testnet/withdraw-from-astria-testnet.md @@ -1,11 +1,13 @@ -# Withdraw from the Astria `dawn` Devnet +# Withdraw from the Astria `dawn` Testnet -Withdrawal commands from Astria `dusk` devnet to Celestia and Noble testnets. +Withdrawal commands from Astria `dawn` Testnet to Celestia, Noble, and Stride +Testnets. -You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow -the install steps [here](../overview.md#bridging-dependencies). +You will need the `astria-cli`, `celestia-appd`, `nobled` and `strided` +installed. Follow the install steps +[here](../overview.md#bridging-dependencies). You can export the following to make the commands below easily copy and pastable. @@ -17,43 +19,34 @@ export CELESTIA_KEY_NAME="" export CELESTIA_ADDRESS="" export NOBLE_KEY_NAME="" export NOBLE_ADDRESS="" +export STRIDE_KEY_NAME="" +export STRIDE_ADDRESS="" ``` ## Withdraw from Astria -### Astria to Celestia + -```bash -astria-cli sequencer ics20-withdrawal --amount 1000 --destination-chain-address=$CELESTIA_ADDRESS --source-channel channel-0 --private-key=$PRIV_KEY --sequencer-url=https://rpc.sequencer.dawn-1.astria.org/ --sequencer.chain-id dawn-1 --asset transfer/channel-0/utia --fee-asset transfer/channel-0/utia -``` - -### Astria to Noble - -```bash -astria-cli sequencer ics20-withdrawal --amount 1000 --destination-chain-address=$NOBLE_ADDRESS --source-channel channel-1 --private-key=$PRIV_KEY --sequencer-url=https://rpc.sequencer.dawn-1.astria.org/ --sequencer.chain-id dawn-1 --asset transfer/channel-1/uusdc --fee-asset transfer/channel-0/utia -``` - -### View Transactions on [Astrotrek](https://dawn.astrotrek.io/) +## View Transactions on [Astrotrek](https://dawn.astrotrek.io/) Go to `https://dawn.astrotrek.io/account/?tab=transactions` to see the withdrawal transactions. You can also search the returned transaction hash directly in [Astrotrek](https://dawn.astrotrek.io/). -You will also see the received transactions on -[Mintscan](#view-transactions-on-mintscan). +## View Transactions on [Mintscan](https://www.mintscan.io/) -## Check your Balances on Celestia and Noble +If you bridge out to an IBC chain, you can view your transactions by visiting +the following: -### Celestia Balance +- `https://www.mintscan.io/celestia/address/` +- `https://www.mintscan.io/noble/address/` +- `https://www.mintscan.io/stride/address/` -```bash -celestia-appd query bank balances $CELESTIA_ADDRESS --node=https://rpc-mocha.pops.one:443 --chain-id mocha-4 - -``` +You can also go directly to [Mintscan](https://www.mintscan.io/) and search for +the `txhash` that is returned after sending your transaction, but it is +recommended to view your address transaction history as this will show if an +acknowledgement for your transfer was received. -### Noble Balance +## Check your Testnet Balances -```bash -nobled query bank balances $NOBLE_ADDRESS --node https://noble-testnet-rpc.polkachu.com:443 - -``` + diff --git a/docs/bridging/testnet/withdraw-from-flame-testnet.md b/docs/bridging/testnet/withdraw-from-flame-testnet.md index 36ceff33..00e90b20 100644 --- a/docs/bridging/testnet/withdraw-from-flame-testnet.md +++ b/docs/bridging/testnet/withdraw-from-flame-testnet.md @@ -62,66 +62,36 @@ export RPC_URL="https://rpc.flame.dawn-1.astria.org" ## To Astria -### Withdraw TIA - ::: info Make sure the `ORIGIN_DESTINATION_CHAIN_ADDRESS` in your `.env` file is updated -to be your Celestia address. +to be the address of the desired asset you are withdrawing: +- Set to your **Celestia** address to withdraw `TIA` +- Set to your **Noble** address to withdraw `USDC` ::: +Then run the following command: + ```bash forge script script/AstriaWithdrawer.s.sol:AstriaWithdrawerScript \ --rpc-url $RPC_URL --broadcast --sig "withdrawToSequencer()" -vvvv ``` -### Withdraw USDC +## To IBC Chain ::: info Make sure the `ORIGIN_DESTINATION_CHAIN_ADDRESS` in your `.env` file is updated -to be your Noble address. +to be the address of the desired asset you are withdrawing: +- Set to your **Celestia** address to withdraw `TIA` +- Set to your **Noble** address to withdraw `USDC` ::: -```bash -forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \ - --rpc-url $RPC_URL --broadcast --sig "withdrawToSequencer()" -vvvv -``` - -## To Celestia - -::: info -Make sure the `ORIGIN_DESTINATION_CHAIN_ADDRESS` in your `.env` file is updated -to be your Celestia address. -::: +Then run the following command: ```bash forge script script/AstriaWithdrawer.s.sol:AstriaWithdrawerScript \ --rpc-url $RPC_URL --broadcast --sig "withdrawToIbcChain()" -vvvv ``` -## To Noble - -::: info -Make sure the `ORIGIN_DESTINATION_CHAIN_ADDRESS` in your `.env` file is updated -to be your Noble address. -::: - -```bash -forge script script/AstriaBridgeableERC20.s.sol:AstriaBridgeableERC20Script \ - --rpc-url $RPC_URL --broadcast --sig "withdrawToIbcChain()" -vvvv -``` - -## Check your Balances on Celestia and Noble - -### Celestia Balance - -```bash -celestia-appd query bank balances $CELESTIA_ADDRESS --node=https://rpc-mocha.pops.one:443 --chain-id mocha-4 - -``` - -### Noble Balance +## Check your Testnet Balances -```bash -nobled query bank balances $NOBLE_ADDRESS --node https://noble-testnet-rpc.polkachu.com:443 - -``` + diff --git a/docs/components/_bridge-to-astria-testnet.md b/docs/components/_bridge-to-astria-testnet.md new file mode 100644 index 00000000..2d739a0d --- /dev/null +++ b/docs/components/_bridge-to-astria-testnet.md @@ -0,0 +1,49 @@ + + +::: code-group + +```bash [From Celestia] +celestia-appd tx ibc-transfer transfer \ + transfer \ + channel-160 \ + $ASTRIA_ADDRESS \ + 1000000utia \ + --fees=420utia \ + --from $CELESTIA_KEY_NAME \ + --node=https://rpc-mocha.pops.one:443 \ + --chain-id mocha-4 \ + --packet-timeout-height 0-0 +``` + +```bash [From Noble] +nobled tx ibc-transfer transfer \ + transfer \ + channel-232 \ + $ASTRIA_ADDRESS \ + 1000000uusdc \ + --from $NOBLE_KEY_NAME \ + --node https://noble-testnet-rpc.polkachu.com:443 \ + --chain-id grand-1 \ + --packet-timeout-height 0-0 +``` + +```bash [From Stride] +strided tx ibc-transfer transfer \ + transfer \ + channel-53 \ + $ASTRIA_ADDRESS \ + "100000stutia" \ + --chain-id="stride-testnet-1" \ + --from=$STRIDE_KEY_NAME \ + --node=https://stride-testnet-rpc.polkachu.com:443 \ + --packet-timeout-height "0-0" \ + --fees=500ustrd +``` + +::: + + diff --git a/docs/components/_bridge-to-flame-via-astria-testnet.md b/docs/components/_bridge-to-flame-via-astria-testnet.md new file mode 100644 index 00000000..fec0041a --- /dev/null +++ b/docs/components/_bridge-to-flame-via-astria-testnet.md @@ -0,0 +1,32 @@ + + +::: code-group + +```bash [TIA] +astria-cli sequencer bridge-lock astria1lepnry7tlpzvrukp5xej4v5wp532k2f94vxqnr \ + --amount 10000 \ + --destination-chain-address $FLAME_ADDRESS \ + --private-key $PRIV_KEY \ + --sequencer.chain-id dawn-1 \ + --sequencer-url https://rpc.sequencer.dawn-1.astria.org/ \ + --fee-asset=transfer/channel-0/utia \ + --asset=transfer/channel-0/utia +``` + +```bash [USDC] +astria-cli sequencer bridge-lock astria1u6ewl0tejz0df2l6tzc7k2degx6mqsjahldqxd \ + --amount 10000 \ + --destination-chain-address $FLAME_ADDRESS \ + --private-key $PRIV_KEY \ + --sequencer.chain-id dawn-1 \ + --sequencer-url https://rpc.sequencer.dawn-1.astria.org/ \ + --fee-asset=transfer/channel-0/utia \ + --asset=transfer/channel-1/uusdc +``` + +::: + + diff --git a/docs/components/_bridge-to-flame-via-ibc-testnet.md b/docs/components/_bridge-to-flame-via-ibc-testnet.md new file mode 100644 index 00000000..48f646cd --- /dev/null +++ b/docs/components/_bridge-to-flame-via-ibc-testnet.md @@ -0,0 +1,37 @@ + + +::: code-group + +```bash [From Celestia] +celestia-appd tx ibc-transfer transfer \ + transfer \ + channel-160 \ + astria1lepnry7tlpzvrukp5xej4v5wp532k2f94vxqnr \ + "10000utia" \ + --fees=420utia \ + --memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \ + --chain-id="mocha-4" \ + --from="$CELESTIA_KEY_NAME" \ + --node=https://rpc-mocha.pops.one:443 \ + --packet-timeout-height 0-0 +``` + +```bash [From Noble] +nobled tx ibc-transfer transfer \ + transfer \ + channel-232 \ + astria1u6ewl0tejz0df2l6tzc7k2degx6mqsjahldqxd \ + "100000uusdc" \ + --memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \ + --chain-id="grand-1" \ + --from="$NOBLE_KEY_NAME" \ + --node=https://noble-testnet-rpc.polkachu.com:443 \ + --packet-timeout-height 0-0 +``` + +::: + + diff --git a/docs/components/_check-flame-balances-testnet.md b/docs/components/_check-flame-balances-testnet.md new file mode 100644 index 00000000..67091283 --- /dev/null +++ b/docs/components/_check-flame-balances-testnet.md @@ -0,0 +1,18 @@ + + +::: code-group + +```bash [TIA] +cast balance $FLAME_ADDRESS --rpc-url https://rpc.flame.dawn-1.astria.org +``` + +```bash [USDC] +cast balance $FLAME_ADDRESS --erc20 0x6e18cE6Ec3Fc7b8E3EcFca4fA35e25F3f6FA879a --rpc-url https://rpc.flame.dawn-1.astria.org +``` + +::: + + diff --git a/docs/components/_withdraw-from-astria-testnet.md b/docs/components/_withdraw-from-astria-testnet.md new file mode 100644 index 00000000..8f45bf2b --- /dev/null +++ b/docs/components/_withdraw-from-astria-testnet.md @@ -0,0 +1,47 @@ + + +::: code-group + +```bash [To Celestia] +astria-cli sequencer ics20-withdrawal \ + --amount 1000 \ + --destination-chain-address=$CELESTIA_ADDRESS \ + --source-channel channel-0 \ + --private-key=$PRIV_KEY \ + --sequencer-url=https://rpc.sequencer.dawn-1.astria.org/ \ + --sequencer.chain-id dawn-1 \ + --asset transfer/channel-0/utia \ + --fee-asset transfer/channel-0/utia +``` + +```bash [To Noble] +astria-cli sequencer ics20-withdrawal \ + --amount 1000 \ + --destination-chain-address=$NOBLE_ADDRESS \ + --source-channel channel-1 \ + --private-key=$PRIV_KEY \ + --sequencer-url=https://rpc.sequencer.dawn-1.astria.org/ \ + --sequencer.chain-id dawn-1 \ + --asset transfer/channel-1/uusdc \ + --fee-asset transfer/channel-0/utia +``` + +```bash [To Stride] +astria-cli sequencer ics20-withdrawal \ + --amount 1000 \ + --destination-chain-address=$STRIDE_ADDRESS \ + --source-channel channel-2 \ + --private-key=$PRIV_KEY \ + --sequencer-url=https://rpc.sequencer.dawn-1.astria.org/ \ + --sequencer.chain-id dawn-1 \ + --asset transfer/channel-3/stutia \ + --fee-asset transfer/channel-0/utia +``` + +::: + +