Skip to content

Commit

Permalink
update cli bridging devnet sections
Browse files Browse the repository at this point in the history
  • Loading branch information
sambukowski committed Oct 31, 2024
1 parent fe6a4b6 commit b6ca636
Show file tree
Hide file tree
Showing 11 changed files with 198 additions and 148 deletions.
30 changes: 11 additions & 19 deletions docs/bridging/devnet/bridge-to-astria-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,22 @@ export NOBLE_ADDRESS="<your-noble-address>"

## Bridge to Astria

### From Celestia

```bash
celestia-appd tx ibc-transfer transfer transfer channel-159 $ASTRIA_ADDRESS 1000000utia --fees=420utia --from $CELESTIA_KEY_NAME --node=https://rpc-mocha.pops.one:443 --chain-id mocha-4
```

### From Noble

```bash
nobled tx ibc-transfer transfer transfer channel-231 $ASTRIA_ADDRESS 1000000uusdc --from $NOBLE_KEY_NAME --node https://noble-testnet-rpc.polkachu.com:443 --chain-id grand-1
```
<!--@include: ../../components/_bridge-to-astria-devnet.md-->

## Check Your Balances on Astria

```bash
astria-cli sequencer balance get $ASTRIA_ADDRESS --sequencer-url https://rpc.sequencer.dusk-11.devnet.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-testnet/address/<your-celestia-address>`
- `https://www.mintscan.io/noble-testnet/address/<your-noble-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.
75 changes: 19 additions & 56 deletions docs/bridging/devnet/bridge-to-flame-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bridging commands from Celestia and Noble testnets to the Astria `dusk` devnet.

You will need the `astria-cli`, `celestia-appd`, and `nobled` installed. Follow
You will need the `astria-cli` and `nobled` installed. Follow
the install steps [here](./overview.md#bridging-dependencies).

You can export the following to make the commands below easily copy and
Expand All @@ -11,82 +11,45 @@ pastable.
```bash
export ASTRIA_ADDRESS="<your-astria-address>"
export PRIV_KEY="<your-astria-address-private-key>"
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 FLAME_ADDRESS="<your-flame-address>"
```

## Bridge to Flame on `dusk` Devnet

### From Celestia

::: tip
There is no $TIA `BridgeLockAccount` configured for `dusk-11`.
:::

### From Noble
### Via IBC

```bash
nobled tx ibc-transfer transfer \
transfer \
channel-231 \
astria12saluecm8dd7hkutk83eavkl2p70lf5w7txezg \
"100000uusdc" \
--memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \
--chain-id="grand-1" \
--from="grand-test-1" \
--node=https://noble-testnet-rpc.polkachu.com:443
--packet-timeout-height 0-0
```
<!--@include: ../../components/_bridge-to-flame-via-ibc-devnet.md-->

### nRIA from Astria
### Direct from Astria

```bash
astria-cli sequencer bridge-lock astria1yqdjnnmrp7w5ygwj0dkldsgzjhv5vcakp7yeu9 \
--amount 10000 \
--destination-chain-address $FLAME_ADDRESS \
--private-key $PRIV_KEY \
--sequencer.chain-id astria-dusk-11 \
--sequencer-url https://rpc.sequencer.dusk-11.devnet.astria.org \
--fee-asset=nria --asset=nria
```

### USDC from Astria

```bash
astria-cli sequencer bridge-lock astria12saluecm8dd7hkutk83eavkl2p70lf5w7txezg \
--amount 10000 \
--destination-chain-address $FLAME_ADDRESS \
--private-key $PRIV_KEY \
--sequencer.chain-id astria-dusk-11 \
--sequencer-url https://rpc.sequencer.dusk-11.devnet.astria.org \
--fee-asset=nria --asset=transfer/channel-2/uusdc
```
<!--@include: ../../components/_bridge-to-flame-via-astria-devnet.md-->

## Check Your Balances on Flame

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

```bash
cast balance $FLAME_ADDRESS --rpc-url https://rpc.flame.dusk-11.devnet.astria.org

```
## View Your Transactions on Flame

### USDC
Open the [Flame `dusk` Block Explorer](https://explorer.evm.dusk-11.devnet.astria.org)
and search for your Flame address to see your transactions.

<!-- TODO: verify correct address -->
```bash
cast balance $FLAME_ADDRESS --erc20 0x6e18cE6Ec3Fc7b8E3EcFca4fA35e25F3f6FA879a --rpc-url https://rpc.flame.dusk-11.devnet.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.dusk-11.devnet.astria.org) and search for your
Flame address to see your transactions.
- `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.
38 changes: 13 additions & 25 deletions docs/bridging/devnet/withdraw-from-astria-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,27 @@ export NOBLE_ADDRESS="<your-noble-address>"

## Withdraw from Astria

### Astria to Celestia
<!--@include: ../../components/_withdraw-from-astria-devnet.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.dusk-11.devnet.astria.org --sequencer.chain-id astria-dusk-11 --asset transfer/channel-0/utia --fee-asset nria
```

### Astria to Noble

```bash
astria-cli sequencer ics20-withdrawal --amount 1000 --destination-chain-address=$NOBLE_ADDRESS --source-channel channel-2 --private-key=$PRIV_KEY --sequencer-url=https://rpc.sequencer.dusk-11.devnet.astria.org --sequencer.chain-id astria-dusk-11 --asset transfer/channel-2/uusdc --fee-asset nria
```

### View Transactions on [Astrotrek](https://dusk.astrotrek.io/)
## View Transactions on [Astrotrek](https://dusk.astrotrek.io/)

Go to `https://dusk.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://dusk.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-testnet/address/<your-celestia-address>`
- `https://www.mintscan.io/noble-testnet/address/<your-noble-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 Devnet Balances

```bash
nobled query bank balances $NOBLE_ADDRESS --node https://noble-testnet-rpc.polkachu.com:443

```
<!--@include: ../../components/_check-devnet-balances.md-->
52 changes: 10 additions & 42 deletions docs/bridging/devnet/withdraw-from-flame-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,66 +61,34 @@ export RPC_URL="https://rpc.evm.dusk-11.devnet.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 **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 **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-devnet-balances.md-->
5 changes: 2 additions & 3 deletions docs/bridging/testnet/bridge-to-astria-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ astria-cli sequencer balance get $ASTRIA_ADDRESS --sequencer-url https://rpc.seq

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>`
- `https://www.mintscan.io/celestia-testnet/address/<your-celestia-address>`
- `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
Expand Down
5 changes: 2 additions & 3 deletions docs/bridging/testnet/withdraw-from-astria-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ hash directly in [Astrotrek](https://dawn.astrotrek.io/).
If you bridge out to an IBC chain, 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>`
- `https://www.mintscan.io/celestia-testnet/address/<your-celestia-address>`
- `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
Expand Down
35 changes: 35 additions & 0 deletions docs/components/_bridge-to-astria-devnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- markdownlint-disable MD041 MD013 -->

::: code-group

```bash [From Celestia]
celestia-appd tx ibc-transfer transfer \
transfer \
channel-159 \
$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-231 \
$ASTRIA_ADDRESS \
1000000uusdc \
--from $NOBLE_KEY_NAME \
--node https://noble-testnet-rpc.polkachu.com:443 \
--chain-id grand-1 \
--packet-timeout-height 0-0
```

:::

<!-- <Tabs>
<TabItem value="From Celestia" label="From Celestia"> </TabItem>
<TabItem value="From Noble" label="From Noble"> </TabItem>
</Tabs> -->
32 changes: 32 additions & 0 deletions docs/components/_bridge-to-flame-via-astria-devnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- markdownlint-disable MD041 MD013 -->

::: code-group

```bash [RIA]
astria-cli sequencer bridge-lock astria1yqdjnnmrp7w5ygwj0dkldsgzjhv5vcakp7yeu9 \
--amount 10000 \
--destination-chain-address $FLAME_ADDRESS \
--private-key $PRIV_KEY \
--sequencer.chain-id astria-dusk-11 \
--sequencer-url https://rpc.sequencer.dusk-11.devnet.astria.org \
--fee-asset=nria \
--asset=nria
```

```bash [USDC]
astria-cli sequencer bridge-lock astria12saluecm8dd7hkutk83eavkl2p70lf5w7txezg \
--amount 10000 \
--destination-chain-address $FLAME_ADDRESS \
--private-key $PRIV_KEY \
--sequencer.chain-id astria-dusk-11 \
--sequencer-url https://rpc.sequencer.dusk-11.devnet.astria.org \
--fee-asset=nria \
--asset=transfer/channel-2/uusdc
```

:::

<!-- <Tabs>
<TabItem value="RIA" label="RIA"> </TabItem>
<TabItem value="USDC" label="USDC"> </TabItem>
</Tabs> -->
22 changes: 22 additions & 0 deletions docs/components/_bridge-to-flame-via-ibc-devnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- markdownlint-disable MD041 MD013 -->

::: code-group

```bash [From Noble]
nobled tx ibc-transfer transfer \
transfer \
channel-231 \
astria12saluecm8dd7hkutk83eavkl2p70lf5w7txezg \
"100000uusdc" \
--memo="{\"rollupDepositAddress\":\"$FLAME_ADDRESS\"}" \
--chain-id="grand-1" \
--from="grand-test-1" \
--node=https://noble-testnet-rpc.polkachu.com:443
--packet-timeout-height 0-0
```

:::

<!-- <Tabs>
<TabItem value="From Noble" label="From Noble"> </TabItem>
</Tabs> -->
Loading

0 comments on commit b6ca636

Please sign in to comment.