mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Single call optimized runGetMethod emulator (#920)
* TVM Emulator optimized output method * TVM Emulator single call version * Fixed tvm_emulator export, changed to tvm_emulator_emulate * Removed imports * Set C7 from outside * Removed tvm_emulator_run_get_method_optimized * Renamed tvm_emulator_emulate to tvm_emulator_emulate_run_method
This commit is contained in:
parent
200508cf8f
commit
dd5540d69e
4 changed files with 75 additions and 0 deletions
|
@ -213,6 +213,16 @@ EMULATOR_EXPORT bool tvm_emulator_set_debug_enabled(void *tvm_emulator, bool deb
|
|||
*/
|
||||
EMULATOR_EXPORT const char *tvm_emulator_run_get_method(void *tvm_emulator, int method_id, const char *stack_boc);
|
||||
|
||||
/**
|
||||
* @brief Optimized version of "run get method" with all passed parameters in a single call
|
||||
* @param len Length of params_boc buffer
|
||||
* @param params_boc BoC serialized parameters, scheme: request$_ code:^Cell data:^Cell stack:^VmStack params:^[c7:^VmStack libs:^Cell] method_id:(## 32)
|
||||
* @param gas_limit Gas limit
|
||||
* @return Char* with first 4 bytes defining length, and the rest BoC serialized result
|
||||
* Scheme: result$_ exit_code:(## 32) gas_used:(## 32) stack:^VmStack
|
||||
*/
|
||||
EMULATOR_EXPORT const char *tvm_emulator_emulate_run_method(uint32_t len, const char *params_boc, int64_t gas_limit);
|
||||
|
||||
/**
|
||||
* @brief Send external message
|
||||
* @param tvm_emulator Pointer to TVM emulator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue