mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 01:31:07 +00:00
[contracts] Adapt storage reading host functions to Weights V2 (#12976)
* update RuntimeCosts to Weights V2, update tests * improve docs * clearer naming and docs to compat_weight helper * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * save before master merge * HostFnWeights to Weight * added to_weight! macro * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * RuntimeCosts::ChainExtension to weight_v2 * chain extension to weight v2 Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -416,7 +416,7 @@ pub const BOB: AccountId32 = AccountId32::new([2u8; 32]);
|
||||
pub const CHARLIE: AccountId32 = AccountId32::new([3u8; 32]);
|
||||
pub const DJANGO: AccountId32 = AccountId32::new([4u8; 32]);
|
||||
|
||||
pub const GAS_LIMIT: Weight = Weight::from_ref_time(100_000_000_000).set_proof_size(256 * 1024);
|
||||
pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000, 512 * 1024);
|
||||
|
||||
pub struct ExtBuilder {
|
||||
existential_deposit: u64,
|
||||
@@ -2837,7 +2837,7 @@ fn gas_estimation_call_runtime() {
|
||||
let call = RuntimeCall::Contracts(crate::Call::call {
|
||||
dest: addr_callee,
|
||||
value: 0,
|
||||
gas_limit: GAS_LIMIT.set_ref_time(GAS_LIMIT.ref_time() / 3),
|
||||
gas_limit: GAS_LIMIT / 3,
|
||||
storage_deposit_limit: None,
|
||||
data: vec![],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user