Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed Aug 4, 2024
1 parent cd31da3 commit d29ee41
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: celestia-local
labels:
Expand Down
3 changes: 1 addition & 2 deletions charts/deploy.just
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ delete-sequencer name=validatorName:
delete-sequencers: (delete-sequencer "node0") (delete-sequencer "node1") (delete-sequencer "node2")

wait-for-sequencer:
kubectl wait -n astria-dev-cluster deployment celestia-local --for=condition=Available=True --timeout=600s
kubectl rollout status --watch statefulset/celestia-local -n astria-dev-cluster --timeout=600s
kubectl rollout status --watch statefulset/sequencer -n astria-dev-cluster --timeout=600s

deploy-rollup: deploy-dev-rollup wait-for-rollup
Expand Down Expand Up @@ -238,7 +238,6 @@ init-ibc-bridge privateKey asset feeAsset rollupName=defaultRollupName:
--fee-asset {{ feeAsset }} \
--asset {{ asset }}


eth_rpc_url := "http://executor.astria.localdev.me/"
eth_ws_url := "ws://ws-executor.astria.localdev.me/"
bridge_tx_bytes := "0xf8f280843c54e7f182898594a58639fb5458e65e4fa917ff951c390292c24a15880de0b6b3a7640000b884bab916d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d617374726961313777306164656736346b7930646178776432756779756e65656c6c6d6a676e786c333935303400000000000000000000000000000000000000820a96a086b85348c9816f6d34533669db3d3626cf55eecea6a380d4d072efb1839df443a04b8b60c8b91dd30add1ca4a96097238d73bab29b0a958322d9a51755d5a5f287"
Expand Down
31 changes: 9 additions & 22 deletions charts/ibc-test.just
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,16 @@ delete:
kubectl wait -n astria-dev-cluster deployment hermes-local-chart --for=condition=Available=True --timeout=300s

[no-cd]
run celestiaHome pathToCelestiaAppd=default_celestia_appd :
run:
#!/usr/bin/env bash
initial_balance=$(just evm-get-balance {{evm_destination_address}})

# Create a bridge account on the sequencer
just init-ibc-bridge {{ sequencer_tia_bridge_pkey }} transfer/channel-0/utia nria

# Load the private key of the Celestia dev account to issue transfers
just ibc-test _load-celestia-key "{{ celestiaHome}}" "{{ pathToCelestiaAppd }}"

# Execute the transfer from Celestia to the Rollup
just ibc-test _do-ibc-transfer "{{ celestiaHome}}" "{{ pathToCelestiaAppd }}"
just ibc-test _do-ibc-transfer

# Multiplication factor is 10^-6 (utia to tia) * 10^18 (rollup factor) = 10^12
let expected_balance="$initial_balance + {{ transfer_amount }} * 10**12"
Expand All @@ -68,8 +65,6 @@ run celestiaHome pathToCelestiaAppd=default_celestia_appd :

bridge_address := "astria1d7zjjljc0dsmxa545xkpwxym86g8uvvwhtezcr"
celestia_dev_account_address := "celestia1m0ksdjl2p5nzhqy3p47fksv52at3ln885xvl96"
celestia_dev_account_key_name := "dev"
celestia_dev_account_mnemonic := "enrich avocado local net will avoid dizzy truth column excuse ready lesson"
celestia_chain_id := "celestia-local-0"
celestia_node_url := "http://rpc.app.celestia.localdev.me:80"
sequencer_tia_bridge_pkey := "6015fbe1c365d3c5ef92dc891db8c5bb26ad454bec2db4762b96e9f8b2430285"
Expand All @@ -82,30 +77,22 @@ evm_destination_address := "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
transfer_amount := "53000"
transfer_fees := "26000"

default_celestia_appd := "celestia-appd"
[no-cd]
_load-celestia-key celestiaHome pathToCelestiaAppd=default_celestia_appd:
#!/usr/bin/env bash
pwd
"{{pathToCelestiaAppd}}" keys add {{ celestia_dev_account_key_name }} \
--home "{{celestiaHome}}" \
--keyring-backend="{{ keyring_backend }}" \
--recover <<< "{{ celestia_dev_account_mnemonic }}"
# TODO: move this to deploy.just so that defaultNamespace need not be redefined
defaultNamespace := "astria-dev-cluster"
[no-cd]
_do-ibc-transfer celestiaHome pathToCelestiaAppd=default_celestia_appd:
_do-ibc-transfer namespace=defaultNamespace:
echo "Performing IBC transfer..."
"{{pathToCelestiaAppd}}" tx ibc-transfer transfer \
kubectl exec -n {{ namespace }} pods/celestia-local-0 celestia-app -- /bin/bash -c \
'celestia-appd tx ibc-transfer transfer \
transfer \
channel-0 \
{{ bridge_address }} \
"{{ transfer_amount }}utia" \
--memo="{\"rollupDepositAddress\":\"{{ evm_destination_address }}\"}" \
--chain-id="{{ celestia_chain_id }}" \
--node="{{ celestia_node_url }}" \
--from="{{ celestia_dev_account_address }}" \
--fees="{{ transfer_fees }}utia" \
--yes \
--log_level=debug \
--home "{{celestiaHome}}" \
--keyring-backend="{{ keyring_backend }}"
--home /home/celestia \
--keyring-backend="{{ keyring_backend }}"'

0 comments on commit d29ee41

Please sign in to comment.