Trait forest_filecoin::shim::fvm_latest::kernel::prelude::SelfOps
source · pub trait SelfOps: IpldBlockOps {
// Required methods
fn root(&mut self) -> Result<Cid<64>, ExecutionError>;
fn set_root(&mut self, root: Cid<64>) -> Result<(), ExecutionError>;
fn current_balance(&self) -> Result<TokenAmount, ExecutionError>;
fn self_destruct(
&mut self,
burn_unspent: bool,
) -> Result<(), ExecutionError>;
}
Expand description
Actor state access and manipulation. Depends on BlockOps to read and write blocks in the state tree.
Required Methods§
sourcefn root(&mut self) -> Result<Cid<64>, ExecutionError>
fn root(&mut self) -> Result<Cid<64>, ExecutionError>
Get the state root.
sourcefn set_root(&mut self, root: Cid<64>) -> Result<(), ExecutionError>
fn set_root(&mut self, root: Cid<64>) -> Result<(), ExecutionError>
Update the state-root.
This method will fail if the new state-root isn’t reachable.
sourcefn current_balance(&self) -> Result<TokenAmount, ExecutionError>
fn current_balance(&self) -> Result<TokenAmount, ExecutionError>
The balance of the receiver.
sourcefn self_destruct(&mut self, burn_unspent: bool) -> Result<(), ExecutionError>
fn self_destruct(&mut self, burn_unspent: bool) -> Result<(), ExecutionError>
Deletes the executing actor from the state tree, burning any remaining balance if requested.