github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/rpcclient/gas/gas.go (about) 1 /* 2 Package gas provides a convenience wrapper for GAS contract to use it via RPC. 3 4 GAS itself only has standard NEP-17 methods, so this package only contains its 5 hash and allows to create NEP-17 structures in an easier way. Refer to [nep17] 6 package for more details on NEP-17 interface. 7 */ 8 package gas 9 10 import ( 11 "github.com/nspcc-dev/neo-go/pkg/core/native/nativehashes" 12 "github.com/nspcc-dev/neo-go/pkg/rpcclient/nep17" 13 ) 14 15 // Hash stores the hash of the native GAS contract. 16 var Hash = nativehashes.GasToken 17 18 // NewReader creates a NEP-17 reader for the GAS contract. 19 func NewReader(invoker nep17.Invoker) *nep17.TokenReader { 20 return nep17.NewReader(invoker, Hash) 21 } 22 23 // New creates a NEP-17 contract instance for the native GAS contract. 24 func New(actor nep17.Actor) *nep17.Token { 25 return nep17.New(actor, Hash) 26 }