fuel_core/database/database_description/
gas_price.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use crate::database::database_description::DatabaseDescription;
use fuel_core_gas_price_service::common::fuel_core_storage_adapter::storage::GasPriceColumn;
use fuel_core_types::fuel_types::BlockHeight;

#[derive(Clone, Copy, Debug)]
pub struct GasPriceDatabase;

impl DatabaseDescription for GasPriceDatabase {
    type Column = GasPriceColumn;
    type Height = BlockHeight;

    fn version() -> u32 {
        0
    }

    fn name() -> String {
        "gas_price".to_string()
    }

    fn metadata_column() -> Self::Column {
        GasPriceColumn::Metadata
    }

    fn prefix(_column: &Self::Column) -> Option<usize> {
        None
    }
}