Skip to content

Latest commit

 

History

History
224 lines (98 loc) · 6.65 KB

gas_schedule.md

File metadata and controls

224 lines (98 loc) · 6.65 KB

Module 0x2::gas_schedule

Struct GasScheduleUpdated

struct GasScheduleUpdated has copy, drop, store

Struct GasEntry

#[data_struct]
struct GasEntry has copy, drop, store

Resource GasSchedule

struct GasSchedule has key

Struct GasScheduleConfig

#[data_struct]
struct GasScheduleConfig has copy, drop, store

Constants

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;

Function initial_max_gas_amount

public fun initial_max_gas_amount(): u64

Function max_gas_amount

public fun max_gas_amount(): u64

Function genesis_init

public(friend) fun genesis_init(gas_schedule_config: gas_schedule::GasScheduleConfig)

Function new_gas_schedule_config

Function new_gas_entry

Function update_gas_schedule

public fun update_gas_schedule(account: &signer, gas_schedule_config: vector<u8>)

Function gas_schedule

Function gas_schedule_max_gas_amount

This function will deprecated in the future, please use max_gas_amount() instead.

Function gas_schedule_version

public fun gas_schedule_version(schedule: &gas_schedule::GasSchedule): u64

Function gas_schedule_entries