mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 08:27:55 +00:00
Contracts add code_len to ContractsInfo (#14523)
* add code_len to v12 * fix * Update frame/contracts/src/wasm/mod.rs * fix * fixes * rm test * add test back * fix * update test * Fix comments * fix build * del * fix clippy * fix * re-rename
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// This file is part of Substrate.
|
||||
mod pallet_dummy;
|
||||
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
@@ -68,6 +69,7 @@ frame_support::construct_runtime!(
|
||||
Utility: pallet_utility::{Pallet, Call, Storage, Event},
|
||||
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},
|
||||
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>},
|
||||
Dummy: pallet_dummy
|
||||
}
|
||||
);
|
||||
|
||||
@@ -373,6 +375,8 @@ impl pallet_proxy::Config for Test {
|
||||
type AnnouncementDepositFactor = ConstU64<1>;
|
||||
}
|
||||
|
||||
impl pallet_dummy::Config for Test {}
|
||||
|
||||
parameter_types! {
|
||||
pub MySchedule: Schedule<Test> = {
|
||||
let schedule = <Schedule<Test>>::default();
|
||||
@@ -2999,7 +3003,7 @@ fn gas_estimation_call_runtime() {
|
||||
.unwrap()
|
||||
.account_id;
|
||||
|
||||
let addr_callee = Contracts::bare_instantiate(
|
||||
Contracts::bare_instantiate(
|
||||
ALICE,
|
||||
min_balance * 100,
|
||||
GAS_LIMIT,
|
||||
@@ -3011,15 +3015,11 @@ fn gas_estimation_call_runtime() {
|
||||
CollectEvents::Skip,
|
||||
)
|
||||
.result
|
||||
.unwrap()
|
||||
.account_id;
|
||||
.unwrap();
|
||||
|
||||
// Call something trivial with a huge gas limit so that we can observe the effects
|
||||
// of pre-charging. This should create a difference between consumed and required.
|
||||
let call = RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
|
||||
dest: addr_callee,
|
||||
value: min_balance * 10,
|
||||
});
|
||||
let call = RuntimeCall::Dummy(pallet_dummy::Call::overestimate_pre_charge {});
|
||||
let result = Contracts::bare_call(
|
||||
ALICE,
|
||||
addr_caller.clone(),
|
||||
|
||||
Reference in New Issue
Block a user