Skip to content

Commit

Permalink
update cli testnet bridging sections
Browse files Browse the repository at this point in the history
  • Loading branch information
sambukowski committed Oct 31, 2024
1 parent 2ff268e commit fe6a4b6
Show file tree
Hide file tree
Showing 12 changed files with 270 additions and 168 deletions.
8 changes: 5 additions & 3 deletions docs/bridging/mainnet-alpha/bridge-to-astria-mainnet-alpha.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 5 additions & 3 deletions docs/bridging/mainnet-alpha/bridge-to-flame-mainnet-alpha.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
41 changes: 19 additions & 22 deletions docs/bridging/testnet/bridge-to-astria-testnet.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,34 +17,29 @@ export CELESTIA_KEY_NAME="<name-of-your-celestia-key>"
export CELESTIA_ADDRESS="<your-celestia-address>"
export NOBLE_KEY_NAME="<name-of-your-noble-key>"
export NOBLE_ADDRESS="<your-noble-address>"
export STRIDE_KEY_NAME="<name-of-your-stride-key>"
export STRIDE_ADDRESS="<your-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
```
<!--@include: ../../components/_bridge-to-astria-testnet.md-->

## Check Your Balances on Astria

```bash
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/<your-celestia-address>`
- `https://www.mintscan.io/noble/address/<your-noble-address>`
- `https://www.mintscan.io/stride/address/<your-stride-address>`

You can view your transactions by visiting
`https://www.mintscan.io/noble-testnet/address/<your-celestia-address>` or
`https://www.mintscan.io/noble-testnet/address/<your-noble-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.
85 changes: 19 additions & 66 deletions docs/bridging/testnet/bridge-to-flame-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,82 +20,35 @@ export FLAME_ADDRESS="<your-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
<!--@include: ../../components/_bridge-to-flame-via-ibc-testnet.md-->

```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
```
<!--@include: ../../components/_bridge-to-flame-via-astria-testnet.md-->

## Check Your Balances on Flame

### TIA
<!--@include: ../../components/_check-flame-balances-testnet.md-->

```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

<!-- TODO: verify correct address -->
```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/<your-celestia-address>`
- `https://www.mintscan.io/noble-testnet/address/<your-noble-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.
51 changes: 22 additions & 29 deletions docs/bridging/testnet/withdraw-from-astria-testnet.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!-- markdownlint-disable MD051 -->

# 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.
Expand All @@ -17,43 +19,34 @@ export CELESTIA_KEY_NAME="<name-of-your-celestia-key>"
export CELESTIA_ADDRESS="<your-celestia-address>"
export NOBLE_KEY_NAME="<name-of-your-noble-key>"
export NOBLE_ADDRESS="<your-noble-address>"
export STRIDE_KEY_NAME="<name-of-your-stride-key>"
export STRIDE_ADDRESS="<your-stride-address>"
```

## Withdraw from Astria

### Astria to Celestia
<!--@include: ../../components/_withdraw-from-astria-testnet.md-->

```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/<your-astria-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/<your-celestia-address>`
- `https://www.mintscan.io/noble/address/<your-noble-address>`
- `https://www.mintscan.io/stride/address/<your-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

```
<!--@include: ../../components/_check-testnet-balances.md-->
54 changes: 12 additions & 42 deletions docs/bridging/testnet/withdraw-from-flame-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
<!--@include: ../../components/_check-testnet-balances.md-->
Loading

0 comments on commit fe6a4b6

Please sign in to comment.