mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
BridgeHubRococo/Wococo nits + updated subtree (#2572)
* Nits (merge before separatelly) * Small cosmetics for Rococo/Wococo bridge local run * Squashed 'bridges/' changes from 04b3dda6aa..5fc377ab34 5fc377ab34 Support for kusama-polkadot relaying (#2128) 01f4b7f1ba Fix clippy warnings (#2127) 696ff1c368 BHK/P alignments (#2115) 2a66aa3248 Small fixes (#2126) 7810f1a988 Cosmetics (#2124) daf250f69c Remove some `expect()` statements (#2123) 1c5fba8274 temporarily remove balance guard (#2121) 3d0e547361 Propagate message receival confirmation errors (#2116) 1c33143f07 Propagate message verification errors (#2114) b075b00910 Bump time from 0.3.20 to 0.3.21 51a3a51618 Bump serde from 1.0.160 to 1.0.162 da88d044a6 Bump clap from 4.2.5 to 4.2.7 cdca322cd6 Bump sysinfo from 0.28.4 to 0.29.0 git-subtree-dir: bridges git-subtree-split: 5fc377ab34f7dfd3293099c5feec49255e827812 * Fix * Allow to change storage constants (DeliveryReward, RequiredStakeForStakeAndSlash) + tests * Clippy * New SA for RO/WO * Squashed 'bridges/' changes from 5fc377ab34..0f6091d481 0f6091d481 Bump polkadot/substrate (#2134) 9233f0a337 Bump tokio from 1.28.0 to 1.28.1 a29c1caa93 Bump serde from 1.0.162 to 1.0.163 git-subtree-dir: bridges git-subtree-split: 0f6091d48184ebb4f75cb3089befa6b92cf37335
This commit is contained in:
@@ -377,10 +377,12 @@ function transfer_asset_via_bridge() {
|
||||
local url=$1
|
||||
local seed=$2
|
||||
local target_account=$3
|
||||
local target_global_consensus=$4
|
||||
echo " calling transfer_asset_via_bridge:"
|
||||
echo " url: ${url}"
|
||||
echo " seed: ${seed}"
|
||||
echo " target_account: ${target_account}"
|
||||
echo " target_global_consensus: ${target_global_consensus}"
|
||||
echo " params:"
|
||||
|
||||
local assets=$(jq --null-input \
|
||||
@@ -408,6 +410,7 @@ function transfer_asset_via_bridge() {
|
||||
local hex_encoded_data=$(cat $tmp_output_file)
|
||||
|
||||
local destination=$(jq --null-input \
|
||||
--arg target_global_consensus "$target_global_consensus" \
|
||||
--argjson hex_encoded_data "$hex_encoded_data" \
|
||||
'
|
||||
{
|
||||
@@ -416,7 +419,7 @@ function transfer_asset_via_bridge() {
|
||||
"interior": {
|
||||
"X3": [
|
||||
{
|
||||
"GlobalConsensus": "Wococo"
|
||||
"GlobalConsensus": $target_global_consensus
|
||||
},
|
||||
{
|
||||
"Parachain": 1000
|
||||
@@ -454,10 +457,12 @@ function ping_via_bridge() {
|
||||
local url=$1
|
||||
local seed=$2
|
||||
local target_account=$3
|
||||
local target_global_consensus=$4
|
||||
echo " calling ping_via_bridge:"
|
||||
echo " url: ${url}"
|
||||
echo " seed: ${seed}"
|
||||
echo " target_account: ${target_account}"
|
||||
echo " target_global_consensus: ${target_global_consensus}"
|
||||
echo " params:"
|
||||
|
||||
local tmp_output_file=$(mktemp)
|
||||
@@ -465,6 +470,7 @@ function ping_via_bridge() {
|
||||
local hex_encoded_data=$(cat $tmp_output_file)
|
||||
|
||||
local destination=$(jq --null-input \
|
||||
--arg target_global_consensus "$target_global_consensus" \
|
||||
--argjson hex_encoded_data "$hex_encoded_data" \
|
||||
'
|
||||
{
|
||||
@@ -473,7 +479,7 @@ function ping_via_bridge() {
|
||||
"interior": {
|
||||
"X3": [
|
||||
{
|
||||
"GlobalConsensus": "Wococo"
|
||||
"GlobalConsensus": $target_global_consensus
|
||||
},
|
||||
{
|
||||
"Parachain": 1000
|
||||
@@ -591,12 +597,19 @@ case "$1" in
|
||||
1014 \
|
||||
"Rococo" \
|
||||
1000
|
||||
# drip SovereignAccount for `MultiLocation { parents: 2, interior: X2(GlobalConsensus(Rococo), Parachain(1000)) }` => 5DHZvp523gmJWxg9UcLVbofyu5nZkPvATeP1ciYncpFpXtiG
|
||||
# drip SovereignAccount for `MultiLocation { parents: 2, interior: X2(GlobalConsensus(Rococo), Parachain(1015)) }` => 5FS75NFUdEYhWHuV3y3ncjSG4PFdHfC5X7V6SEzc3rnCciwb
|
||||
# drip SovereignAccount for `MultiLocation { parents: 2, interior: X2(GlobalConsensus(Rococo), Parachain(1000)) }` => 5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ
|
||||
#
|
||||
# use sp_core::crypto::Ss58Codec;
|
||||
# println!("{}",
|
||||
# frame_support::sp_runtime::AccountId32::new(
|
||||
# GlobalConsensusParachainConvertsFor::<UniversalLocation, [u8; 32]>::convert_ref(
|
||||
# MultiLocation { parents: 2, interior: X2(GlobalConsensus(Kusama), Parachain(1000)) }).unwrap()
|
||||
# ).to_ss58check_with_version(42_u16.into())
|
||||
# );
|
||||
transfer_balance \
|
||||
"ws://127.0.0.1:9010" \
|
||||
"//Alice" \
|
||||
"5DHZvp523gmJWxg9UcLVbofyu5nZkPvATeP1ciYncpFpXtiG" \
|
||||
"5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ" \
|
||||
$((1000000000 + 50000000000 * 20)) # ExistentialDeposit + maxTargetLocationFee * 20
|
||||
# create foreign assets for native Statemine token (yes, Kusama, because we are using Statemine runtime on rococo)
|
||||
force_create_foreign_asset \
|
||||
@@ -605,7 +618,7 @@ case "$1" in
|
||||
1000 \
|
||||
"ws://127.0.0.1:9010" \
|
||||
"Kusama" \
|
||||
"5DHZvp523gmJWxg9UcLVbofyu5nZkPvATeP1ciYncpFpXtiG"
|
||||
"5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ"
|
||||
;;
|
||||
remove-assets-transfer-from-statemine-local)
|
||||
ensure_polkadot_js_api
|
||||
@@ -621,40 +634,47 @@ case "$1" in
|
||||
transfer_asset_via_bridge \
|
||||
"ws://127.0.0.1:9910" \
|
||||
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL"
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL" \
|
||||
"Wococo"
|
||||
;;
|
||||
transfer-asset-from-statemine-rococo)
|
||||
ensure_polkadot_js_api
|
||||
transfer_asset_via_bridge \
|
||||
"wss://ws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io" \
|
||||
"$ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO" \
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO"
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO" \
|
||||
"Wococo"
|
||||
;;
|
||||
ping-via-bridge-from-statemine-local)
|
||||
ensure_polkadot_js_api
|
||||
ping_via_bridge \
|
||||
"ws://127.0.0.1:9910" \
|
||||
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL"
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL" \
|
||||
"Wococo"
|
||||
;;
|
||||
ping-via-bridge-from-statemine-rococo)
|
||||
ensure_polkadot_js_api
|
||||
ping_via_bridge \
|
||||
"wss://ws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io" \
|
||||
"${ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO}" \
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO"
|
||||
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO" \
|
||||
"Wococo"
|
||||
;;
|
||||
drip)
|
||||
transfer_balance \
|
||||
"ws://127.0.0.1:9010" \
|
||||
"//Alice" \
|
||||
"5DHZvp523gmJWxg9UcLVbofyu5nZkPvATeP1ciYncpFpXtiG" \
|
||||
"5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ" \
|
||||
$((1000000000 + 50000000000 * 20))
|
||||
;;
|
||||
stop)
|
||||
pkill -f polkadot
|
||||
pkill -f parachain
|
||||
;;
|
||||
import)
|
||||
# to avoid trigger anything here
|
||||
;;
|
||||
*)
|
||||
echo "A command is require. Supported commands for:
|
||||
Local (zombienet) run:
|
||||
|
||||
Reference in New Issue
Block a user