Skip to content

Commit

Permalink
development and altair compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Aug 12, 2024
1 parent 041e28e commit 8304c1c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 33 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock

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

12 changes: 4 additions & 8 deletions runtime/altair/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ cfg-primitives = { workspace = true }
cfg-traits = { workspace = true }
cfg-types = { workspace = true }
cfg-utils = { workspace = true }
liquidity-pools-gateway-routers = { workspace = true }
runtime-common = { workspace = true }

# Pallet list
axelar-gateway-precompile = { workspace = true }
chainbridge = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
Expand All @@ -85,6 +83,7 @@ orml-xtokens = { workspace = true }
pallet-anchors = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-axelar-router = { workspace = true }
pallet-balances = { workspace = true }
pallet-base-fee = { workspace = true }
pallet-block-rewards = { workspace = true }
Expand Down Expand Up @@ -200,9 +199,7 @@ std = [
"cfg-traits/std",
"cfg-types/std",
"runtime-common/std",
"liquidity-pools-gateway-routers/std",
# Pallet list
"axelar-gateway-precompile/std",
"chainbridge/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
Expand All @@ -215,6 +212,7 @@ std = [
"pallet-anchors/std",
"pallet-aura/std",
"pallet-authorship/std",
"pallet-axelar-router/std",
"pallet-balances/std",
"pallet-base-fee/std",
"pallet-block-rewards/std",
Expand Down Expand Up @@ -295,16 +293,15 @@ runtime-benchmarks = [
"cfg-traits/runtime-benchmarks",
"cfg-types/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"liquidity-pools-gateway-routers/runtime-benchmarks",
# Pallet list
"axelar-gateway-precompile/runtime-benchmarks",
"chainbridge/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"orml-asset-registry/runtime-benchmarks",
"orml-tokens/runtime-benchmarks",
"orml-xtokens/runtime-benchmarks",
"pallet-anchors/runtime-benchmarks",
"pallet-axelar-router/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-block-rewards/runtime-benchmarks",
"pallet-bridge/runtime-benchmarks",
Expand Down Expand Up @@ -375,9 +372,7 @@ try-runtime = [
"cfg-traits/try-runtime",
"cfg-types/try-runtime",
"runtime-common/try-runtime",
"liquidity-pools-gateway-routers/try-runtime",
# Pallet list
"axelar-gateway-precompile/try-runtime",
"chainbridge/try-runtime",
"cumulus-pallet-aura-ext/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
Expand All @@ -390,6 +385,7 @@ try-runtime = [
"pallet-anchors/try-runtime",
"pallet-aura/try-runtime",
"pallet-authorship/try-runtime",
"pallet-axelar-router/try-runtime",
"pallet-balances/try-runtime",
"pallet-base-fee/try-runtime",
"pallet-block-rewards/try-runtime",
Expand Down
20 changes: 13 additions & 7 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use cfg_primitives::{
};
use cfg_traits::{investments::OrderManager, Millis, PoolUpdateGuard, Seconds};
use cfg_types::{
domain_address::DomainAddress,
fee_keys::{Fee, FeeKey},
fixed_point::{Quantity, Rate, Ratio},
investments::InvestmentPortfolio,
Expand Down Expand Up @@ -116,6 +117,7 @@ use runtime_common::{
permissions::{IsUnfrozenTrancheInvestor, PoolAdminCheck},
remarks::Remark,
rewards::SingleCurrencyMovement,
routing::{EvmAccountCodeChecker, RouterDispatcher, RouterId},
transfer_filter::{PreLpTransfer, PreNativeTransfer},
xcm::AccountIdToLocation,
xcm_transactor, AllowanceDeposit, CurrencyED,
Expand Down Expand Up @@ -1756,7 +1758,7 @@ impl pallet_liquidity_pools::Config for Runtime {

parameter_types! {
pub const MaxIncomingMessageSize: u32 = 1024;
pub Sender: AccountId = gateway::get_gateway_account::<Runtime>();
pub Sender: DomainAddress = gateway::get_gateway_account::<Runtime>();
}

impl pallet_liquidity_pools_gateway::Config for Runtime {
Expand All @@ -1766,15 +1768,16 @@ impl pallet_liquidity_pools_gateway::Config for Runtime {
type MaxIncomingMessageSize = MaxIncomingMessageSize;
type Message = pallet_liquidity_pools::Message;
type MessageQueue = LiquidityPoolsGatewayQueue;
type Router = liquidity_pools_gateway_routers::DomainRouter<Runtime>;
type MessageSender = RouterDispatcher<Runtime>;
type RouterId = RouterId;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type Sender = Sender;
type WeightInfo = ();
}

impl pallet_liquidity_pools_gateway_queue::Config for Runtime {
type Message = GatewayMessage<AccountId, pallet_liquidity_pools::Message>;
type Message = GatewayMessage<pallet_liquidity_pools::Message>;
type MessageNonce = LPGatewayQueueMessageNonce;
type MessageProcessor = LiquidityPoolsGateway;
type RuntimeEvent = RuntimeEvent;
Expand Down Expand Up @@ -1884,10 +1887,13 @@ impl pallet_ethereum::Config for Runtime {

impl pallet_ethereum_transaction::Config for Runtime {}

impl axelar_gateway_precompile::Config for Runtime {
type AdminOrigin = EnsureRootOr<HalfOfCouncil>;
impl pallet_axelar_router::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>;
type EvmAccountCodeChecker = EvmAccountCodeChecker<Runtime>;
type Middleware = RouterId;
type Receiver = LiquidityPoolsGateway;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type Transactor = EthereumTransaction;
}

impl pallet_conviction_voting::Config for Runtime {
Expand Down Expand Up @@ -2109,7 +2115,7 @@ construct_runtime!(
BaseFee: pallet_base_fee::{Pallet, Call, Config<T>, Storage, Event} = 162,
Ethereum: pallet_ethereum::{Pallet, Config<T>, Call, Storage, Event, Origin} = 163,
EthereumTransaction: pallet_ethereum_transaction::{Pallet, Storage} = 164,
LiquidityPoolsAxelarGateway: axelar_gateway_precompile::{Pallet, Call, Storage, Event<T>} = 165,
AxelarRouter: pallet_axelar_router::{Pallet, Call, Storage, Event<T>} = 165,

// Our pallets (part 2)
// Removed: Migration = 199
Expand Down
12 changes: 4 additions & 8 deletions runtime/development/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ cfg-primitives = { workspace = true }
cfg-traits = { workspace = true }
cfg-types = { workspace = true }
cfg-utils = { workspace = true }
liquidity-pools-gateway-routers = { workspace = true }
runtime-common = { workspace = true }

# Pallet list
axelar-gateway-precompile = { workspace = true }
chainbridge = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
Expand All @@ -86,6 +84,7 @@ pallet-anchors = { workspace = true }
pallet-anchors-v2 = { workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-axelar-router = { workspace = true }
pallet-balances = { workspace = true }
pallet-base-fee = { workspace = true }
pallet-block-rewards = { workspace = true }
Expand Down Expand Up @@ -201,9 +200,7 @@ std = [
"cfg-traits/std",
"cfg-types/std",
"runtime-common/std",
"liquidity-pools-gateway-routers/std",
# Pallet list
"axelar-gateway-precompile/std",
"chainbridge/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
Expand All @@ -217,6 +214,7 @@ std = [
"pallet-anchors-v2/std",
"pallet-aura/std",
"pallet-authorship/std",
"pallet-axelar-router/std",
"pallet-balances/std",
"pallet-base-fee/std",
"pallet-block-rewards/std",
Expand Down Expand Up @@ -296,9 +294,7 @@ runtime-benchmarks = [
"cfg-traits/runtime-benchmarks",
"cfg-types/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"liquidity-pools-gateway-routers/runtime-benchmarks",
# Pallet list
"axelar-gateway-precompile/runtime-benchmarks",
"chainbridge/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
Expand All @@ -307,6 +303,7 @@ runtime-benchmarks = [
"orml-xtokens/runtime-benchmarks",
"pallet-anchors/runtime-benchmarks",
"pallet-anchors-v2/runtime-benchmarks",
"pallet-axelar-router/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-block-rewards/runtime-benchmarks",
"pallet-bridge/runtime-benchmarks",
Expand Down Expand Up @@ -377,9 +374,7 @@ try-runtime = [
"cfg-traits/try-runtime",
"cfg-types/try-runtime",
"runtime-common/try-runtime",
"liquidity-pools-gateway-routers/try-runtime",
# Pallet list
"axelar-gateway-precompile/try-runtime",
"chainbridge/try-runtime",
"cumulus-pallet-aura-ext/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
Expand All @@ -393,6 +388,7 @@ try-runtime = [
"pallet-anchors-v2/try-runtime",
"pallet-aura/try-runtime",
"pallet-authorship/try-runtime",
"pallet-axelar-router/try-runtime",
"pallet-balances/try-runtime",
"pallet-base-fee/try-runtime",
"pallet-block-rewards/try-runtime",
Expand Down
18 changes: 12 additions & 6 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use cfg_traits::{
Seconds,
};
use cfg_types::{
domain_address::DomainAddress,
fee_keys::{Fee, FeeKey},
fixed_point::{Quantity, Rate, Ratio},
investments::InvestmentPortfolio,
Expand Down Expand Up @@ -124,6 +125,7 @@ use runtime_common::{
permissions::{IsUnfrozenTrancheInvestor, PoolAdminCheck},
remarks::Remark,
rewards::SingleCurrencyMovement,
routing::{EvmAccountCodeChecker, RouterDispatcher, RouterId},
transfer_filter::{PreLpTransfer, PreNativeTransfer},
xcm::AccountIdToLocation,
xcm_transactor, AllowanceDeposit, CurrencyED,
Expand Down Expand Up @@ -1861,7 +1863,7 @@ impl pallet_liquidity_pools::Config for Runtime {

parameter_types! {
pub const MaxIncomingMessageSize: u32 = 1024;
pub Sender: AccountId = gateway::get_gateway_account::<Runtime>();
pub Sender: DomainAddress = gateway::get_gateway_account::<Runtime>();
}

impl pallet_liquidity_pools_gateway::Config for Runtime {
Expand All @@ -1871,15 +1873,16 @@ impl pallet_liquidity_pools_gateway::Config for Runtime {
type MaxIncomingMessageSize = MaxIncomingMessageSize;
type Message = pallet_liquidity_pools::Message;
type MessageQueue = LiquidityPoolsGatewayQueue;
type Router = liquidity_pools_gateway_routers::DomainRouter<Runtime>;
type MessageSender = RouterDispatcher<Runtime>;
type RouterId = RouterId;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
type Sender = Sender;
type WeightInfo = ();
}

impl pallet_liquidity_pools_gateway_queue::Config for Runtime {
type Message = GatewayMessage<AccountId, pallet_liquidity_pools::Message>;
type Message = GatewayMessage<pallet_liquidity_pools::Message>;
type MessageNonce = LPGatewayQueueMessageNonce;
type MessageProcessor = LiquidityPoolsGateway;
type RuntimeEvent = RuntimeEvent;
Expand Down Expand Up @@ -1990,10 +1993,13 @@ impl pallet_ethereum::Config for Runtime {

impl pallet_ethereum_transaction::Config for Runtime {}

impl axelar_gateway_precompile::Config for Runtime {
impl pallet_axelar_router::Config for Runtime {
type AdminOrigin = EnsureRoot<AccountId>;
type EvmAccountCodeChecker = EvmAccountCodeChecker<Runtime>;
type Middleware = RouterId;
type Receiver = LiquidityPoolsGateway;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type Transactor = EthereumTransaction;
}

impl pallet_conviction_voting::Config for Runtime {
Expand Down Expand Up @@ -2219,7 +2225,7 @@ construct_runtime!(
BaseFee: pallet_base_fee::{Pallet, Call, Config<T>, Storage, Event} = 162,
Ethereum: pallet_ethereum::{Pallet, Config<T>, Call, Storage, Event, Origin} = 163,
EthereumTransaction: pallet_ethereum_transaction::{Pallet, Storage} = 164,
LiquidityPoolsAxelarGateway: axelar_gateway_precompile::{Pallet, Call, Storage, Event<T>} = 165,
AxelarRouter: pallet_axelar_router::{Pallet, Call, Storage, Event<T>} = 165,

// Removed: Migration = 199
// admin stuff
Expand Down

0 comments on commit 8304c1c

Please sign in to comment.