pub struct Database { /* private fields */ }

Implementations§

Get the current block at the head of the chain.

Iterates over a KV mapping of [address + block height + tx idx] => transaction id. This allows for efficient lookup of transaction ids associated with an address, sorted by block age and ordering within a block. The cursor tracks the [block height + tx idx] for pagination purposes.

Trait Implementations§

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Fetch previously committed block at given height.
Fetch the current block height.

Implement ChainConfigDb so that Database can be passed to StateConfig's generate_state_config() method

Returns all unspent coin configs available in the database.
Returns alive contract configs available in the database.
Returns all unspent message configs available in the database.
Returns the last available block height.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Implemented to satisfy: GenesisCommitment for ContractRef<&'a mut Database>

Returns the reference to the Database instance.
Returns the mutable reference to the Database instance.
Formats the value using the given formatter. Read more

Construct an ephemeral database uses rocksdb when rocksdb features are enabled uses in-memory when rocksdb features are disabled

Returns the “default value” for a type. Read more
Executes the block and returns the result of execution with uncommitted database transaction.
Executes the block without committing it to the database. During execution collects the receipts to return them. The utxo_validation field can be used to disable the validation of utxos during execution.
Executes the block and returns the result of execution with uncommitted database transaction.
Executes the block without committing it to the database. During execution collects the receipts to return them. The utxo_validation field can be used to disable the validation of utxos during execution.
Converts to this type from the input type.
Return the merkle root of the stored Type in the storage. Read more
Return the merkle root of the stored Type in the storage. Read more
current best block number
set finalized da height that represent last block from da layer that got finalized.
Assume it is always set as initialization of database.
Get the last fuel block height that was published to the da layer.
Set the last fuel block height that was published to the da layer.
Add bridge message to database. Messages are not revertible.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Retrieve Cow<Value> such as Key->Value.
Return true if there is a Key mapping to a value in the storage.
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
Append Key->Value mapping to the storage. Read more
Remove Key->Value mapping from the storage. Read more
  • SAFETY: we are safe to do it because DataSource is Send+Sync and there is nowhere it is overwritten it is not Send+Sync by default because Storage insert fn takes &mut self

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more