gear
gear copied to clipboard
Method `inject2` in wasm-instrument
Problem to Solve
The method should inject two globals - gas_counter & gas_allowance and an internal function (export) - gas. The function charges gas for execution and calls imported function(s) - out_of_gas/out_of_allowance - if there is no enough gas/allowance to reduce from. The original binary instrumented with calls to the internal function gas.
Possible Solution
Notes
No response