Trait casper_types::mint::StorageProvider[][src]

pub trait StorageProvider {
    fn new_uref<T: CLTyped + ToBytes>(&mut self, init: T) -> Result<URef, Error>;
fn write_balance_entry(
        &mut self,
        purse_uref: URef,
        balance_uref: URef
    ) -> Result<(), Error>;
fn read_balance_entry(
        &mut self,
        purse_uref: &URef
    ) -> Result<Option<Key>, Error>;
fn read<T: CLTyped + FromBytes>(
        &mut self,
        uref: URef
    ) -> Result<Option<T>, Error>;
fn write<T: CLTyped + ToBytes>(
        &mut self,
        uref: URef,
        value: T
    ) -> Result<(), Error>;
fn add<T: CLTyped + ToBytes>(
        &mut self,
        uref: URef,
        value: T
    ) -> Result<(), Error>; }

Provides functionality of a contract storage.

Required methods

fn new_uref<T: CLTyped + ToBytes>(&mut self, init: T) -> Result<URef, Error>[src]

Create new URef.

fn write_balance_entry(
    &mut self,
    purse_uref: URef,
    balance_uref: URef
) -> Result<(), Error>
[src]

Write data to a local key.

fn read_balance_entry(
    &mut self,
    purse_uref: &URef
) -> Result<Option<Key>, Error>
[src]

Read data from a local key.

fn read<T: CLTyped + FromBytes>(
    &mut self,
    uref: URef
) -> Result<Option<T>, Error>
[src]

Read data from URef.

fn write<T: CLTyped + ToBytes>(
    &mut self,
    uref: URef,
    value: T
) -> Result<(), Error>
[src]

Write data under a URef.

fn add<T: CLTyped + ToBytes>(
    &mut self,
    uref: URef,
    value: T
) -> Result<(), Error>
[src]

Add data to a URef.

Loading content...

Implementors

Loading content...