neo-go/pkg/core/interop/runtime/util.go
2020-06-17 11:24:11 +03:00

12 lines
281 B
Go

package runtime
import (
"github.com/nspcc-dev/neo-go/pkg/core/interop"
"github.com/nspcc-dev/neo-go/pkg/vm"
)
// GasLeft returns remaining amount of GAS.
func GasLeft(_ *interop.Context, v *vm.VM) error {
v.Estack().PushVal(int64(v.GasLimit - v.GasConsumed()))
return nil
}