neo-devpack-solidity 0.22.0

Production-focused Solidity-to-NeoVM compilation system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

impl ExecutionContext {
    pub(crate) fn get_opcode_name(&self, opcode: u8) -> String {
        if let Some(name) = spec::opcode_name(opcode) {
            name.to_string()
        } else {
            format!("UNKNOWN_{opcode:02X}")
        }
    }

    pub(crate) fn get_instruction_gas_cost(&self, opcode: u8) -> u64 {
        spec::opcode_gas(opcode).unwrap_or(1)
    }
}