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