mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 13:38:35 +00:00
12 lines
281 B
Go
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
|
|
}
|