pub type Module<T, I = ()> = Pallet<T, I>;
Pallet
insteadExpand description
Type alias to Pallet
, to be used by construct_runtime
.
Generated by pallet
attribute macro.
Aliased Type§
struct Module<T, I = ()>(/* private fields */);
Implementations
Source§impl<T: Config<I>, I: 'static> Pallet<T, I>where
BeneficiaryOf<T, I>: From<<T as Config>::AccountId>,
impl<T: Config<I>, I: 'static> Pallet<T, I>where
BeneficiaryOf<T, I>: From<<T as Config>::AccountId>,
Sourcepub fn claim_rewards(
origin: OriginFor<T>,
reward_kind: T::Reward,
) -> DispatchResult
pub fn claim_rewards( origin: OriginFor<T>, reward_kind: T::Reward, ) -> DispatchResult
Claim accumulated rewards.
Sourcepub fn register(
origin: OriginFor<T>,
valid_till: BlockNumberFor<T>,
) -> DispatchResult
pub fn register( origin: OriginFor<T>, valid_till: BlockNumberFor<T>, ) -> DispatchResult
Register relayer or update its registration.
Registration allows relayer to get priority boost for its message delivery transactions.
Sourcepub fn deregister(origin: OriginFor<T>) -> DispatchResult
pub fn deregister(origin: OriginFor<T>) -> DispatchResult
Deregister
relayer.
After this call, message delivery transactions of the relayer won’t get any priority boost.
Sourcepub fn claim_rewards_to(
origin: OriginFor<T>,
reward_kind: T::Reward,
beneficiary: BeneficiaryOf<T, I>,
) -> DispatchResult
pub fn claim_rewards_to( origin: OriginFor<T>, reward_kind: T::Reward, beneficiary: BeneficiaryOf<T, I>, ) -> DispatchResult
Claim accumulated rewards and send them to the alternative beneficiary.
Source§impl<T: Config<I>, I: 'static> Pallet<T, I>
impl<T: Config<I>, I: 'static> Pallet<T, I>
Sourcepub fn registered_relayer(
relayer: &T::AccountId,
) -> Option<Registration<BlockNumberFor<T>, T::Balance>>
pub fn registered_relayer( relayer: &T::AccountId, ) -> Option<Registration<BlockNumberFor<T>, T::Balance>>
Relayers that have reserved some of their balance to get free priority boost for their message delivery transactions.
Sourcepub fn relayer_reward<EncodeLikeAccountId, EncodeLikeReward>(
key1: EncodeLikeAccountId,
key2: EncodeLikeReward,
) -> Option<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Value>where
EncodeLikeAccountId: EncodeLike<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Key1>,
EncodeLikeReward: EncodeLike<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Key2>,
pub fn relayer_reward<EncodeLikeAccountId, EncodeLikeReward>(
key1: EncodeLikeAccountId,
key2: EncodeLikeReward,
) -> Option<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Value>where
EncodeLikeAccountId: EncodeLike<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Key1>,
EncodeLikeReward: EncodeLike<<RelayerRewardsKeyProvider<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance> as StorageDoubleMapKeyProvider>::Key2>,
Map of the relayer => accumulated reward.
Sourcepub fn is_registration_active(relayer: &T::AccountId) -> bool
pub fn is_registration_active(relayer: &T::AccountId) -> bool
Returns true if given relayer registration is active at current block.
This call respects both RequiredStake
and RequiredRegistrationLease
, meaning that
it’ll return false if registered stake is lower than required or if remaining lease
is less than RequiredRegistrationLease
.
Sourcepub fn slash_and_deregister(
relayer: &T::AccountId,
slash_destination: impl IdentifyAccount<AccountId = T::AccountId>,
)
pub fn slash_and_deregister( relayer: &T::AccountId, slash_destination: impl IdentifyAccount<AccountId = T::AccountId>, )
Slash and deregister
relayer. This function slashes all staked balance.
It may fail inside, but error is swallowed and we only log it.
Trait Implementations
Source§impl<T: Config<I>, I: 'static> BeforeAllRuntimeMigrations for Pallet<T, I>
impl<T: Config<I>, I: 'static> BeforeAllRuntimeMigrations for Pallet<T, I>
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T: Config<I>, I: 'static> Callable<T> for Pallet<T, I>where
BeneficiaryOf<T, I>: From<<T as Config>::AccountId>,
impl<T: Config<I>, I: 'static> Callable<T> for Pallet<T, I>where
BeneficiaryOf<T, I>: From<<T as Config>::AccountId>,
type RuntimeCall = Call<T, I>
Source§impl<T: Config<I>, I: 'static> GetStorageVersion for Pallet<T, I>
impl<T: Config<I>, I: 'static> GetStorageVersion for Pallet<T, I>
Source§type InCodeStorageVersion = StorageVersion
type InCodeStorageVersion = StorageVersion
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
§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<I>, I: 'static> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read more§fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
Source§impl<T: Config<I>, I: 'static> IntegrityTest for Pallet<T, I>
impl<T: Config<I>, I: 'static> IntegrityTest for Pallet<T, I>
Source§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].Source§impl<T: Config<I>, I: 'static> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
Source§impl<T: Config<I>, I: 'static> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
].Source§impl<T: Config<I>, I: 'static> OnGenesis for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnGenesis for Pallet<T, I>
Source§fn on_genesis()
fn on_genesis()
Source§impl<T: Config<I>, I: 'static> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
].Source§impl<T: Config<I>, I: 'static> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for Pallet<T, I>
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].§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<I>, I: 'static> PalletInfoAccess for Pallet<T, I>
impl<T: Config<I>, I: 'static> PalletInfoAccess for Pallet<T, I>
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T: Config<I>, I: 'static, Reward, RewardBalance> RewardLedger<<T as Config>::AccountId, Reward, RewardBalance> for Pallet<T, I>
impl<T: Config<I>, I: 'static, Reward, RewardBalance> RewardLedger<<T as Config>::AccountId, Reward, RewardBalance> for Pallet<T, I>
Implementation of RewardLedger
for the pallet.
Source§fn register_reward(
relayer: &T::AccountId,
reward: Reward,
reward_balance: RewardBalance,
)
fn register_reward( relayer: &T::AccountId, reward: Reward, reward_balance: RewardBalance, )
Source§impl<T: Config<I>, I: 'static> StorageInfoTrait for Pallet<T, I>
impl<T: Config<I>, I: 'static> StorageInfoTrait for Pallet<T, I>
fn storage_info() -> Vec<StorageInfo>
Source§impl<T: Config<I>, I: 'static> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> WhitelistedStorageKeys for Pallet<T, I>
impl<T: Config<I>, I: 'static> WhitelistedStorageKeys for Pallet<T, I>
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.