diff --git a/smoketest/README.md b/smoketest/README.md index 6c5a7619302a0..e9aba49a460bf 100644 --- a/smoketest/README.md +++ b/smoketest/README.md @@ -9,7 +9,9 @@ This is necessary to cover rewards for "execution message" relayers. Messages wi # Bindings -Generate bindings: +First make sure the E2E Stack is running. + +Then run this command: ```shell ./make-bindings.sh diff --git a/smoketest/make-bindings.sh b/smoketest/make-bindings.sh index 35e4279056f1d..323b5d2184d36 100755 --- a/smoketest/make-bindings.sh +++ b/smoketest/make-bindings.sh @@ -4,5 +4,18 @@ set -eu mkdir -p src/contracts -subxt codegen --url http://localhost:11144 | rustfmt --edition 2021 --emit=stdout > src/parachains/bridgehub.rs +subxt_version=v0.27.1 +cargo_dir=".cargo" +export PATH=$PATH:$cargo_dir/bin + +# Install Subxt +command -v subxt || cargo install subxt-cli \ + --git https://github.com/paritytech/subxt.git \ + --tag $subxt_version \ + --root $cargo_dir + +# Fetch metadata from BridgeHUb and generate client +subxt codegen --url ws://localhost:11144 | rustfmt --edition 2021 --emit=stdout > src/parachains/bridgehub.rs + +# Generate Rust bindings for contracts forge bind --module --overwrite --bindings-path src/contracts --root ../core/packages/contracts diff --git a/smoketest/tests/lock_tokens.rs b/smoketest/tests/lock_tokens.rs index 372a393abced9..7721517ca50f5 100644 --- a/smoketest/tests/lock_tokens.rs +++ b/smoketest/tests/lock_tokens.rs @@ -1,5 +1,4 @@ use snowbridge_smoketest::contracts::{native_tokens, weth9}; - use std::{sync::Arc, time::Duration}; use ethers::{ @@ -18,9 +17,9 @@ use xcm::v3::MultiLocation; // contracts are deployed in DeployScript.sol. const ETHEREUM_API: &str = "http://localhost:8545"; const ETHEREUM_KEY: &str = "0x5e002a1af63fd31f1c25258f3082dc889762664cb8f218d86da85dff8b07b342"; -const NATIVE_TOKENS_CONTRACT: &str = "0xB8EA8cB425d85536b158d661da1ef0895Bb92F1D"; -const TOKEN_VAULT_CONTRACT: &str = "0xB1185EDE04202fE62D38F5db72F71e38Ff3E8305"; -const WETH_CONTRACT: &str = "0x3f0839385DB9cBEa8E73AdA6fa0CFe07E321F61d"; +const NATIVE_TOKENS_CONTRACT: &str = "0x8cF6147918A5CBb672703F879f385036f8793a24"; +const TOKEN_VAULT_CONTRACT: &str = "0xB8EA8cB425d85536b158d661da1ef0895Bb92F1D"; +const WETH_CONTRACT: &str = "0x440eDFFA1352B13227e8eE646f3Ea37456deC701"; #[tokio::test] async fn test_lock_tokens() {