Skip to content

Commit

Permalink
Set gateway on start-up (#1054)
Browse files Browse the repository at this point in the history
* Set gateway on start-up

* fix e2e tests

* update polkadot-sdk

* update polkadot-sdk
  • Loading branch information
alistair-singh authored Dec 16, 2023
1 parent de51fe7 commit f7f06d2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
6 changes: 3 additions & 3 deletions parachain/pallets/inbound-queue/src/benchmarking/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use snowbridge_core::inbound::{Log, Message, Proof};
use sp_std::vec;

pub struct InboundQueueTest {
pub execution_header: CompactExecutionHeader,
pub message: Message,
pub execution_header: CompactExecutionHeader,
pub message: Message,
}

pub fn make_create_message() -> InboundQueueTest {
InboundQueueTest{
InboundQueueTest{
execution_header: CompactExecutionHeader{
parent_hash: hex!("b5608f0af7c3b6fe5c593772fc25436b8d6549eb236adb0855c6ad33e0004e04").into(),
block_number: 115,
Expand Down
1 change: 1 addition & 0 deletions smoketest/tests/send_token_to_penpal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ async fn send_token_to_penpal() {
weth.address(),
PENPAL_PARA_ID,
i_gateway::MultiAddress { kind: 1, data: FERDIE.into() },
4_000_000_000,
amount,
)
.value(1000)
Expand Down
10 changes: 10 additions & 0 deletions web/packages/test/scripts/configure-bridgehub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ open_hrmp_channels()
open_hrmp_channel "${relaychain_ws_url}" "${relaychain_sudo_seed}" 2000 1000 8 512 # Assethub -> Penpal
}

set_gateway()
{
echo "Setting gateway contract"
local storage_key=$(echo $GATEWAY_STORAGE_KEY | cut -c3-)
local gateway=$(echo $GATEWAY_PROXY_CONTRACT | cut -c3-)
local transact_call="0x00040440"$storage_key"50"$gateway
send_governance_transact_from_relaychain $BRIDGE_HUB_PARAID "$transact_call"
}

configure_bridgehub() {
set_gateway
fund_accounts
wait_beacon_chain_ready
config_beacon_checkpoint
Expand Down
1 change: 1 addition & 0 deletions web/packages/test/scripts/set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export REMOTE_REWARD="${REMOTE_REWARD:-1000000000000000}"
## Vault
export BRIDGE_HUB_INITIAL_DEPOSIT="${ETH_BRIDGE_HUB_INITIAL_DEPOSIT:-10000000000000000000}"

export GATEWAY_STORAGE_KEY="${GATEWAY_STORAGE_KEY:-0xaed97c7854d601808b98ae43079dafb3}"
export GATEWAY_PROXY_CONTRACT="${GATEWAY_PROXY_CONTRACT:-0xEDa338E4dC46038493b885327842fD3E301CaB39}"

address_for() {
Expand Down

0 comments on commit f7f06d2

Please sign in to comment.