mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 02:31:06 +00:00
contracts: Reduce the API surface (#8359)
* contracts: Remove types and storage from the public interface * contracts: Remove current_schedule() getter * contracts: Improve documentation * Update README.md * Fix integration test
This commit is contained in:
committed by
GitHub
parent
d343683ca9
commit
d98a3c7942
@@ -24,9 +24,7 @@
|
||||
//! we define this simple definition of a contract that can be passed to `create_code` that
|
||||
//! compiles it down into a `WasmModule` that can be used as a contract's code.
|
||||
|
||||
use crate::Config;
|
||||
use crate::Pallet as Contracts;
|
||||
|
||||
use crate::{Config, CurrentSchedule};
|
||||
use parity_wasm::elements::{
|
||||
Instruction, Instructions, FuncBody, ValueType, BlockType, Section, CustomSection,
|
||||
};
|
||||
@@ -225,7 +223,7 @@ where
|
||||
if def.inject_stack_metering {
|
||||
code = inject_limiter(
|
||||
code,
|
||||
Contracts::<T>::current_schedule().limits.stack_height
|
||||
<CurrentSchedule<T>>::get().limits.stack_height
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@@ -505,5 +503,5 @@ where
|
||||
T: Config,
|
||||
T::AccountId: UncheckedFrom<T::Hash> + AsRef<[u8]>,
|
||||
{
|
||||
Contracts::<T>::current_schedule().limits.memory_pages
|
||||
<CurrentSchedule<T>>::get().limits.memory_pages
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user