This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
285 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
bridges/snowbridge/pallets/inbound-queue/fixtures/src/send_call_to_penpal.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com> | ||
// Generated, do not edit! | ||
// See ethereum client README.md for instructions to generate | ||
|
||
use crate::InboundQueueFixture; | ||
use hex_literal::hex; | ||
use snowbridge_beacon_primitives::CompactExecutionHeader; | ||
use snowbridge_core::inbound::{Log, Message, Proof}; | ||
use sp_std::vec; | ||
|
||
pub fn make_send_call_to_penpal_message() -> InboundQueueFixture { | ||
InboundQueueFixture { | ||
execution_header: CompactExecutionHeader{ | ||
parent_hash: hex!("e0fa68ceff08e6f024c84f408540372801b209ff8f11481a9dc6bc5db3ce92d3").into(), | ||
block_number: 831, | ||
state_root: hex!("ccc30635f32d558620d45ead60eabbe70dbf179b475fa9cec5a3791fd5be2b78").into(), | ||
receipts_root: hex!("6bba8f0093461e22cd265bc0de44bf7a596db58ecbf44432e6de8b3490deb077").into(), | ||
}, | ||
message: Message { | ||
event_log: Log { | ||
address: hex!("eda338e4dc46038493b885327842fd3e301cab39").into(), | ||
topics: vec![ | ||
hex!("7153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84f").into(), | ||
hex!("a69fbbae90bb6096d59b1930bbcfc8a3ef23959d226b1861deb7ad8fb06c6fa3").into(), | ||
hex!("c9ad11f6e2d2b770f52e7cbe22ba779eb8e5e000e0db4e5032488898bd3529ec").into(), | ||
], | ||
data: hex!("00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003e00a736aa00000000000290a987b944cb1dcce5564e5fdecd7a54d3de27fe0100902f5009000000000000000000000002688909017d2000071468656c6c6f0000").into(), | ||
}, | ||
proof: Proof { | ||
block_hash: hex!("be15f3cdf217baad8cc5c40d7e2dc1f173ab3bdaa58e5819905bb0c73f46cf78").into(), | ||
tx_index: 0, | ||
data: (vec![ | ||
hex!("6bba8f0093461e22cd265bc0de44bf7a596db58ecbf44432e6de8b3490deb077").to_vec(), | ||
], vec![ | ||
hex!("f90234822080b9022e02f9022a0183016e01b9010000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000200000000000000000020000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000010000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002004000000000000000000000200000000000000f9011ff9011c94eda338e4dc46038493b885327842fd3e301cab39f863a07153f9357c8ea496bba60bf82e67143e27b64462b49041f8e689e1b05728f84fa0a69fbbae90bb6096d59b1930bbcfc8a3ef23959d226b1861deb7ad8fb06c6fa3a0c9ad11f6e2d2b770f52e7cbe22ba779eb8e5e000e0db4e5032488898bd3529ecb8a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003e00a736aa00000000000290a987b944cb1dcce5564e5fdecd7a54d3de27fe0100902f5009000000000000000000000002688909017d2000071468656c6c6f0000").to_vec(), | ||
]), | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com> | ||
// Generated, do not edit! | ||
// See ethereum client README.md for instructions to generate | ||
|
||
use crate::InboundQueueFixture; | ||
use hex_literal::hex; | ||
use snowbridge_beacon_primitives::CompactExecutionHeader; | ||
use snowbridge_core::inbound::{Log, Message, Proof}; | ||
use sp_std::vec; | ||
|
||
pub fn make_send_call_to_penpal_message() -> InboundQueueFixture { | ||
InboundQueueFixture { | ||
execution_header: CompactExecutionHeader{ | ||
parent_hash: hex!("{{InboundMessageTest.ExecutionHeader.ParentHash}}").into(), | ||
block_number: {{InboundMessageTest.ExecutionHeader.BlockNumber}}, | ||
state_root: hex!("{{InboundMessageTest.ExecutionHeader.StateRoot}}").into(), | ||
receipts_root: hex!("{{InboundMessageTest.ExecutionHeader.ReceiptsRoot}}").into(), | ||
}, | ||
message: Message { | ||
event_log: Log { | ||
address: hex!("{{InboundMessageTest.Message.EventLog.Address}}").into(), | ||
topics: vec![ | ||
{{#InboundMessageTest.Message.EventLog.Topics}} | ||
hex!("{{.}}").into(), | ||
{{/InboundMessageTest.Message.EventLog.Topics}} | ||
], | ||
data: hex!("{{InboundMessageTest.Message.EventLog.Data}}").into(), | ||
}, | ||
proof: Proof { | ||
block_hash: hex!("{{InboundMessageTest.Message.Proof.BlockHash}}").into(), | ||
tx_index: {{InboundMessageTest.Message.Proof.TxIndex}}, | ||
data: (vec![ | ||
{{#InboundMessageTest.Message.Proof.Data.Keys}} | ||
hex!("{{.}}").to_vec(), | ||
{{/InboundMessageTest.Message.Proof.Data.Keys}} | ||
], vec![ | ||
{{#InboundMessageTest.Message.Proof.Data.Values}} | ||
hex!("{{.}}").to_vec(), | ||
{{/InboundMessageTest.Message.Proof.Data.Values}} | ||
]), | ||
}, | ||
}, | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
bridges/snowbridge/templates/send_token_to_penpal.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com> | ||
// Generated, do not edit! | ||
// See ethereum client README.md for instructions to generate | ||
|
||
use crate::InboundQueueFixture; | ||
use hex_literal::hex; | ||
use snowbridge_beacon_primitives::CompactExecutionHeader; | ||
use snowbridge_core::inbound::{Log, Message, Proof}; | ||
use sp_std::vec; | ||
|
||
pub fn make_send_token_to_penpal_message() -> InboundQueueFixture { | ||
InboundQueueFixture { | ||
execution_header: CompactExecutionHeader{ | ||
parent_hash: hex!("{{InboundMessageTest.ExecutionHeader.ParentHash}}").into(), | ||
block_number: {{InboundMessageTest.ExecutionHeader.BlockNumber}}, | ||
state_root: hex!("{{InboundMessageTest.ExecutionHeader.StateRoot}}").into(), | ||
receipts_root: hex!("{{InboundMessageTest.ExecutionHeader.ReceiptsRoot}}").into(), | ||
}, | ||
message: Message { | ||
event_log: Log { | ||
address: hex!("{{InboundMessageTest.Message.EventLog.Address}}").into(), | ||
topics: vec![ | ||
{{#InboundMessageTest.Message.EventLog.Topics}} | ||
hex!("{{.}}").into(), | ||
{{/InboundMessageTest.Message.EventLog.Topics}} | ||
], | ||
data: hex!("{{InboundMessageTest.Message.EventLog.Data}}").into(), | ||
}, | ||
proof: Proof { | ||
block_hash: hex!("{{InboundMessageTest.Message.Proof.BlockHash}}").into(), | ||
tx_index: {{InboundMessageTest.Message.Proof.TxIndex}}, | ||
data: (vec![ | ||
{{#InboundMessageTest.Message.Proof.Data.Keys}} | ||
hex!("{{.}}").to_vec(), | ||
{{/InboundMessageTest.Message.Proof.Data.Keys}} | ||
], vec![ | ||
{{#InboundMessageTest.Message.Proof.Data.Values}} | ||
hex!("{{.}}").to_vec(), | ||
{{/InboundMessageTest.Message.Proof.Data.Values}} | ||
]), | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters