mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-10-17 09:46:24 +00:00
13 lines
281 B
Go
13 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
|
||
|
}
|