use crate::Mappable;
use fuel_core_types::{
blockchain::{
block::CompressedBlock,
consensus::Consensus,
primitives::BlockId,
},
entities::{
coin::CompressedCoin,
message::Message,
},
fuel_tx::{
Receipt,
Transaction,
TxId,
UtxoId,
},
fuel_types::{
Bytes32,
ContractId,
MessageId,
},
};
pub use fuel_vm_private::storage::{
ContractsAssets,
ContractsInfo,
ContractsRawCode,
ContractsState,
};
pub struct FuelBlocks;
impl Mappable for FuelBlocks {
type Key = Self::OwnedKey;
type OwnedKey = BlockId;
type Value = Self::OwnedValue;
type OwnedValue = CompressedBlock;
}
pub struct ContractsLatestUtxo;
impl Mappable for ContractsLatestUtxo {
type Key = Self::OwnedKey;
type OwnedKey = ContractId;
type Value = Self::OwnedValue;
type OwnedValue = UtxoId;
}
pub struct Receipts;
impl Mappable for Receipts {
type Key = Self::OwnedKey;
type OwnedKey = Bytes32;
type Value = [Receipt];
type OwnedValue = Vec<Receipt>;
}
pub struct SealedBlockConsensus;
impl Mappable for SealedBlockConsensus {
type Key = Self::OwnedKey;
type OwnedKey = BlockId;
type Value = Self::OwnedValue;
type OwnedValue = Consensus;
}
pub struct Coins;
impl Mappable for Coins {
type Key = Self::OwnedKey;
type OwnedKey = UtxoId;
type Value = Self::OwnedValue;
type OwnedValue = CompressedCoin;
}
pub struct Messages;
impl Mappable for Messages {
type Key = Self::OwnedKey;
type OwnedKey = MessageId;
type Value = Self::OwnedValue;
type OwnedValue = Message;
}
pub struct Transactions;
impl Mappable for Transactions {
type Key = Self::OwnedKey;
type OwnedKey = TxId;
type Value = Self::OwnedValue;
type OwnedValue = Transaction;
}