pub struct DistributionKeeper {}
Expand description
A structure representing a default distribution keeper.
This module likely manages the distribution of rewards and fees within the blockchain network. It could handle tasks like distributing block rewards to validators and delegators, and managing community funding mechanisms.
Implementations§
source§impl DistributionKeeper
impl DistributionKeeper
sourcepub fn remove_rewards(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
block: &BlockInfo,
delegator: &Addr,
validator: &str,
) -> AnyResult<Uint128>
pub fn remove_rewards( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, delegator: &Addr, validator: &str, ) -> AnyResult<Uint128>
Removes all rewards from the given (delegator, validator) pair and returns the amount
sourcepub fn get_withdraw_address(
storage: &dyn Storage,
delegator: &Addr,
) -> AnyResult<Addr>
pub fn get_withdraw_address( storage: &dyn Storage, delegator: &Addr, ) -> AnyResult<Addr>
Returns the withdrawal address for specified delegator.
sourcepub fn set_withdraw_address(
storage: &mut dyn Storage,
delegator: &Addr,
withdraw_addr: &Addr,
) -> AnyResult<()>
pub fn set_withdraw_address( storage: &mut dyn Storage, delegator: &Addr, withdraw_addr: &Addr, ) -> AnyResult<()>
Sets (changes) the withdraw address of the delegator.
Trait Implementations§
source§impl Default for DistributionKeeper
impl Default for DistributionKeeper
source§fn default() -> DistributionKeeper
fn default() -> DistributionKeeper
Returns the “default value” for a type. Read more
source§impl Module for DistributionKeeper
impl Module for DistributionKeeper
source§type ExecT = DistributionMsg
type ExecT = DistributionMsg
Type of messages processed by the module instance.
source§fn execute<ExecC: CustomMsg, QueryC: CustomQuery>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
msg: DistributionMsg,
) -> AnyResult<AppResponse>
fn execute<ExecC: CustomMsg, QueryC: CustomQuery>( &self, api: &dyn Api, storage: &mut dyn Storage, router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, block: &BlockInfo, sender: Addr, msg: DistributionMsg, ) -> AnyResult<AppResponse>
Runs any ExecT message,
which can be called by any external actor or smart contract.
source§fn query(
&self,
_api: &dyn Api,
_storage: &dyn Storage,
_querier: &dyn Querier,
_block: &BlockInfo,
_request: Empty,
) -> AnyResult<Binary>
fn query( &self, _api: &dyn Api, _storage: &dyn Storage, _querier: &dyn Querier, _block: &BlockInfo, _request: Empty, ) -> AnyResult<Binary>
Runs any QueryT message,
which can be called by any external actor or smart contract.
source§fn sudo<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_msg: Empty,
) -> AnyResult<AppResponse>
fn sudo<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _msg: Empty, ) -> AnyResult<AppResponse>
Runs privileged actions, like minting tokens, or governance proposals.
This allows modules to have full access to these privileged actions,
that cannot be triggered by smart contracts. Read more
source§fn ibc_channel_open<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcChannelOpenMsg,
) -> AnyResult<IbcChannelOpenResponse>
fn ibc_channel_open<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcChannelOpenMsg, ) -> AnyResult<IbcChannelOpenResponse>
Executes the contract ibc_channel_open endpoint
source§fn ibc_channel_connect<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcChannelConnectMsg,
) -> AnyResult<AppIbcBasicResponse>
fn ibc_channel_connect<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcChannelConnectMsg, ) -> AnyResult<AppIbcBasicResponse>
Executes the contract ibc_channel_connect endpoint
source§fn ibc_channel_close<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcChannelCloseMsg,
) -> AnyResult<AppIbcBasicResponse>
fn ibc_channel_close<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcChannelCloseMsg, ) -> AnyResult<AppIbcBasicResponse>
Executes the contract ibc_channel_close endpoints
source§fn ibc_packet_receive<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcPacketReceiveMsg,
) -> AnyResult<AppIbcReceiveResponse>
fn ibc_packet_receive<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcPacketReceiveMsg, ) -> AnyResult<AppIbcReceiveResponse>
Executes the contract ibc_packet_receive endpoint
source§fn ibc_packet_acknowledge<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcPacketAckMsg,
) -> AnyResult<AppIbcBasicResponse>
fn ibc_packet_acknowledge<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcPacketAckMsg, ) -> AnyResult<AppIbcBasicResponse>
Executes the contract ibc_packet_acknowledge endpoint
source§fn ibc_packet_timeout<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_request: IbcPacketTimeoutMsg,
) -> AnyResult<AppIbcBasicResponse>
fn ibc_packet_timeout<ExecC, QueryC>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, _request: IbcPacketTimeoutMsg, ) -> AnyResult<AppIbcBasicResponse>
Executes the contract ibc_packet_timeout endpoint
impl Distribution for DistributionKeeper
Auto Trait Implementations§
impl Freeze for DistributionKeeper
impl RefUnwindSafe for DistributionKeeper
impl Send for DistributionKeeper
impl Sync for DistributionKeeper
impl Unpin for DistributionKeeper
impl UnwindSafe for DistributionKeeper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more