- Struct
GasScheduleUpdated
- Struct
GasEntry
- Resource
GasSchedule
- Struct
GasScheduleConfig
- Constants
- Function
initial_max_gas_amount
- Function
max_gas_amount
- Function
genesis_init
- Function
new_gas_schedule_config
- Function
new_gas_entry
- Function
update_gas_schedule
- Function
gas_schedule
- Function
gas_schedule_max_gas_amount
- Function
gas_schedule_version
- Function
gas_schedule_entries
use 0x1::string;
use 0x2::bcs;
use 0x2::core_addresses;
use 0x2::object;
use 0x2::signer;
use 0x2::tx_context;
struct GasScheduleUpdated has copy, drop, store
#[data_struct]
struct GasEntry has copy, drop, store
struct GasSchedule has key
#[data_struct]
struct GasScheduleConfig has copy, drop, store
const ErrorInvalidGasScheduleEntries: u64 = 1;
The initial max gas amount from genesis.
const InitialMaxGasAmount: u64 = 1000000000;
The max gas amount of the transaction. This const can be changed via framework upgrade. We use const other than the GasScheduleConfig for the performance.
const MaxGasAmount: u64 = 1000000000;
public fun initial_max_gas_amount(): u64
public fun max_gas_amount(): u64
public(friend) fun genesis_init(gas_schedule_config: gas_schedule::GasScheduleConfig)
public fun new_gas_schedule_config(max_gas_amount: u64, entries: vector<gas_schedule::GasEntry>): gas_schedule::GasScheduleConfig
public fun new_gas_entry(key: string::String, val: u64): gas_schedule::GasEntry
public fun update_gas_schedule(account: &signer, gas_schedule_config: vector<u8>)
public fun gas_schedule(): &gas_schedule::GasSchedule
This function will deprecated in the future, please use max_gas_amount()
instead.
public fun gas_schedule_max_gas_amount(schedule: &gas_schedule::GasSchedule): u64
public fun gas_schedule_version(schedule: &gas_schedule::GasSchedule): u64
public fun gas_schedule_entries(schedule: &gas_schedule::GasSchedule): &vector<gas_schedule::GasEntry>