mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +00:00
Add two new zombienet tests for bridges (manual run) (#3072)
extracted useful code from #2982 This PR: - adds test 2 for Rococo <> Westend bridge: checks that relayer doesn't submit any extra headers while there are no any messages; - adds test 3 for Rococo <> Westend bridge: checks that relayer doesn't submit any extra headers when there are messages; - fixes most of comments from #2439 (like: log names, ability to run specify test number when calling `run-tests.sh`). Right now of all our tests, only test 2 is working (until BHs will be upgraded to use async backing), so you can test it with `./bridges/zombienet/run-tests.sh --test 2` locally.
This commit is contained in:
committed by
GitHub
parent
008e0fe45e
commit
2e6067d768
@@ -48,6 +48,14 @@ function ensure_polkadot_js_api() {
|
||||
fi
|
||||
}
|
||||
|
||||
function call_polkadot_js_api() {
|
||||
# --noWait: without that argument `polkadot-js-api` waits until transaction is included into the block.
|
||||
# With it, it just submits it to the tx pool and exits.
|
||||
# --nonce -1: means to compute transaction nonce using `system_accountNextIndex` RPC, which includes all
|
||||
# transaction that are in the tx pool.
|
||||
polkadot-js-api --noWait --nonce -1 "$@"
|
||||
}
|
||||
|
||||
function generate_hex_encoded_call_data() {
|
||||
local type=$1
|
||||
local endpoint=$2
|
||||
@@ -80,7 +88,7 @@ function transfer_balance() {
|
||||
echo " amount: ${amount}"
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
polkadot-js-api \
|
||||
call_polkadot_js_api \
|
||||
--ws "${runtime_para_endpoint}" \
|
||||
--seed "${seed?}" \
|
||||
tx.balances.transferAllowDeath \
|
||||
@@ -145,7 +153,7 @@ function send_governance_transact() {
|
||||
echo ""
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
polkadot-js-api \
|
||||
call_polkadot_js_api \
|
||||
--ws "${relay_url?}" \
|
||||
--seed "${relay_chain_seed?}" \
|
||||
--sudo \
|
||||
@@ -170,7 +178,7 @@ function open_hrmp_channels() {
|
||||
echo " max_message_size: ${max_message_size}"
|
||||
echo " params:"
|
||||
echo "--------------------------------------------------"
|
||||
polkadot-js-api \
|
||||
call_polkadot_js_api \
|
||||
--ws "${relay_url?}" \
|
||||
--seed "${relay_chain_seed?}" \
|
||||
--sudo \
|
||||
@@ -254,7 +262,7 @@ function limited_reserve_transfer_assets() {
|
||||
echo ""
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
polkadot-js-api \
|
||||
call_polkadot_js_api \
|
||||
--ws "${url?}" \
|
||||
--seed "${seed?}" \
|
||||
tx.polkadotXcm.limitedReserveTransferAssets \
|
||||
@@ -293,7 +301,7 @@ function claim_rewards() {
|
||||
echo "${rewards_account_params}"
|
||||
echo "--------------------------------------------------"
|
||||
|
||||
polkadot-js-api \
|
||||
call_polkadot_js_api \
|
||||
--ws "${runtime_para_endpoint}" \
|
||||
--seed "${seed?}" \
|
||||
tx.bridgeRelayers.claimRewards \
|
||||
|
||||
Reference in New Issue
Block a user