Struct ethcore::engines::block_reward::BlockRewardContract
source · [−]pub struct BlockRewardContract { /* private fields */ }
Expand description
A client for the block reward contract.
Implementations
sourceimpl BlockRewardContract
impl BlockRewardContract
sourcepub fn new(kind: SystemOrCodeCallKind) -> BlockRewardContract
pub fn new(kind: SystemOrCodeCallKind) -> BlockRewardContract
Create a new block reward contract client targeting the system call kind.
sourcepub fn new_from_address(address: Address) -> BlockRewardContract
pub fn new_from_address(address: Address) -> BlockRewardContract
Create a new block reward contract client targeting the contract address.
sourcepub fn new_from_code(code: Arc<Vec<u8>>) -> BlockRewardContract
pub fn new_from_code(code: Arc<Vec<u8>>) -> BlockRewardContract
Create a new block reward contract client targeting the given code.
sourcepub fn reward(
&self,
beneficiaries: &[(Address, RewardKind)],
caller: &mut SystemOrCodeCall<'_>
) -> Result<Vec<(Address, U256)>, Error>
pub fn reward(
&self,
beneficiaries: &[(Address, RewardKind)],
caller: &mut SystemOrCodeCall<'_>
) -> Result<Vec<(Address, U256)>, Error>
Calls the block reward contract with the given beneficiaries list (and associated reward kind)
and returns the reward allocation (address - value). The block reward contract must be
called by the system address so the caller
must ensure that (e.g. using
machine.execute_as_system
).
Trait Implementations
sourceimpl Debug for BlockRewardContract
impl Debug for BlockRewardContract
sourceimpl PartialEq<BlockRewardContract> for BlockRewardContract
impl PartialEq<BlockRewardContract> for BlockRewardContract
sourcefn eq(&self, other: &BlockRewardContract) -> bool
fn eq(&self, other: &BlockRewardContract) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BlockRewardContract) -> bool
fn ne(&self, other: &BlockRewardContract) -> bool
This method tests for !=
.
impl StructuralPartialEq for BlockRewardContract
Auto Trait Implementations
impl RefUnwindSafe for BlockRewardContract
impl Send for BlockRewardContract
impl Sync for BlockRewardContract
impl Unpin for BlockRewardContract
impl UnwindSafe for BlockRewardContract
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more