mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Adds Snowbridge to Rococo runtime (#2522)
# Description Adds Snowbridge to the Rococo bridge hub runtime. Includes config changes required in Rococo asset hub. --------- Co-authored-by: Alistair Singh <alistair.singh7@gmail.com> Co-authored-by: ron <yrong1997@gmail.com> Co-authored-by: Vincent Geddes <vincent.geddes@hey.com> Co-authored-by: claravanstaden <Cats 4 life!>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
[package]
|
||||
name = "snowbridge-outbound-queue-runtime-api"
|
||||
description = "Snowbridge Outbound Queue Runtime API"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Snowfork <contact@snowfork.com>"]
|
||||
repository = "https://github.com/Snowfork/snowbridge"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { version = "3.1.5", package = "parity-scale-codec", features = ["derive"], default-features = false }
|
||||
sp-core = { path = "../../../../../../substrate/primitives/core", default-features = false }
|
||||
sp-std = { path = "../../../../../../substrate/primitives/std", default-features = false }
|
||||
sp-api = { path = "../../../../../../substrate/primitives/api", default-features = false }
|
||||
frame-support = { path = "../../../../../../substrate/frame/support", default-features = false }
|
||||
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false }
|
||||
snowbridge-outbound-queue-merkle-tree = { path = "../merkle-tree", default-features = false }
|
||||
snowbridge-core = { path = "../../../primitives/core", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame-support/std",
|
||||
"snowbridge-core/std",
|
||||
"snowbridge-outbound-queue-merkle-tree/std",
|
||||
"sp-api/std",
|
||||
"sp-core/std",
|
||||
"sp-std/std",
|
||||
"xcm/std",
|
||||
]
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use frame_support::traits::tokens::Balance as BalanceT;
|
||||
use snowbridge_core::outbound::Message;
|
||||
use snowbridge_outbound_queue_merkle_tree::MerkleProof;
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait OutboundQueueApi<Balance> where Balance: BalanceT
|
||||
{
|
||||
/// Generate a merkle proof for a committed message identified by `leaf_index`.
|
||||
/// The merkle root is stored in the block header as a
|
||||
/// `\[`sp_runtime::generic::DigestItem::Other`\]`
|
||||
fn prove_message(leaf_index: u64) -> Option<MerkleProof>;
|
||||
|
||||
/// Calculate the delivery fee for `message`
|
||||
fn calculate_fee(message: Message) -> Option<Balance>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user