Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Tinkernet multisig XCM configs #961

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions runtime/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ zenlink-stable-amm = { version = "*", default-features = false }
zenlink-stable-amm-runtime-api = { version = "*", default-features = false }
zenlink-swap-router = { version = "*", default-features = false }

# InvArch Tinkernet Multisig dependencies
invarch-xcm-builder = { git = "https://github.com/InvArch/InvArch-XCM-Builder", branch = "polkadot-v0.9.38", default-features = false }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", optional = true }

Expand Down
5 changes: 5 additions & 0 deletions runtime/bifrost-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub use xcm_builder::{
FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit,
WithComputedOrigin,
};
use xcm_executor::traits::{MatchesFungible, ShouldExecute};
pub use xcm_interface::traits::{parachains, XcmBaseWeight};
Expand Down Expand Up @@ -252,6 +253,8 @@ pub type LocationToAccountId = (
SiblingParachainConvertsVia<Sibling, AccountId>,
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Mapping Tinkernet multisig to the correctly derived AccountId32.
invarch_xcm_builder::TinkernetMultisigAsAccountId<AccountId>,
// Derives a private `Account32` by hashing `("multiloc", received multilocation)`
Account32Hash<RelayNetwork, AccountId>,
);
Expand All @@ -276,6 +279,8 @@ pub type XcmOriginToTransactDispatchOrigin = (
// Native signed account converter; this just converts an `AccountId32` origin into a normal
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
// Derives signed AccountId32 origins for Tinkernet multisigs.
invarch_xcm_builder::DeriveOriginFromTinkernetMultisig<RuntimeOrigin>,
// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
XcmPassthrough<RuntimeOrigin>,
);
Expand Down