tonpy.tvm package

Submodules

tonpy.tvm.emulator module

class tonpy.tvm.emulator.Emulator(config: Cell | VmDict)

Bases: object

property account: Cell | CellSlice
property actions: Cell | CellSlice
property elapsed_time: int
emulate_tick_tock_transaction(shard_account: Cell, is_tock: bool, unixtime: int, lt: int) bool
emulate_transaction(shard_account: Cell, message: Cell, unixtime: int, lt: int) bool
set_debug_enabled(flag: bool) None
set_ignore_chksig(flag: bool) None
set_libs(libs: VmDict) None
set_rand_seed(seed: int | hex) None
property transaction: Cell | CellSlice

tonpy.tvm.tvm module

tonpy.tvm.tvm.method_name_to_id(method_name: str)

Compute crc for method name, to pass to TVM

class tonpy.tvm.tvm.C7(magic: int = 124711402, actions: int = 0, msgs_sent: int = 0, time: int | datetime | None = None, block_lt: int = 0, trans_lt: int = 0, rand_seed: int | str | None = None, balance_grams: int = 0, balance_extra: Cell | None = None, address: dict | Cell | None = None, global_config: Cell | None = None)

Bases: object

to_data()
class tonpy.tvm.tvm.StepInfo(stack_info)

Bases: object

gas_consumed: int = None
gas_remaining: int = None
next_op: str = None
stack: Stack = None
class tonpy.tvm.tvm.TVM(log_level: int = 0, code: Cell | None = None, data: Cell | None = None, allow_debug: bool = False, same_c3: bool = True, skip_c7: bool = False, enable_stack_dump=True)

Bases: object

property c4_updated: Cell
property c5_updated: Cell
clear_stack() bool
property code: Cell
property data: Cell
property exit_code: int
fetch_detailed_step_info() None
property gas_credit: int
property gas_used: int
run(unpack_stack=True, allow_non_success=False) Stack | List
set_c7(value: StackEntry | List | C7) None
set_gas_limit(gas_limit=0, gas_max=-1) bool
set_libs(libs: VmDict) None
set_stack(value: Stack | List) None
set_state_init(state_init: Cell) bool
property success: bool
property vm_final_state_hash: str
property vm_init_state_hash: str
property vm_steps: int
tonpy.tvm.tvm.method_name_to_id(method_name: str)

Compute crc for method name, to pass to TVM

Module contents