mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion for Adapt to new contracts runtime api (#1736)
* Adapt to new contracts runtime api
* Compile fix
* update lockfile for {"polkadot", "substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
feb98baeeb
commit
87e6383c0a
Generated
+282
-314
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,6 @@ pallet-utility = { git = "https://github.com/paritytech/substrate", default-feat
|
||||
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-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",
|
||||
|
||||
@@ -505,22 +505,21 @@ 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,
|
||||
@@ -530,16 +529,17 @@ impl pallet_contracts_runtime_api::ContractsApi<Block, AccountId, Balance, Block
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user