mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-18 05:55:41 +00:00
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
This commit is contained in:
@@ -14,7 +14,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
hex-literal = { version = "0.3.4", optional = true }
|
||||
log = { version = "0.4.17", default-features = false }
|
||||
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2.3.0", default-features = false, features = ["derive"] }
|
||||
smallvec = "1.10.0"
|
||||
|
||||
# Substrate
|
||||
@@ -47,9 +47,8 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate",
|
||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-utility = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-contracts = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-contracts = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["unstable-interface"], branch = "master" }
|
||||
pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-contracts-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
|
||||
# Polkadot
|
||||
kusama-runtime-constants = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
|
||||
@@ -93,7 +92,6 @@ std = [
|
||||
"pallet-balances/std",
|
||||
"pallet-collator-selection/std",
|
||||
"pallet-contracts-primitives/std",
|
||||
"pallet-contracts-runtime-api/std",
|
||||
"pallet-contracts/std",
|
||||
"pallet-multisig/std",
|
||||
"pallet-randomness-collective-flip/std",
|
||||
@@ -133,12 +131,6 @@ std = [
|
||||
"cumulus-primitives-utility/std",
|
||||
]
|
||||
|
||||
# Make contract callable functions marked as __unstable__ available. Do not enable
|
||||
# on live chains as those are subject to change.
|
||||
contracts-unstable-interface = [
|
||||
"pallet-contracts/unstable-interface"
|
||||
]
|
||||
|
||||
runtime-benchmarks = [
|
||||
"hex-literal",
|
||||
"frame-benchmarking/runtime-benchmarks",
|
||||
@@ -165,7 +157,7 @@ try-runtime = [
|
||||
"cumulus-pallet-xcmp-queue/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-try-runtime",
|
||||
"frame-try-runtime/try-runtime",
|
||||
"pallet-aura/try-runtime",
|
||||
"pallet-authorship/try-runtime",
|
||||
"pallet-balances/try-runtime",
|
||||
|
||||
@@ -9,7 +9,7 @@ use frame_support::{
|
||||
};
|
||||
use pallet_contracts::{
|
||||
weights::{SubstrateWeight, WeightInfo},
|
||||
Config, DefaultAddressGenerator, DefaultContractAccessWeight, Frame, Schedule,
|
||||
Config, DefaultAddressGenerator, Frame, Schedule,
|
||||
};
|
||||
pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO;
|
||||
|
||||
@@ -55,7 +55,6 @@ impl Config for Runtime {
|
||||
type Schedule = MySchedule;
|
||||
type CallStack = [Frame<Self>; 31];
|
||||
type AddressGenerator = DefaultAddressGenerator;
|
||||
type ContractAccessWeight = DefaultContractAccessWeight<RuntimeBlockWeights>;
|
||||
type MaxCodeLen = ConstU32<{ 128 * 1024 }>;
|
||||
type MaxStorageKeyLen = ConstU32<128>;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ use frame_system::limits::{BlockLength, BlockWeights};
|
||||
pub use parachains_common as common;
|
||||
use parachains_common::{
|
||||
impls::DealWithFees, opaque, AccountId, BlockNumber, Hash, Header, Index, Signature,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
|
||||
AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT, MINUTES, NORMAL_DISPATCH_RATIO,
|
||||
SLOT_DURATION,
|
||||
};
|
||||
pub use parachains_common::{AuraId, Balance};
|
||||
use xcm_config::CollatorSelectionUpdateOrigin;
|
||||
@@ -234,7 +235,7 @@ impl pallet_multisig::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type DepositBase = DepositBase;
|
||||
type DepositFactor = DepositFactor;
|
||||
type MaxSignatories = ConstU16<100>;
|
||||
type MaxSignatories = ConstU32<100>;
|
||||
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -269,7 +270,7 @@ impl parachain_info::Config for Runtime {}
|
||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||
|
||||
parameter_types! {
|
||||
pub const Period: u32 = 6 * HOURS;
|
||||
pub const Period: u32 = 10 * MINUTES;
|
||||
pub const Offset: u32 = 0;
|
||||
}
|
||||
|
||||
@@ -303,7 +304,7 @@ impl pallet_collator_selection::Config for Runtime {
|
||||
type UpdateOrigin = CollatorSelectionUpdateOrigin;
|
||||
type PotId = PotId;
|
||||
type MaxCandidates = ConstU32<1000>;
|
||||
type MinCandidates = ConstU32<5>;
|
||||
type MinCandidates = ConstU32<0>;
|
||||
type MaxInvulnerables = ConstU32<100>;
|
||||
// should be a multiple of session or things will get inconsistent
|
||||
type KickThreshold = Period;
|
||||
@@ -505,41 +506,42 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_contracts_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>
|
||||
for Runtime
|
||||
{
|
||||
impl pallet_contracts::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash> for Runtime {
|
||||
fn call(
|
||||
origin: AccountId,
|
||||
dest: AccountId,
|
||||
value: Balance,
|
||||
gas_limit: u64,
|
||||
gas_limit: Option<Weight>,
|
||||
storage_deposit_limit: Option<Balance>,
|
||||
input_data: Vec<u8>,
|
||||
) -> pallet_contracts_primitives::ContractExecResult<Balance> {
|
||||
let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);
|
||||
Contracts::bare_call(
|
||||
origin,
|
||||
dest,
|
||||
value,
|
||||
Weight::from_ref_time(gas_limit),
|
||||
gas_limit,
|
||||
storage_deposit_limit,
|
||||
input_data,
|
||||
contracts::CONTRACTS_DEBUG_OUTPUT,
|
||||
pallet_contracts::Determinism::Deterministic,
|
||||
)
|
||||
}
|
||||
|
||||
fn instantiate(
|
||||
origin: AccountId,
|
||||
value: Balance,
|
||||
gas_limit: u64,
|
||||
gas_limit: Option<Weight>,
|
||||
storage_deposit_limit: Option<Balance>,
|
||||
code: pallet_contracts_primitives::Code<Hash>,
|
||||
data: Vec<u8>,
|
||||
salt: Vec<u8>,
|
||||
) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, Balance> {
|
||||
let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);
|
||||
Contracts::bare_instantiate(
|
||||
origin,
|
||||
value,
|
||||
Weight::from_ref_time(gas_limit),
|
||||
gas_limit,
|
||||
storage_deposit_limit,
|
||||
code,
|
||||
data,
|
||||
@@ -552,8 +554,14 @@ impl pallet_contracts_runtime_api::ContractsApi<Block, AccountId, Balance, Block
|
||||
origin: AccountId,
|
||||
code: Vec<u8>,
|
||||
storage_deposit_limit: Option<Balance>,
|
||||
determinism: pallet_contracts::Determinism,
|
||||
) -> pallet_contracts_primitives::CodeUploadResult<Hash, Balance> {
|
||||
Contracts::bare_upload_code(origin, code, storage_deposit_limit)
|
||||
Contracts::bare_upload_code(
|
||||
origin,
|
||||
code,
|
||||
storage_deposit_limit,
|
||||
determinism,
|
||||
)
|
||||
}
|
||||
|
||||
fn get_storage(
|
||||
|
||||
Reference in New Issue
Block a user