Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5243c8f
updated package versions
alistair-singh Mar 8, 2022
1828fe9
updated to 0.9.17
alistair-singh Mar 8, 2022
db29ca8
removed DigestItem generic
alistair-singh Mar 9, 2022
7d682b0
added `without_storage_info` attributes to pallets
alistair-singh Mar 15, 2022
cf020b4
made account principal optional
alistair-singh Mar 15, 2022
189597e
added state_version to runtime versions
alistair-singh Mar 15, 2022
b81035d
general runtime fixes
alistair-singh Mar 15, 2022
47ab86f
more runtime fixes
alistair-singh Mar 15, 2022
ddd080a
add xcm config
alistair-singh Mar 15, 2022
a0da8bc
fixed benchmarks
alistair-singh Mar 15, 2022
7034701
added PalletsOrigin for utility pallet config
alistair-singh Mar 15, 2022
9c2e6fb
added Header parameter
alistair-singh Mar 15, 2022
f8185b0
service fixes
alistair-singh Mar 15, 2022
c3f4994
cargo check now passes
alistair-singh Mar 15, 2022
05862cb
fixed runtime benchmarks
alistair-singh Mar 15, 2022
d10b68d
tests passing
alistair-singh Mar 15, 2022
0a3fcf0
add non zero sender
alistair-singh Mar 15, 2022
eabb1a5
add missing benchmarks
alistair-singh Mar 15, 2022
0fc625f
fixed merge conflict
alistair-singh Mar 15, 2022
b0ac896
updated polkadot api js libs
alistair-singh Mar 15, 2022
d9cc004
downgrade edition to 2018
alistair-singh Mar 15, 2022
0f4d088
update docs
alistair-singh Mar 15, 2022
c87b055
updated toolchain
alistair-singh Mar 15, 2022
045dff8
upgrade back to edition 2021
alistair-singh Mar 15, 2022
c721181
rustfmt
alistair-singh Mar 15, 2022
041e740
more benchmark fixes
alistair-singh Mar 16, 2022
b720804
only allow unpaid from parent or parents executive
alistair-singh Mar 16, 2022
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
Prev Previous commit
Next Next commit
more runtime fixes
  • Loading branch information
alistair-singh committed Mar 19, 2022
commit 47ab86ffa11c79628d08ecee6034fc99d747d83c
1 change: 1 addition & 0 deletions parachain/pallets/basic-channel/src/inbound/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}
// Mock verifier
pub struct MockVerifier;
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/basic-channel/src/outbound/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/dispatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ mod tests {
type DbWeight = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

pub struct CallFilter;
Expand Down
2 changes: 2 additions & 0 deletions parachain/pallets/dot-app/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ impl system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -110,6 +111,7 @@ impl pallet_assets::Config for Test {
type Currency = Balances;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down
2 changes: 2 additions & 0 deletions parachain/pallets/erc20-app/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl pallet_randomness_collective_flip::Config for Test {}
Expand Down Expand Up @@ -109,6 +110,7 @@ impl pallet_assets::Config for Test {
type Currency = Balances;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/erc721-app/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ impl frame_system::Config for Test {
type OnSetCode = ();
type SystemWeightInfo = ();
type SS58Prefix = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl snowbridge_nft::Config for Test {
Expand Down
2 changes: 2 additions & 0 deletions parachain/pallets/eth-app/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -105,6 +106,7 @@ impl pallet_assets::Config for Test {
type Currency = Balances;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down
2 changes: 2 additions & 0 deletions parachain/pallets/ethereum-light-client/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub mod mock_verifier {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -129,6 +130,7 @@ pub mod mock_verifier_with_pow {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/incentivized-channel/src/inbound/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down
3 changes: 3 additions & 0 deletions parachain/pallets/incentivized-channel/src/outbound/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl frame_system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand All @@ -94,6 +95,7 @@ parameter_types! {
pub const StringLimit: u32 = 50;
pub const MetadataDepositBase: u64 = 1;
pub const MetadataDepositPerByte: u64 = 1;
pub const AssetAccountDeposit = 1;
}

impl pallet_assets::Config for Test {
Expand All @@ -103,6 +105,7 @@ impl pallet_assets::Config for Test {
type Currency = Balances;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down
1 change: 1 addition & 0 deletions parachain/pallets/nft/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ impl frame_system::Config for Test {
type BaseCallFilter = Everything;
type SystemWeightInfo = ();
type SS58Prefix = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl Config for Test {
Expand Down
10 changes: 6 additions & 4 deletions parachain/runtime/snowbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub use frame_support::{
dispatch::DispatchResult,
match_type, parameter_types,
traits::{
tokens::fungible::ItemOf, Contains, Everything, IsInVec, KeyOwnerProofSystem, Nothing,
tokens::fungible::ItemOf, Contains, EnsureOneOf, Everything, IsInVec, KeyOwnerProofSystem, Nothing,
Randomness,
},
weights::{
Expand All @@ -41,7 +41,7 @@ pub use frame_support::{
},
PalletId, StorageValue,
};
use frame_system::{EnsureOneOf, EnsureRoot};
use frame_system::{EnsureRoot};
use pallet_transaction_payment::FeeDetails;
use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand Down Expand Up @@ -174,6 +174,7 @@ impl frame_system::Config for Runtime {
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -433,7 +434,6 @@ impl pallet_sudo::Config for Runtime {
}

type EnsureRootOrHalfLocalCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, LocalCouncilInstance>,
>;
Expand Down Expand Up @@ -478,6 +478,7 @@ parameter_types! {
pub const AssetsStringLimit: u32 = 50;
pub const MetadataDepositBase: Balance = 0;
pub const MetadataDepositPerByte: Balance = 0;
pub const AssetAccountDeposit: Balance = 0;
}

pub type AssetsForceOrigin =
Expand All @@ -490,6 +491,7 @@ impl pallet_assets::Config for Runtime {
type Currency = Balances;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down Expand Up @@ -782,7 +784,7 @@ pub type Executive = frame_executive::Executive<
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
AllPalletsWithSystem,
>;

impl_runtime_apis! {
Expand Down
12 changes: 7 additions & 5 deletions parachain/runtime/snowblink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub use frame_support::{
dispatch::DispatchResult,
match_type, parameter_types,
traits::{
tokens::fungible::ItemOf, Contains, Everything, IsInVec, KeyOwnerProofSystem, Nothing,
tokens::fungible::ItemOf, Contains, Everything, EnsureOneOf, IsInVec, KeyOwnerProofSystem, Nothing,
Randomness,
},
weights::{
Expand All @@ -41,7 +41,7 @@ pub use frame_support::{
},
PalletId, StorageValue,
};
use frame_system::{EnsureOneOf, EnsureRoot};
use frame_system::{EnsureRoot};
use pallet_transaction_payment::FeeDetails;
use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand All @@ -62,7 +62,7 @@ use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom,
AsPrefixedGeneralIndex, ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin,
FixedWeightBounds, FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset,
ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
};
Expand Down Expand Up @@ -174,6 +174,7 @@ impl frame_system::Config for Runtime {
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -433,7 +434,6 @@ impl pallet_sudo::Config for Runtime {
}

type EnsureRootOrHalfLocalCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, LocalCouncilInstance>,
>;
Expand Down Expand Up @@ -478,6 +478,7 @@ parameter_types! {
pub const AssetsStringLimit: u32 = 50;
pub const MetadataDepositBase: Balance = 0;
pub const MetadataDepositPerByte: Balance = 0;
pub const AssetAccountDeposit: Balance = 0;
}

pub type AssetsForceOrigin =
Expand All @@ -490,6 +491,7 @@ impl pallet_assets::Config for Runtime {
type Currency = Balances;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down Expand Up @@ -782,7 +784,7 @@ pub type Executive = frame_executive::Executive<
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
AllPalletsWithSystem,
>;

impl_runtime_apis! {
Expand Down
14 changes: 8 additions & 6 deletions parachain/runtime/snowbridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub use frame_support::{
dispatch::DispatchResult,
match_type, parameter_types,
traits::{
tokens::fungible::ItemOf, Contains, Everything, IsInVec, KeyOwnerProofSystem, Nothing,
tokens::fungible::ItemOf, Contains, EnsureOneOf, Everything, IsInVec, KeyOwnerProofSystem, Nothing,
Randomness,
},
weights::{
Expand All @@ -41,7 +41,7 @@ pub use frame_support::{
},
PalletId, StorageValue,
};
use frame_system::{EnsureOneOf, EnsureRoot};
use frame_system::{EnsureRoot};
use pallet_transaction_payment::FeeDetails;
use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand All @@ -62,7 +62,7 @@ use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom,
AsPrefixedGeneralIndex, ConvertedConcreteAssetId, CurrencyAdapter, EnsureXcmOrigin,
FixedWeightBounds, FungiblesAdapter, IsConcrete, LocationInverter, NativeAsset,
ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
};
Expand Down Expand Up @@ -174,6 +174,7 @@ impl frame_system::Config for Runtime {
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
type SS58Prefix = SS58Prefix;
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -275,7 +276,7 @@ parameter_types! {
/// `Transact` in order to determine the dispatch Origin.
pub type LocationToAccountId = (
// The parent (Relay-chain) origin converts to the default `AccountId`.
ParentIsDefault<AccountId>,
ParentIsPreset<AccountId>,
// Sibling parachain origins convert to AccountId via the `ParaId::into`.
SiblingParachainConvertsVia<Sibling, AccountId>,
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
Expand Down Expand Up @@ -433,7 +434,6 @@ impl pallet_sudo::Config for Runtime {
}

type EnsureRootOrHalfLocalCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, LocalCouncilInstance>,
>;
Expand Down Expand Up @@ -478,6 +478,7 @@ parameter_types! {
pub const AssetsStringLimit: u32 = 50;
pub const MetadataDepositBase: Balance = 0;
pub const MetadataDepositPerByte: Balance = 0;
pub const AssetAccountDeposit: Balance = 0;
}

pub type AssetsForceOrigin =
Expand All @@ -490,6 +491,7 @@ impl pallet_assets::Config for Runtime {
type Currency = Balances;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down Expand Up @@ -782,7 +784,7 @@ pub type Executive = frame_executive::Executive<
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPallets,
AllPalletsWithSystem,
>;

impl_runtime_apis! {
Expand Down
1 change: 1 addition & 0 deletions parachain/utils/test-parachain/pallets/test/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl system::Config for Test {
type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
type OnSetCode = ();
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl pallet_template::Config for Test {
Expand Down
3 changes: 3 additions & 0 deletions parachain/utils/test-parachain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ impl frame_system::Config for Runtime {
type SS58Prefix = SS58Prefix;
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

parameter_types! {
Expand Down Expand Up @@ -406,6 +407,7 @@ pub mod currency {
parameter_types! {
pub const DotLocation: MultiLocation = MultiLocation::parent();
pub const AssetDeposit: Balance = 100 * currency::DOLLARS; // 100 DOLLARS deposit to create asset
pub const AssetAccountDeposit: Balance = 100 * currency::DOLLARS;
pub const ApprovalDeposit: Balance = currency::EXISTENTIAL_DEPOSIT;
pub const AssetsStringLimit: u32 = 50;
/// Key = 32 bytes, Value = 36 bytes (32+1+1+1+1)
Expand All @@ -430,6 +432,7 @@ impl pallet_assets::Config for Runtime {
type Currency = Balances;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type AssetAccountDeposit = AssetAccountDeposit;
type MetadataDepositBase = MetadataDepositBase;
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
Expand Down