pub type BridgeRelayers = Pallet<Runtime>;
Aliased Type§
struct BridgeRelayers(/* private fields */);
Implementations
Source§impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
<<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary: From<<T as Config>::AccountId>,
impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
<<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary: From<<T as Config>::AccountId>,
Sourcepub fn claim_rewards(
origin: <T as Config>::RuntimeOrigin,
reward_kind: <T as Config<I>>::Reward,
) -> Result<(), DispatchError>
pub fn claim_rewards( origin: <T as Config>::RuntimeOrigin, reward_kind: <T as Config<I>>::Reward, ) -> Result<(), DispatchError>
Claim accumulated rewards.
Sourcepub fn register(
origin: <T as Config>::RuntimeOrigin,
valid_till: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Result<(), DispatchError>
pub fn register( origin: <T as Config>::RuntimeOrigin, valid_till: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Result<(), DispatchError>
Register relayer or update its registration.
Registration allows relayer to get priority boost for its message delivery transactions.
Sourcepub fn deregister(
origin: <T as Config>::RuntimeOrigin,
) -> Result<(), DispatchError>
pub fn deregister( origin: <T as Config>::RuntimeOrigin, ) -> Result<(), DispatchError>
Deregister
relayer.
After this call, message delivery transactions of the relayer won’t get any priority boost.
Sourcepub fn claim_rewards_to(
origin: <T as Config>::RuntimeOrigin,
reward_kind: <T as Config<I>>::Reward,
beneficiary: <<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary,
) -> Result<(), DispatchError>
pub fn claim_rewards_to( origin: <T as Config>::RuntimeOrigin, reward_kind: <T as Config<I>>::Reward, beneficiary: <<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary, ) -> Result<(), DispatchError>
Claim accumulated rewards and send them to the alternative beneficiary.
Source§impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
Sourcepub fn registered_relayer(
relayer: &<T as Config>::AccountId,
) -> Option<Registration<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <T as Config<I>>::Balance>>
pub fn registered_relayer( relayer: &<T as Config>::AccountId, ) -> Option<Registration<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <T as Config<I>>::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 as Config>::AccountId) -> bool
pub fn is_registration_active(relayer: &<T as Config>::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 as Config>::AccountId,
slash_destination: impl IdentifyAccount<AccountId = <T as Config>::AccountId>,
)
pub fn slash_and_deregister( relayer: &<T as Config>::AccountId, slash_destination: impl IdentifyAccount<AccountId = <T as Config>::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, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
<<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary: From<<T as Config>::AccountId>,
impl<T, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
<<T as Config<I>>::PaymentProcedure as PaymentProcedure<<T as Config>::AccountId, <T as Config<I>>::Reward, <T as Config<I>>::RewardBalance>>::Beneficiary: From<<T as Config>::AccountId>,
type RuntimeCall = Call<T, I>
Source§impl<T, I> DispatchViewFunction for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> DispatchViewFunction for Pallet<T, I>where
T: Config<I>,
I: 'static,
fn dispatch_view_function<O>(
id: &ViewFunctionId,
input: &mut &[u8],
output: &mut O,
) -> Result<(), ViewFunctionDispatchError>where
O: Output,
Source§impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::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, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
Hooks::on_finalize
.Source§impl<T, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_genesis()
fn on_genesis()
Source§impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Hooks::on_initialize
.Source§impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Hooks::pre_upgrade
.Source§fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
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, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I, Reward, RewardBalance> RewardLedger<<T as Config>::AccountId, Reward, RewardBalance> for Pallet<T, I>
impl<T, I, 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 as Config>::AccountId,
reward: Reward,
reward_balance: RewardBalance,
)
fn register_reward( relayer: &<T as Config>::AccountId, reward: Reward, reward_balance: RewardBalance, )
Source§impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
fn storage_info() -> Vec<StorageInfo>
Source§impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> ViewFunctionIdPrefix for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> ViewFunctionIdPrefix for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
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.