pub type SubstrateTest = Pallet<Runtime>;
Aliased Type§
struct SubstrateTest(/* private fields */);
Implementations
Source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
An auto-generated getter for Authorities
.
Source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
Sourcepub fn bench_call(
_origin: OriginFor<T>,
_transfer: TransferData,
) -> DispatchResult
pub fn bench_call( _origin: OriginFor<T>, _transfer: TransferData, ) -> DispatchResult
Legacy call used in transaction pool benchmarks.
Sourcepub fn include_data(origin: OriginFor<T>, _data: Vec<u8>) -> DispatchResult
pub fn include_data(origin: OriginFor<T>, _data: Vec<u8>) -> DispatchResult
Implicitly fill a block body with some data.
Sourcepub fn storage_change(
_origin: OriginFor<T>,
key: Vec<u8>,
value: Option<Vec<u8>>,
) -> DispatchResult
pub fn storage_change( _origin: OriginFor<T>, key: Vec<u8>, value: Option<Vec<u8>>, ) -> DispatchResult
Put/delete some data from storage. Intended to use as an unsigned extrinsic.
Sourcepub fn offchain_index_set(
origin: OriginFor<T>,
key: Vec<u8>,
value: Vec<u8>,
) -> DispatchResult
pub fn offchain_index_set( origin: OriginFor<T>, key: Vec<u8>, value: Vec<u8>, ) -> DispatchResult
Write a key value pair to the offchain database.
Sourcepub fn offchain_index_clear(
origin: OriginFor<T>,
key: Vec<u8>,
) -> DispatchResult
pub fn offchain_index_clear( origin: OriginFor<T>, key: Vec<u8>, ) -> DispatchResult
Remove a key and an associated value from the offchain database.
Sourcepub fn indexed_call(origin: OriginFor<T>, data: Vec<u8>) -> DispatchResult
pub fn indexed_call(origin: OriginFor<T>, data: Vec<u8>) -> DispatchResult
Create an index for this call.
Sourcepub fn deposit_log_digest_item(
_origin: OriginFor<T>,
log: DigestItem,
) -> DispatchResult
pub fn deposit_log_digest_item( _origin: OriginFor<T>, log: DigestItem, ) -> DispatchResult
Deposit given digest items into the system storage. They will be included in a header during finalization.
Sourcepub fn call_with_priority(
_origin: OriginFor<T>,
_priority: TransactionPriority,
) -> DispatchResult
pub fn call_with_priority( _origin: OriginFor<T>, _priority: TransactionPriority, ) -> DispatchResult
This call is validated as ValidTransaction
with given priority.
Sourcepub fn call_do_not_propagate(_origin: OriginFor<T>) -> DispatchResult
pub fn call_do_not_propagate(_origin: OriginFor<T>) -> DispatchResult
This call is validated as non-propagable ValidTransaction
.
Sourcepub fn fill_block(origin: OriginFor<T>, _ratio: Perbill) -> DispatchResult
pub fn fill_block(origin: OriginFor<T>, _ratio: Perbill) -> DispatchResult
Fill the block weight up to the given ratio.
Sourcepub fn read(_origin: OriginFor<T>, count: u32) -> DispatchResult
pub fn read(_origin: OriginFor<T>, count: u32) -> DispatchResult
Read X times from the state some data.
Panics if it can not read X
times.
Sourcepub fn read_and_panic(_origin: OriginFor<T>, count: u32) -> DispatchResult
pub fn read_and_panic(_origin: OriginFor<T>, count: u32) -> DispatchResult
Read X times from the state some data and then panic!
Returns Ok
if it didn’t read anything.
Trait Implementations
Source§impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T: Config> DispatchViewFunction for Pallet<T>
impl<T: Config> DispatchViewFunction for Pallet<T>
fn dispatch_view_function<O: Output>( id: &ViewFunctionId, input: &mut &[u8], output: &mut O, ) -> Result<(), ViewFunctionDispatchError>
Source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
Source§fn in_code_storage_version() -> Self::InCodeStorageVersion
fn in_code_storage_version() -> Self::InCodeStorageVersion
storage_version
attribute, or
NoStorageVersionSet
if the attribute is missing.Source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
Source§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
in_code_storage_version
and will be removed after March 2024.Self::current_storage_version
instead. Read moreSource§impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
Source§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
Source§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
). Read moreSource§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read moreSource§fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
Source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Source§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
Source§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
Source§fn integrity_test()
fn integrity_test()
Source§impl<T: Config> IntegrityTest for Pallet<T>
impl<T: Config> IntegrityTest for Pallet<T>
Source§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
Source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
.Source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
Source§fn on_genesis()
fn on_genesis()
Source§impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn on_idle(n: BlockNumberFor<T>, remaining_weight: Weight) -> Weight
fn on_idle(n: BlockNumberFor<T>, remaining_weight: Weight) -> Weight
Hooks::on_idle
.Source§impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
.Source§impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn on_poll(n: BlockNumberFor<T>, weight: &mut WeightMeter)
fn on_poll(n: BlockNumberFor<T>, weight: &mut WeightMeter)
Source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Source§fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError>
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError>
Hooks::pre_upgrade
.Source§fn post_upgrade(state: Vec<u8>) -> Result<(), TryRuntimeError>
fn post_upgrade(state: Vec<u8>) -> Result<(), TryRuntimeError>
Hooks::post_upgrade
.Source§fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
pre_upgrade
->
on_runtime_upgrade
-> post_upgrade
hooks for a migration. Read moreSource§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T: Config> PalletsInfoAccess for Pallet<T>
impl<T: Config> PalletsInfoAccess for Pallet<T>
Source§impl<T: Config> StorageInfoTrait for Pallet<T>
impl<T: Config> StorageInfoTrait for Pallet<T>
fn storage_info() -> Vec<StorageInfo>
Source§impl<T: Config> TryDecodeEntireStorage for Pallet<T>
impl<T: Config> TryDecodeEntireStorage for Pallet<T>
Source§fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
Ok(bytes_decoded)
if success.Source§impl<T: Config> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
Source§fn try_state(
n: BlockNumberFor<T>,
_s: TryStateSelect,
) -> Result<(), TryRuntimeError>
fn try_state( n: BlockNumberFor<T>, _s: TryStateSelect, ) -> Result<(), TryRuntimeError>
Source§impl<T: Config> ValidateUnsigned for Pallet<T>
impl<T: Config> ValidateUnsigned for Pallet<T>
Source§fn validate_unsigned(
_source: TransactionSource,
call: &Self::Call,
) -> TransactionValidity
fn validate_unsigned( _source: TransactionSource, call: &Self::Call, ) -> TransactionValidity
Source§fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>
fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>
Source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
Source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.