Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Vincent/fix smoketests (paritytech#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes authored Jun 21, 2023
1 parent 001cdc8 commit eba4c95
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion smoketest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion smoketest/make-bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions smoketest/tests/lock_tokens.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use snowbridge_smoketest::contracts::{native_tokens, weth9};

use std::{sync::Arc, time::Duration};

use ethers::{
Expand All @@ -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() {
Expand Down

0 comments on commit eba4c95

Please sign in to comment.