mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 22:28:02 +00:00
Companion PR for add events to ContractResult (#2510)
* contracts: adapt to new contracts api
* update lockfile for {"substrate", "polkadot"}
---------
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+257
-257
File diff suppressed because it is too large
Load Diff
@@ -7,13 +7,13 @@ use frame_support::{
|
||||
traits::{ConstBool, ConstU32, Nothing},
|
||||
};
|
||||
use pallet_contracts::{
|
||||
weights::SubstrateWeight, Config, DefaultAddressGenerator, Frame, Schedule,
|
||||
weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule,
|
||||
};
|
||||
pub use parachains_common::AVERAGE_ON_INITIALIZE_RATIO;
|
||||
|
||||
// Prints debug output of the `contracts` pallet to stdout if the node is
|
||||
// started with `-lruntime::contracts=debug`.
|
||||
pub const CONTRACTS_DEBUG_OUTPUT: bool = true;
|
||||
pub const CONTRACTS_DEBUG_OUTPUT: DebugInfo = DebugInfo::UnsafeDebug;
|
||||
|
||||
parameter_types! {
|
||||
pub const DepositPerItem: Balance = deposit(1, 0);
|
||||
|
||||
@@ -99,6 +99,11 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, Si
|
||||
|
||||
pub type Migrations = (pallet_contracts::Migration<Runtime>,);
|
||||
|
||||
type EventRecord = frame_system::EventRecord<
|
||||
<Runtime as frame_system::Config>::RuntimeEvent,
|
||||
<Runtime as frame_system::Config>::Hash,
|
||||
>;
|
||||
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = frame_executive::Executive<
|
||||
Runtime,
|
||||
@@ -532,7 +537,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_contracts::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash> for Runtime {
|
||||
impl pallet_contracts::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash, EventRecord> for Runtime {
|
||||
fn call(
|
||||
origin: AccountId,
|
||||
dest: AccountId,
|
||||
@@ -540,7 +545,7 @@ impl_runtime_apis! {
|
||||
gas_limit: Option<Weight>,
|
||||
storage_deposit_limit: Option<Balance>,
|
||||
input_data: Vec<u8>,
|
||||
) -> pallet_contracts_primitives::ContractExecResult<Balance> {
|
||||
) -> pallet_contracts_primitives::ContractExecResult<Balance, EventRecord> {
|
||||
let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);
|
||||
Contracts::bare_call(
|
||||
origin,
|
||||
@@ -550,6 +555,7 @@ impl_runtime_apis! {
|
||||
storage_deposit_limit,
|
||||
input_data,
|
||||
contracts::CONTRACTS_DEBUG_OUTPUT,
|
||||
pallet_contracts::CollectEvents::UnsafeCollect,
|
||||
pallet_contracts::Determinism::Enforced,
|
||||
)
|
||||
}
|
||||
@@ -562,7 +568,7 @@ impl_runtime_apis! {
|
||||
code: pallet_contracts_primitives::Code<Hash>,
|
||||
data: Vec<u8>,
|
||||
salt: Vec<u8>,
|
||||
) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, Balance> {
|
||||
) -> pallet_contracts_primitives::ContractInstantiateResult<AccountId, Balance, EventRecord> {
|
||||
let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block);
|
||||
Contracts::bare_instantiate(
|
||||
origin,
|
||||
@@ -573,6 +579,7 @@ impl_runtime_apis! {
|
||||
data,
|
||||
salt,
|
||||
contracts::CONTRACTS_DEBUG_OUTPUT,
|
||||
pallet_contracts::CollectEvents::UnsafeCollect,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user