Skip to content

Commit c9f9b4b

Browse files
svyatonikbkontur
andauthored
Fix bridges scripts to test Rococo <> Westend bridge locally (#2752)
I think I broke it in #2139 - fees has increased and amounts that we send are no longer enough to cover fees. Also changed a consts (test + 33%) using latest weights. --------- Co-authored-by: Branislav Kontur <[email protected]>
1 parent 421af26 commit c9f9b4b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

bridges/primitives/chain-bridge-hub-rococo/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ frame_support::parameter_types! {
8686
/// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Rococo
8787
/// BridgeHub.
8888
/// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`)
89-
pub const BridgeHubRococoBaseXcmFeeInRocs: u128 = 1628875538;
89+
pub const BridgeHubRococoBaseXcmFeeInRocs: u128 = 1_640_102_205;
9090

9191
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single inbound message.
9292
/// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`)
93-
pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 6417262881;
93+
pub const BridgeHubRococoBaseDeliveryFeeInRocs: u128 = 5_651_581_649;
9494

9595
/// Transaction fee that is paid at the Rococo BridgeHub for delivering single outbound message confirmation.
9696
/// (initially was calculated by test `BridgeHubRococo::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`)
97-
pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 6159996668;
97+
pub const BridgeHubRococoBaseConfirmationFeeInRocs: u128 = 4_045_736_577;
9898
}

bridges/primitives/chain-bridge-hub-westend/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ frame_support::parameter_types! {
7878
/// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Westend
7979
/// BridgeHub.
8080
/// (initially was calculated by test `BridgeHubWestend::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`)
81-
pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 488662666666;
81+
pub const BridgeHubWestendBaseXcmFeeInWnds: u128 = 492_077_333_333;
8282

8383
/// Transaction fee that is paid at the Westend BridgeHub for delivering single inbound message.
8484
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`)
85-
pub const BridgeHubWestendBaseDeliveryFeeInWnds: u128 = 1925196628010;
85+
pub const BridgeHubWestendBaseDeliveryFeeInWnds: u128 = 1_695_489_961_344;
8686

8787
/// Transaction fee that is paid at the Westend BridgeHub for delivering single outbound message confirmation.
8888
/// (initially was calculated by test `BridgeHubWestend::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`)
89-
pub const BridgeHubWestendBaseConfirmationFeeInWnds: u128 = 1848016628010;
89+
pub const BridgeHubWestendBaseConfirmationFeeInWnds: u128 = 1_618_309_961_344;
9090
}

cumulus/scripts/bridges_rococo_westend.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ case "$1" in
326326
"//Alice" \
327327
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
328328
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
329-
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 200000000000 } } ] }')" \
329+
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 5000000000000 } } ] }')" \
330330
0 \
331331
"Unlimited"
332332
;;
@@ -338,7 +338,7 @@ case "$1" in
338338
"//Alice" \
339339
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Westend" }, { "Parachain": 1000 } ] } } }')" \
340340
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
341-
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } } }, "fun": { "Fungible": 40000000000 } } ] }')" \
341+
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Westend" } } } }, "fun": { "Fungible": 3000000000000 } } ] }')" \
342342
0 \
343343
"Unlimited"
344344
;;
@@ -350,7 +350,7 @@ case "$1" in
350350
"//Alice" \
351351
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
352352
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
353-
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 150000000000 } } ] }')" \
353+
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": 5000000000000 } } ] }')" \
354354
0 \
355355
"Unlimited"
356356
;;
@@ -362,7 +362,7 @@ case "$1" in
362362
"//Alice" \
363363
"$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Rococo" }, { "Parachain": 1000 } ] } } }')" \
364364
"$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \
365-
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } } }, "fun": { "Fungible": 100000000000 } } ] }')" \
365+
"$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Rococo" } } } }, "fun": { "Fungible": 3000000000000 } } ] }')" \
366366
0 \
367367
"Unlimited"
368368
;;

0 commit comments

Comments
 (0)