61 lines
1.9 KiB
Go
61 lines
1.9 KiB
Go
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
|
|
|
|
// Package nft contains RPC wrappers for NeoFS Object NFT contract.
|
|
package nft
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/nep11"
|
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/nep22"
|
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/nep24"
|
|
"github.com/nspcc-dev/neo-go/pkg/rpcclient/nep31"
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
)
|
|
|
|
// NEP22Contract is an alias for nep22.Contract.
|
|
type NEP22Contract = nep22.Contract
|
|
|
|
// NEP31Contract is an alias for nep31.Contract.
|
|
type NEP31Contract = nep31.Contract
|
|
|
|
// Invoker is used by ContractReader to call various safe methods.
|
|
type Invoker interface {
|
|
nep11.Invoker
|
|
}
|
|
|
|
// Actor is used by Contract to call state-changing methods.
|
|
type Actor interface {
|
|
Invoker
|
|
|
|
nep11.Actor
|
|
}
|
|
|
|
// ContractReader implements safe contract methods.
|
|
type ContractReader struct {
|
|
nep11.DivisibleReader
|
|
nep24.RoyaltyReader
|
|
invoker Invoker
|
|
hash util.Uint160
|
|
}
|
|
|
|
// Contract implements all contract methods.
|
|
type Contract struct {
|
|
ContractReader
|
|
nep11.DivisibleWriter
|
|
NEP22Contract
|
|
NEP31Contract
|
|
actor Actor
|
|
hash util.Uint160
|
|
}
|
|
|
|
// NewReader creates an instance of ContractReader using provided contract hash and the given Invoker.
|
|
func NewReader(invoker Invoker, hash util.Uint160) *ContractReader {
|
|
return &ContractReader{*nep11.NewDivisibleReader(invoker, hash), *nep24.NewRoyaltyReader(invoker, hash), invoker, hash}
|
|
}
|
|
|
|
// New creates an instance of Contract using provided contract hash and the given Actor.
|
|
func New(actor Actor, hash util.Uint160) *Contract {
|
|
var nep11dt = nep11.NewDivisible(actor, hash)
|
|
var nep24t = nep24.NewRoyaltyReader(actor, hash)
|
|
return &Contract{ContractReader{nep11dt.DivisibleReader, *nep24t, actor, hash}, nep11dt.DivisibleWriter, NEP22Contract(*nep22.NewContract(actor, hash)), NEP31Contract(*nep31.NewContract(actor, hash)), actor, hash}
|
|
}
|