aergo
aergo copied to clipboard
add contract.gasLeft()
This PR adds the contract.gasLeft()
function to retrieve the remaining gas in the contract execution
Closes #239
There is a problem though:
The lua_pushinteger()
function accepts a value of type lua_Integer
, that is signed int64, and the lua_gasget()
function returns an unsigned int64
So if the value of gas is too big, it may appear for the Lua code as a negative value (to be tested)