From 7ed07d2dfd2a3db38c043232f93525a3b40c640e Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Thu, 7 Mar 2024 19:16:40 +0300 Subject: [PATCH] [#976] morph: Implement missing methods for `SwitchRPCGuardedActor` Signed-off-by: Anton Nikiforov --- pkg/morph/client/actor.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/morph/client/actor.go b/pkg/morph/client/actor.go index ea6bc974..8c283a67 100644 --- a/pkg/morph/client/actor.go +++ b/pkg/morph/client/actor.go @@ -1,11 +1,13 @@ package client import ( + "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/config/netmode" "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/neorpc/result" "github.com/nspcc-dev/neo-go/pkg/rpcclient/actor" "github.com/nspcc-dev/neo-go/pkg/util" + "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" ) type actorProvider interface { @@ -118,3 +120,15 @@ func (a *SwitchRPCGuardedActor) Sign(tx *transaction.Transaction) error { func (a *SwitchRPCGuardedActor) SignAndSend(tx *transaction.Transaction) (util.Uint256, uint32, error) { return a.actorProvider.GetActor().SignAndSend(tx) } + +func (a *SwitchRPCGuardedActor) CallAndExpandIterator(contract util.Uint160, method string, maxItems int, params ...any) (*result.Invoke, error) { + return a.actorProvider.GetActor().CallAndExpandIterator(contract, method, maxItems, params...) +} + +func (a *SwitchRPCGuardedActor) TerminateSession(sessionID uuid.UUID) error { + return a.actorProvider.GetActor().TerminateSession(sessionID) +} + +func (a *SwitchRPCGuardedActor) TraverseIterator(sessionID uuid.UUID, iterator *result.Iterator, num int) ([]stackitem.Item, error) { + return a.actorProvider.GetActor().TraverseIterator(sessionID, iterator, num) +}