diff --git a/smoketest/Cargo.lock b/smoketest/Cargo.lock index e29afd0a74..d5a3d97b6a 100644 --- a/smoketest/Cargo.lock +++ b/smoketest/Cargo.lock @@ -103,6 +103,17 @@ version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -762,6 +773,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "core-foundation" version = "0.9.3" @@ -3919,6 +3936,7 @@ dependencies = [ "thiserror", "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] @@ -4946,6 +4964,30 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "walkdir" version = "2.3.3" diff --git a/smoketest/tests/transfer_token.rs b/smoketest/tests/transfer_token.rs index 32cfef5243..1b3d35fb44 100644 --- a/smoketest/tests/transfer_token.rs +++ b/smoketest/tests/transfer_token.rs @@ -22,6 +22,7 @@ use snowbridge_smoketest::{ v3::{ junction::{Junction, NetworkId}, junctions::Junctions, + junctions::Junctions::Here, multiasset::{AssetId, Fungibility, MultiAsset, MultiAssets}, }, VersionedMultiAssets, VersionedMultiLocation, @@ -59,18 +60,25 @@ async fn transfer_token() { let signer: PairSigner = PairSigner::new(keypair); + let fee: u128 = 1000_800_566_581; let amount: u128 = 1_000_000_000; - let assets = VersionedMultiAssets::V3(MultiAssets(vec![MultiAsset { - id: AssetId::Concrete(MultiLocation { - parents: 2, - interior: Junctions::X3( - Junction::GlobalConsensus(NetworkId::Ethereum { chain_id: 15 }), - Junction::AccountKey20 { network: None, key: GATEWAY_PROXY_CONTRACT.into() }, - Junction::AccountKey20 { network: None, key: WETH_CONTRACT.into() }, - ), - }), - fun: Fungibility::Fungible(amount), - }])); + let assets = VersionedMultiAssets::V3(MultiAssets(vec![ + MultiAsset { + id: AssetId::Concrete(MultiLocation { parents: 1, interior: Here }), + fun: Fungibility::Fungible(fee), + }, + MultiAsset { + id: AssetId::Concrete(MultiLocation { + parents: 2, + interior: Junctions::X3( + Junction::GlobalConsensus(NetworkId::Ethereum { chain_id: 15 }), + Junction::AccountKey20 { network: None, key: GATEWAY_PROXY_CONTRACT.into() }, + Junction::AccountKey20 { network: None, key: WETH_CONTRACT.into() }, + ), + }), + fun: Fungibility::Fungible(amount), + }, + ])); let destination = VersionedMultiLocation::V3(MultiLocation { parents: 2, @@ -100,7 +108,10 @@ async fn transfer_token() { .await .expect("call success"); - println!("bridge_transfer call issued at assethub block hash {:?}", result.block_hash()); + println!( + "reserve_transfer_assets call issued at assethub block hash {:?}", + result.block_hash() + ); let wait_for_blocks = 50; let mut stream = ethereum_client.subscribe_blocks().await.unwrap().take(wait_for_blocks); @@ -120,7 +131,7 @@ async fn transfer_token() { } } if transfer_event_found { - break + break; } } assert!(transfer_event_found);