tonpy.tvm package¶
Submodules¶
tonpy.tvm.emulator module¶
- class tonpy.tvm.emulator.Emulator(config: Cell | VmDict)¶
Bases:
object
- async aemulate_tick_tock_transaction(shard_account: Cell, is_tock: bool, unixtime: int, lt: int) bool ¶
- async aemulate_transaction(shard_account: Cell, message: Cell, unixtime: int, lt: int, force_uninit=False) bool ¶
Async function will be run in TON Scheduler
Use init_thread_scheduler to setup thread count in c++ sheduler
from tonpy.scheduler import init_thread_scheduler init_thread_scheduler(30) # will run in 30 threads
It will not lock GIL for run, all real multiprocessing will go thrue C++ level
- property elapsed_time: int¶
- emulate_transaction(shard_account: Cell, message: Cell, unixtime: int, lt: int, force_uninit=False) bool ¶
- set_debug_enabled(flag: bool) None ¶
- set_ignore_chksig(flag: bool) None ¶
- set_prev_blocks_info(prev_blocks_info: Tuple[List[BlockId], BlockId] | Tuple[List, List])¶
- set_rand_seed(seed: int | hex) None ¶
tonpy.tvm.tvm module¶
- tonpy.tvm.tvm.method_name_to_id(method_name: str)¶
- class tonpy.tvm.tvm.TVM(log_level: int = 0, code: str | Cell | None = None, data: str | Cell | None = None, allow_debug: bool = False, same_c3: bool = True, skip_c7: bool = False, enable_stack_dump=False)¶
Bases:
object
- async arun(unpack_stack=True, allow_non_success=False)¶
Async function will be run in TON Scheduler
Use init_thread_scheduler to setup thread count in c++ sheduler
from tonpy.scheduler import init_thread_scheduler init_thread_scheduler(30) # will run in 30 threads
It will not lock GIL for run, all real multiprocessing will go thrue C++ level
- clear_stack() bool ¶
- property exit_code: int¶
- exit_code_description()¶
- fetch_detailed_step_info() None ¶
- property gas_credit: int¶
- property gas_used: int¶
- set_c7(value: StackEntry | List | C7) None ¶
- set_gas_limit(gas_limit=0, gas_max=-1) bool ¶
- set_unsafe_ignore_chksig(chksig: 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)¶