Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
move to treasury to snowbridge sovereign
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Nov 8, 2023
1 parent 462b630 commit 5504099
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ use pallet_xcm::EnsureXcm;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm::VersionedMultiLocation;
use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};
use xcm_config::{SnowbridgeTreasuryAccount, XcmConfig, XcmOriginToTransactDispatchOrigin};

use bp_runtime::HeaderId;

Expand Down Expand Up @@ -622,7 +622,7 @@ impl snowbridge_control::Config for Runtime {
type MessageHasher = BlakeTwo256;
type SiblingOrigin = EnsureXcm<AllowSiblingsOnly>;
type AgentIdOf = xcm_config::AgentIdOf;
type TreasuryAccount = TreasuryAccount;
type TreasuryAccount = SnowbridgeTreasuryAccount;
type Token = Balances;
type WeightInfo = weights::snowbridge_control::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ use parachains_common::{
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
use rococo_runtime_constants::system_parachain::SystemParachains;
use snowbridge_router_primitives::outbound::EthereumBlobExporter;
use snowbridge_router_primitives::{
inbound::GlobalConsensusEthereumConvertsFor,
outbound::EthereumBlobExporter,
};
use sp_core::{Get, H256};
use sp_runtime::traits::AccountIdConversion;
use sp_std::marker::PhantomData;
Expand Down Expand Up @@ -82,7 +85,9 @@ parameter_types! {
pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(rococo_runtime_constants::TREASURY_PALLET_ID)).into();

// Network and location for the local Ethereum testnet.
pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 15 };
pub const EthereumChainId: u64 = 15;
pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: EthereumChainId::get() };
pub SnowbridgeTreasuryAccount: AccountId = GlobalConsensusEthereumConvertsFor::<AccountId>::from_chain_id(&EthereumChainId::get()).into();
}

/// Adapter for resolving `NetworkId` based on `pub storage Flavor: RuntimeFlavor`.
Expand Down Expand Up @@ -318,7 +323,7 @@ impl xcm_executor::Config for XcmConfig {
>,
XcmExportFeeToSnowbridge<
EthereumNetwork,
TreasuryAccount,
SnowbridgeTreasuryAccount,
Self::AssetTransactor,
>,
XcmFeeToAccount<Self::AssetTransactor, AccountId, TreasuryAccount>,
Expand Down

0 comments on commit 5504099

Please sign in to comment.