Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTransactionTooLarge = errors.New("transaction/script size limit exceeded")
Functions ¶
Types ¶
type Invoker ¶
type Invoker interface { Run([]byte) (*result.Invoke, error) Call(contract util.Uint160, method string, params ...any) (*result.Invoke, error) TraverseIterator(sessionID uuid.UUID, iterator *result.Iterator, num int) ([]stackitem.Item, error) TerminateSession(sessionID uuid.UUID) error }
Invoker is a subset of methods provided by struct invoker.Invoker. The subset contains only those methods that are used by ActorWrapper and clients of the contracts.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction allows to invoke several contract method at once.
func NewTransaction ¶
func NewTransaction(contractHash util.Uint160) *Transaction
NewTransaction creates new transaction to accumulate contract invocations.
func (Transaction) Bytes ¶
func (t Transaction) Bytes() ([]byte, error)
Bytes returns the resulting buffer and makes future writes return an error.
func (Transaction) WrapCall ¶
func (t Transaction) WrapCall(method string, args []any) error
WrapCall accept methods and arguments to invoke. Should be used with method on clients like Client.MethodNameCall.
func (Transaction) WrapCallErr ¶
func (t Transaction) WrapCallErr(method string, args []any, err error) error
WrapCallErr accept methods, arguments and error to handle and invoke. Should be used with method on clients like *CallErr.
type Waiter ¶ added in v0.21.0
type Waiter struct {
// contains filtered or unexported fields
}
Waiter is a decorator on top of the standard waiter.Waiter. It provides additional behavior (controlled by WaiterOptions) on top of the standard functionality of awaiting transactions.
func NewWaiter ¶ added in v0.21.0
func NewWaiter(waiter waiter.Waiter, options WaiterOptions) *Waiter
NewWaiter decorates the specified waiter in a new Waiter instance.
type WaiterOptions ¶ added in v0.21.0
type WaiterOptions struct { // IgnoreAlreadyExistsError controls behavior for "already exists" error: // - If set to true, it indicates that "already exists" error is not a problem, we should // wait for transaction as usual (this is the behavior of neo-go [waiter.PollingBased]). // - If set to false, it indicates that "already exists" should be reported as an error. IgnoreAlreadyExistsError bool // VerifyExecResults controls whether waiter should ensure that transaction successfully // enters blockchain block. VerifyExecResults bool }