db_init

Function db_init 

Source
pub fn db_init(
    contract_id: ContractId,
    db_name: &str,
) -> GenericResult<DbHandle>
Expand description

Create a new on-chain database instance for the given contract. A contract is only able to create a db for itself.

Returns a DbHandle which provides methods for reading and writing.

ยงPermissions

  • ContractSection::Deploy