Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

contracts: Expose rent parameter to contracts #8231

Merged
13 commits merged into from
Mar 12, 2021
8 changes: 7 additions & 1 deletion frame/contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ The interface provided to smart contracts will adhere to semver with one excepti
major version bumps will be backwards compatible with regard to already deployed contracts.
In other words: Upgrading this pallet will not break pre-existing contracts.

## [v3.0.0]
## [Unreleased]

### Added

- Add `seal_rent_params` contract callable function.

## [v3.0.0] 2021-02-25

This version constitutes the first release that brings any stability guarantees (see above).

Expand Down
8 changes: 8 additions & 0 deletions frame/contracts/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,14 @@ benchmarks! {
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])

seal_rent_params {
let r in 0 .. API_BENCHMARK_BATCHES;
let instance = Contract::<T>::new(WasmModule::getter(
"seal_rent_params", r * API_BENCHMARK_BATCH_SIZE
), vec![], Endow::Max)?;
let origin = RawOrigin::Signed(instance.caller.clone());
}: call(origin, instance.addr, 0u32.into(), Weight::max_value(), vec![])

seal_weight_to_fee {
let r in 0 .. API_BENCHMARK_BATCHES;
let pages = code::max_pages::<T>();
Expand Down
Loading