multiversx-chain-vm 0.22.1

MultiversX VM implementation and tooling
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[derive(Clone, Default, Debug, PartialEq)]
pub enum GasUsed {
    #[default]
    Unknown,
    SomeGas(u64),
    AllGas(u64),
}

impl GasUsed {
    pub fn as_u64(&self) -> u64 {
        match self {
            GasUsed::Unknown => 0,
            GasUsed::SomeGas(gas) => *gas,
            GasUsed::AllGas(gas) => *gas,
        }
    }
}