diff --git a/.mockery.yml b/.mockery.yml index 3aaef5fe5..e604433af 100644 --- a/.mockery.yml +++ b/.mockery.yml @@ -140,14 +140,23 @@ packages: interfaces: AptosRpcClient: TransactionSigner: - github.com/block-vision/sui-go-sdk/sui: + github.com/smartcontractkit/chainlink-sui/relayer/client: config: all: false pkgname: "mocks" dir: "chain/sui/mocks" filename: "{{.InterfaceName | snakecase}}.go" interfaces: - ISuiAPI: + BindingsClient: + SuiPTBClient: + github.com/smartcontractkit/chainlink-sui/bindings/utils: + config: + all: false + pkgname: "mocks" + dir: "chain/sui/mocks" + filename: "{{.InterfaceName | snakecase}}.go" + interfaces: + SuiSigner: github.com/xssnick/tonutils-go/ton: config: all: false diff --git a/chain/mcms/adapters/chain_access.go b/chain/mcms/adapters/chain_access.go index 9ca63fa8b..05472554a 100644 --- a/chain/mcms/adapters/chain_access.go +++ b/chain/mcms/adapters/chain_access.go @@ -2,7 +2,6 @@ package adapters import ( aptoslib "github.com/aptos-labs/aptos-go-sdk" - "github.com/block-vision/sui-go-sdk/sui" "github.com/ethereum/go-ethereum/accounts/abi/bind" sol "github.com/gagliardetto/solana-go" solrpc "github.com/gagliardetto/solana-go/rpc" @@ -13,6 +12,8 @@ import ( "github.com/xssnick/tonutils-go/ton" tonwallet "github.com/xssnick/tonutils-go/ton/wallet" + cslclient "github.com/smartcontractkit/chainlink-sui/relayer/client" + "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldfaptos "github.com/smartcontractkit/chainlink-deployments-framework/chain/aptos" cldfcanton "github.com/smartcontractkit/chainlink-deployments-framework/chain/canton" @@ -101,7 +102,7 @@ func (a *ChainAccessAdapter) AptosSigner(selector uint64) (aptoslib.TransactionS } // SuiClient returns the Sui API client for the given selector. -func (a *ChainAccessAdapter) SuiClient(selector uint64) (sui.ISuiAPI, bool) { +func (a *ChainAccessAdapter) SuiClient(selector uint64) (cslclient.BindingsClient, bool) { ch, ok := a.inner.SuiChains()[selector] if !ok { return nil, false diff --git a/chain/mcms/adapters/chain_access_test.go b/chain/mcms/adapters/chain_access_test.go index fa0816533..210c05472 100644 --- a/chain/mcms/adapters/chain_access_test.go +++ b/chain/mcms/adapters/chain_access_test.go @@ -58,10 +58,6 @@ func TestChainAccess_UnknownSelector(t *testing.T) { require.False(t, ok) require.Nil(t, suiClient) - suiSigner, ok := a.SuiSigner(999) - require.False(t, ok) - require.Nil(t, suiSigner) - tonClient, ok := a.TonClient(999) require.False(t, ok) require.Nil(t, tonClient) @@ -94,8 +90,8 @@ func TestChainAccess_SelectorsAndLookups(t *testing.T) { aptosSigner := aptosmocks.NewMockTransactionSigner(t) solClient := solrpc.New("http://example.invalid") solSigner := &sol.PrivateKey{1, 2, 3} - suiClient := suimocks.NewMockISuiAPI(t) - suiSigner, _ := chainsui.NewSignerFromSeed(make([]byte, 32)) + suiClient := suimocks.NewMockSuiPTBClient(t) + suiSigner := suimocks.NewMockSuiSigner(t) tonClient := tonmocks.NewMockAPIClientWrapped(t) tonSigner := &tonwallet.Wallet{} diff --git a/chain/sui/client.go b/chain/sui/client.go new file mode 100644 index 000000000..819b61c0e --- /dev/null +++ b/chain/sui/client.go @@ -0,0 +1,58 @@ +package sui + +import ( + "fmt" + "net/url" + "strings" + "time" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + + cslclient "github.com/smartcontractkit/chainlink-sui/relayer/client" +) + +const defaultGrpcToken = "test" + +// NewPTBClientFromNodeURL creates a gRPC-backed Sui PTB client from an HTTP RPC URL. +func NewPTBClientFromNodeURL(log logger.Logger, nodeURL string, grpcToken string) (cslclient.SuiPTBClient, error) { + grpcTarget, err := grpcTargetFromNodeURL(nodeURL) + if err != nil { + return nil, err + } + if grpcToken == "" { + grpcToken = defaultGrpcToken + } + + return cslclient.NewPTBClient(log, cslclient.PTBClientConfig{ + GrpcTarget: grpcTarget, + GrpcToken: grpcToken, + TransactionTimeout: 30 * time.Second, + MaxConcurrentRequests: 50, + DefaultRequestType: cslclient.WaitForEffectsCert, + }) +} + +func grpcTargetFromNodeURL(nodeURL string) (string, error) { + u, err := url.Parse(nodeURL) + if err != nil { + return "", fmt.Errorf("parse node URL %q: %w", nodeURL, err) + } + host := u.Hostname() + port := u.Port() + if host == "" { + return "", fmt.Errorf("node URL %q has no host", nodeURL) + } + if port == "" { + switch u.Scheme { + case "https": + port = "443" + default: + port = "9000" + } + } + if strings.Contains(host, ":") && !strings.HasPrefix(host, "[") { + return fmt.Sprintf("[%s]:%s", host, port), nil + } + + return fmt.Sprintf("%s:%s", host, port), nil +} diff --git a/chain/sui/client_test.go b/chain/sui/client_test.go new file mode 100644 index 000000000..f6580d2c5 --- /dev/null +++ b/chain/sui/client_test.go @@ -0,0 +1,103 @@ +package sui + +import ( + "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestGrpcTargetFromNodeURL(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + nodeURL string + want string + wantErr string + }{ + { + name: "host with explicit port", + nodeURL: "http://127.0.0.1:9000", + want: "127.0.0.1:9000", + }, + { + name: "http scheme defaults to port 9000", + nodeURL: "http://example.com", + want: "example.com:9000", + }, + { + name: "https scheme defaults to port 443", + nodeURL: "https://example.com", + want: "example.com:443", + }, + { + name: "ipv6 host with port gets bracketed", + nodeURL: "http://[::1]:9000", + want: "[::1]:9000", + }, + { + name: "ipv6 host without port gets bracketed and defaulted", + nodeURL: "http://[::1]", + want: "[::1]:9000", + }, + { + name: "invalid URL returns error", + nodeURL: "http://\x7f", + wantErr: "parse node URL", + }, + { + name: "missing host returns error", + nodeURL: "http:///path", + wantErr: "has no host", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + got, err := grpcTargetFromNodeURL(tt.nodeURL) + if tt.wantErr != "" { + require.Error(t, err) + assert.Contains(t, err.Error(), tt.wantErr) + + return + } + require.NoError(t, err) + assert.Equal(t, tt.want, got) + }) + } +} + +func TestNewPTBClientFromNodeURL(t *testing.T) { + t.Parallel() + + log, err := logger.New() + require.NoError(t, err) + + t.Run("valid URL with empty token uses default", func(t *testing.T) { + t.Parallel() + + client, err := NewPTBClientFromNodeURL(log, "http://127.0.0.1:9000", "") + require.NoError(t, err) + require.NotNil(t, client) + }) + + t.Run("valid URL with explicit token", func(t *testing.T) { + t.Parallel() + + client, err := NewPTBClientFromNodeURL(log, "http://127.0.0.1:9000", "my-token") + require.NoError(t, err) + require.NotNil(t, client) + }) + + t.Run("invalid URL returns error", func(t *testing.T) { + t.Parallel() + + client, err := NewPTBClientFromNodeURL(log, "http://\x7f", "") + require.Error(t, err) + require.Nil(t, client) + }) +} diff --git a/chain/sui/mocks/bindings_client.go b/chain/sui/mocks/bindings_client.go new file mode 100644 index 000000000..b621f21a8 --- /dev/null +++ b/chain/sui/mocks/bindings_client.go @@ -0,0 +1,529 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "math/big" + + "github.com/block-vision/sui-go-sdk/pb/sui/rpc/v2" + "github.com/block-vision/sui-go-sdk/signer" + "github.com/block-vision/sui-go-sdk/transaction" + "github.com/smartcontractkit/chainlink-sui/relayer/client" + mock "github.com/stretchr/testify/mock" +) + +// NewMockBindingsClient creates a new instance of MockBindingsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockBindingsClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBindingsClient { + mock := &MockBindingsClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockBindingsClient is an autogenerated mock type for the BindingsClient type +type MockBindingsClient struct { + mock.Mock +} + +type MockBindingsClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBindingsClient) EXPECT() *MockBindingsClient_Expecter { + return &MockBindingsClient_Expecter{mock: &_m.Mock} +} + +// FinishPTBAndSend provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) FinishPTBAndSend(ctx context.Context, signer1 *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error) { + ret := _mock.Called(ctx, signer1, tx, requestType) + + if len(ret) == 0 { + panic("no return value specified for FinishPTBAndSend") + } + + var r0 *v2.ExecuteTransactionResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error)); ok { + return returnFunc(ctx, signer1, tx, requestType) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) *v2.ExecuteTransactionResponse); ok { + r0 = returnFunc(ctx, signer1, tx, requestType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.ExecuteTransactionResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) error); ok { + r1 = returnFunc(ctx, signer1, tx, requestType) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_FinishPTBAndSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishPTBAndSend' +type MockBindingsClient_FinishPTBAndSend_Call struct { + *mock.Call +} + +// FinishPTBAndSend is a helper method to define mock.On call +// - ctx context.Context +// - signer1 *signer.Signer +// - tx *transaction.Transaction +// - requestType client.TransactionRequestType +func (_e *MockBindingsClient_Expecter) FinishPTBAndSend(ctx interface{}, signer1 interface{}, tx interface{}, requestType interface{}) *MockBindingsClient_FinishPTBAndSend_Call { + return &MockBindingsClient_FinishPTBAndSend_Call{Call: _e.mock.On("FinishPTBAndSend", ctx, signer1, tx, requestType)} +} + +func (_c *MockBindingsClient_FinishPTBAndSend_Call) Run(run func(ctx context.Context, signer1 *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType)) *MockBindingsClient_FinishPTBAndSend_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *signer.Signer + if args[1] != nil { + arg1 = args[1].(*signer.Signer) + } + var arg2 *transaction.Transaction + if args[2] != nil { + arg2 = args[2].(*transaction.Transaction) + } + var arg3 client.TransactionRequestType + if args[3] != nil { + arg3 = args[3].(client.TransactionRequestType) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockBindingsClient_FinishPTBAndSend_Call) Return(executeTransactionResponse *v2.ExecuteTransactionResponse, err error) *MockBindingsClient_FinishPTBAndSend_Call { + _c.Call.Return(executeTransactionResponse, err) + return _c +} + +func (_c *MockBindingsClient_FinishPTBAndSend_Call) RunAndReturn(run func(ctx context.Context, signer1 *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error)) *MockBindingsClient_FinishPTBAndSend_Call { + _c.Call.Return(run) + return _c +} + +// GetReferenceGasPrice provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) GetReferenceGasPrice(ctx context.Context) (*big.Int, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetReferenceGasPrice") + } + + var r0 *big.Int + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *big.Int); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*big.Int) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_GetReferenceGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReferenceGasPrice' +type MockBindingsClient_GetReferenceGasPrice_Call struct { + *mock.Call +} + +// GetReferenceGasPrice is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockBindingsClient_Expecter) GetReferenceGasPrice(ctx interface{}) *MockBindingsClient_GetReferenceGasPrice_Call { + return &MockBindingsClient_GetReferenceGasPrice_Call{Call: _e.mock.On("GetReferenceGasPrice", ctx)} +} + +func (_c *MockBindingsClient_GetReferenceGasPrice_Call) Run(run func(ctx context.Context)) *MockBindingsClient_GetReferenceGasPrice_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockBindingsClient_GetReferenceGasPrice_Call) Return(intParam *big.Int, err error) *MockBindingsClient_GetReferenceGasPrice_Call { + _c.Call.Return(intParam, err) + return _c +} + +func (_c *MockBindingsClient_GetReferenceGasPrice_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockBindingsClient_GetReferenceGasPrice_Call { + _c.Call.Return(run) + return _c +} + +// GetTransactionStatus provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) GetTransactionStatus(ctx context.Context, digest string) (client.TransactionResult, error) { + ret := _mock.Called(ctx, digest) + + if len(ret) == 0 { + panic("no return value specified for GetTransactionStatus") + } + + var r0 client.TransactionResult + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (client.TransactionResult, error)); ok { + return returnFunc(ctx, digest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) client.TransactionResult); ok { + r0 = returnFunc(ctx, digest) + } else { + r0 = ret.Get(0).(client.TransactionResult) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, digest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_GetTransactionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionStatus' +type MockBindingsClient_GetTransactionStatus_Call struct { + *mock.Call +} + +// GetTransactionStatus is a helper method to define mock.On call +// - ctx context.Context +// - digest string +func (_e *MockBindingsClient_Expecter) GetTransactionStatus(ctx interface{}, digest interface{}) *MockBindingsClient_GetTransactionStatus_Call { + return &MockBindingsClient_GetTransactionStatus_Call{Call: _e.mock.On("GetTransactionStatus", ctx, digest)} +} + +func (_c *MockBindingsClient_GetTransactionStatus_Call) Run(run func(ctx context.Context, digest string)) *MockBindingsClient_GetTransactionStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockBindingsClient_GetTransactionStatus_Call) Return(transactionResult client.TransactionResult, err error) *MockBindingsClient_GetTransactionStatus_Call { + _c.Call.Return(transactionResult, err) + return _c +} + +func (_c *MockBindingsClient_GetTransactionStatus_Call) RunAndReturn(run func(ctx context.Context, digest string) (client.TransactionResult, error)) *MockBindingsClient_GetTransactionStatus_Call { + _c.Call.Return(run) + return _c +} + +// QueryCoinsByAddress provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) QueryCoinsByAddress(ctx context.Context, address string, coinType string) ([]*v2.Object, error) { + ret := _mock.Called(ctx, address, coinType) + + if len(ret) == 0 { + panic("no return value specified for QueryCoinsByAddress") + } + + var r0 []*v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]*v2.Object, error)); ok { + return returnFunc(ctx, address, coinType) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []*v2.Object); ok { + r0 = returnFunc(ctx, address, coinType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, address, coinType) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_QueryCoinsByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryCoinsByAddress' +type MockBindingsClient_QueryCoinsByAddress_Call struct { + *mock.Call +} + +// QueryCoinsByAddress is a helper method to define mock.On call +// - ctx context.Context +// - address string +// - coinType string +func (_e *MockBindingsClient_Expecter) QueryCoinsByAddress(ctx interface{}, address interface{}, coinType interface{}) *MockBindingsClient_QueryCoinsByAddress_Call { + return &MockBindingsClient_QueryCoinsByAddress_Call{Call: _e.mock.On("QueryCoinsByAddress", ctx, address, coinType)} +} + +func (_c *MockBindingsClient_QueryCoinsByAddress_Call) Run(run func(ctx context.Context, address string, coinType string)) *MockBindingsClient_QueryCoinsByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockBindingsClient_QueryCoinsByAddress_Call) Return(objects []*v2.Object, err error) *MockBindingsClient_QueryCoinsByAddress_Call { + _c.Call.Return(objects, err) + return _c +} + +func (_c *MockBindingsClient_QueryCoinsByAddress_Call) RunAndReturn(run func(ctx context.Context, address string, coinType string) ([]*v2.Object, error)) *MockBindingsClient_QueryCoinsByAddress_Call { + _c.Call.Return(run) + return _c +} + +// ReadObjectId provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) ReadObjectId(ctx context.Context, objectId string) (*v2.Object, error) { + ret := _mock.Called(ctx, objectId) + + if len(ret) == 0 { + panic("no return value specified for ReadObjectId") + } + + var r0 *v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v2.Object, error)); ok { + return returnFunc(ctx, objectId) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v2.Object); ok { + r0 = returnFunc(ctx, objectId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, objectId) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_ReadObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadObjectId' +type MockBindingsClient_ReadObjectId_Call struct { + *mock.Call +} + +// ReadObjectId is a helper method to define mock.On call +// - ctx context.Context +// - objectId string +func (_e *MockBindingsClient_Expecter) ReadObjectId(ctx interface{}, objectId interface{}) *MockBindingsClient_ReadObjectId_Call { + return &MockBindingsClient_ReadObjectId_Call{Call: _e.mock.On("ReadObjectId", ctx, objectId)} +} + +func (_c *MockBindingsClient_ReadObjectId_Call) Run(run func(ctx context.Context, objectId string)) *MockBindingsClient_ReadObjectId_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockBindingsClient_ReadObjectId_Call) Return(object *v2.Object, err error) *MockBindingsClient_ReadObjectId_Call { + _c.Call.Return(object, err) + return _c +} + +func (_c *MockBindingsClient_ReadObjectId_Call) RunAndReturn(run func(ctx context.Context, objectId string) (*v2.Object, error)) *MockBindingsClient_ReadObjectId_Call { + _c.Call.Return(run) + return _c +} + +// SendTransaction provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) SendTransaction(ctx context.Context, req *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error) { + ret := _mock.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + + var r0 *v2.ExecuteTransactionResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error)); ok { + return returnFunc(ctx, req) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *v2.ExecuteTransactionRequest) *v2.ExecuteTransactionResponse); ok { + r0 = returnFunc(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.ExecuteTransactionResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *v2.ExecuteTransactionRequest) error); ok { + r1 = returnFunc(ctx, req) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction' +type MockBindingsClient_SendTransaction_Call struct { + *mock.Call +} + +// SendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - req *v2.ExecuteTransactionRequest +func (_e *MockBindingsClient_Expecter) SendTransaction(ctx interface{}, req interface{}) *MockBindingsClient_SendTransaction_Call { + return &MockBindingsClient_SendTransaction_Call{Call: _e.mock.On("SendTransaction", ctx, req)} +} + +func (_c *MockBindingsClient_SendTransaction_Call) Run(run func(ctx context.Context, req *v2.ExecuteTransactionRequest)) *MockBindingsClient_SendTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v2.ExecuteTransactionRequest + if args[1] != nil { + arg1 = args[1].(*v2.ExecuteTransactionRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockBindingsClient_SendTransaction_Call) Return(executeTransactionResponse *v2.ExecuteTransactionResponse, err error) *MockBindingsClient_SendTransaction_Call { + _c.Call.Return(executeTransactionResponse, err) + return _c +} + +func (_c *MockBindingsClient_SendTransaction_Call) RunAndReturn(run func(ctx context.Context, req *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error)) *MockBindingsClient_SendTransaction_Call { + _c.Call.Return(run) + return _c +} + +// SimulatePTB provides a mock function for the type MockBindingsClient +func (_mock *MockBindingsClient) SimulatePTB(ctx context.Context, bcsBytes []byte) ([]any, error) { + ret := _mock.Called(ctx, bcsBytes) + + if len(ret) == 0 { + panic("no return value specified for SimulatePTB") + } + + var r0 []any + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) ([]any, error)); ok { + return returnFunc(ctx, bcsBytes) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) []any); ok { + r0 = returnFunc(ctx, bcsBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]any) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { + r1 = returnFunc(ctx, bcsBytes) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockBindingsClient_SimulatePTB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimulatePTB' +type MockBindingsClient_SimulatePTB_Call struct { + *mock.Call +} + +// SimulatePTB is a helper method to define mock.On call +// - ctx context.Context +// - bcsBytes []byte +func (_e *MockBindingsClient_Expecter) SimulatePTB(ctx interface{}, bcsBytes interface{}) *MockBindingsClient_SimulatePTB_Call { + return &MockBindingsClient_SimulatePTB_Call{Call: _e.mock.On("SimulatePTB", ctx, bcsBytes)} +} + +func (_c *MockBindingsClient_SimulatePTB_Call) Run(run func(ctx context.Context, bcsBytes []byte)) *MockBindingsClient_SimulatePTB_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []byte + if args[1] != nil { + arg1 = args[1].([]byte) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockBindingsClient_SimulatePTB_Call) Return(vs []any, err error) *MockBindingsClient_SimulatePTB_Call { + _c.Call.Return(vs, err) + return _c +} + +func (_c *MockBindingsClient_SimulatePTB_Call) RunAndReturn(run func(ctx context.Context, bcsBytes []byte) ([]any, error)) *MockBindingsClient_SimulatePTB_Call { + _c.Call.Return(run) + return _c +} diff --git a/chain/sui/mocks/i_sui_api.go b/chain/sui/mocks/i_sui_api.go deleted file mode 100644 index 09273857f..000000000 --- a/chain/sui/mocks/i_sui_api.go +++ /dev/null @@ -1,3860 +0,0 @@ -// Code generated by mockery; DO NOT EDIT. -// github.com/vektra/mockery -// template: testify - -package mocks - -import ( - "context" - - "github.com/block-vision/sui-go-sdk/models" - mock "github.com/stretchr/testify/mock" -) - -// NewMockISuiAPI creates a new instance of MockISuiAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockISuiAPI(t interface { - mock.TestingT - Cleanup(func()) -}) *MockISuiAPI { - mock := &MockISuiAPI{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} - -// MockISuiAPI is an autogenerated mock type for the ISuiAPI type -type MockISuiAPI struct { - mock.Mock -} - -type MockISuiAPI_Expecter struct { - mock *mock.Mock -} - -func (_m *MockISuiAPI) EXPECT() *MockISuiAPI_Expecter { - return &MockISuiAPI_Expecter{mock: &_m.Mock} -} - -// BatchTransaction provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) BatchTransaction(ctx context.Context, req models.BatchTransactionRequest) (models.BatchTransactionResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for BatchTransaction") - } - - var r0 models.BatchTransactionResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.BatchTransactionRequest) (models.BatchTransactionResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.BatchTransactionRequest) models.BatchTransactionResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.BatchTransactionResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.BatchTransactionRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_BatchTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchTransaction' -type MockISuiAPI_BatchTransaction_Call struct { - *mock.Call -} - -// BatchTransaction is a helper method to define mock.On call -// - ctx context.Context -// - req models.BatchTransactionRequest -func (_e *MockISuiAPI_Expecter) BatchTransaction(ctx interface{}, req interface{}) *MockISuiAPI_BatchTransaction_Call { - return &MockISuiAPI_BatchTransaction_Call{Call: _e.mock.On("BatchTransaction", ctx, req)} -} - -func (_c *MockISuiAPI_BatchTransaction_Call) Run(run func(ctx context.Context, req models.BatchTransactionRequest)) *MockISuiAPI_BatchTransaction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.BatchTransactionRequest - if args[1] != nil { - arg1 = args[1].(models.BatchTransactionRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_BatchTransaction_Call) Return(batchTransactionResponse models.BatchTransactionResponse, err error) *MockISuiAPI_BatchTransaction_Call { - _c.Call.Return(batchTransactionResponse, err) - return _c -} - -func (_c *MockISuiAPI_BatchTransaction_Call) RunAndReturn(run func(ctx context.Context, req models.BatchTransactionRequest) (models.BatchTransactionResponse, error)) *MockISuiAPI_BatchTransaction_Call { - _c.Call.Return(run) - return _c -} - -// MergeCoins provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) MergeCoins(ctx context.Context, req models.MergeCoinsRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for MergeCoins") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.MergeCoinsRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.MergeCoinsRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.MergeCoinsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_MergeCoins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergeCoins' -type MockISuiAPI_MergeCoins_Call struct { - *mock.Call -} - -// MergeCoins is a helper method to define mock.On call -// - ctx context.Context -// - req models.MergeCoinsRequest -func (_e *MockISuiAPI_Expecter) MergeCoins(ctx interface{}, req interface{}) *MockISuiAPI_MergeCoins_Call { - return &MockISuiAPI_MergeCoins_Call{Call: _e.mock.On("MergeCoins", ctx, req)} -} - -func (_c *MockISuiAPI_MergeCoins_Call) Run(run func(ctx context.Context, req models.MergeCoinsRequest)) *MockISuiAPI_MergeCoins_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.MergeCoinsRequest - if args[1] != nil { - arg1 = args[1].(models.MergeCoinsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_MergeCoins_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_MergeCoins_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_MergeCoins_Call) RunAndReturn(run func(ctx context.Context, req models.MergeCoinsRequest) (models.TxnMetaData, error)) *MockISuiAPI_MergeCoins_Call { - _c.Call.Return(run) - return _c -} - -// MoveCall provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) MoveCall(ctx context.Context, req models.MoveCallRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for MoveCall") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.MoveCallRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.MoveCallRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.MoveCallRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_MoveCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MoveCall' -type MockISuiAPI_MoveCall_Call struct { - *mock.Call -} - -// MoveCall is a helper method to define mock.On call -// - ctx context.Context -// - req models.MoveCallRequest -func (_e *MockISuiAPI_Expecter) MoveCall(ctx interface{}, req interface{}) *MockISuiAPI_MoveCall_Call { - return &MockISuiAPI_MoveCall_Call{Call: _e.mock.On("MoveCall", ctx, req)} -} - -func (_c *MockISuiAPI_MoveCall_Call) Run(run func(ctx context.Context, req models.MoveCallRequest)) *MockISuiAPI_MoveCall_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.MoveCallRequest - if args[1] != nil { - arg1 = args[1].(models.MoveCallRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_MoveCall_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_MoveCall_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_MoveCall_Call) RunAndReturn(run func(ctx context.Context, req models.MoveCallRequest) (models.TxnMetaData, error)) *MockISuiAPI_MoveCall_Call { - _c.Call.Return(run) - return _c -} - -// Pay provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) Pay(ctx context.Context, req models.PayRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for Pay") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PayRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PayRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.PayRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_Pay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pay' -type MockISuiAPI_Pay_Call struct { - *mock.Call -} - -// Pay is a helper method to define mock.On call -// - ctx context.Context -// - req models.PayRequest -func (_e *MockISuiAPI_Expecter) Pay(ctx interface{}, req interface{}) *MockISuiAPI_Pay_Call { - return &MockISuiAPI_Pay_Call{Call: _e.mock.On("Pay", ctx, req)} -} - -func (_c *MockISuiAPI_Pay_Call) Run(run func(ctx context.Context, req models.PayRequest)) *MockISuiAPI_Pay_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.PayRequest - if args[1] != nil { - arg1 = args[1].(models.PayRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_Pay_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_Pay_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_Pay_Call) RunAndReturn(run func(ctx context.Context, req models.PayRequest) (models.TxnMetaData, error)) *MockISuiAPI_Pay_Call { - _c.Call.Return(run) - return _c -} - -// PayAllSui provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) PayAllSui(ctx context.Context, req models.PayAllSuiRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for PayAllSui") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PayAllSuiRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PayAllSuiRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.PayAllSuiRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_PayAllSui_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PayAllSui' -type MockISuiAPI_PayAllSui_Call struct { - *mock.Call -} - -// PayAllSui is a helper method to define mock.On call -// - ctx context.Context -// - req models.PayAllSuiRequest -func (_e *MockISuiAPI_Expecter) PayAllSui(ctx interface{}, req interface{}) *MockISuiAPI_PayAllSui_Call { - return &MockISuiAPI_PayAllSui_Call{Call: _e.mock.On("PayAllSui", ctx, req)} -} - -func (_c *MockISuiAPI_PayAllSui_Call) Run(run func(ctx context.Context, req models.PayAllSuiRequest)) *MockISuiAPI_PayAllSui_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.PayAllSuiRequest - if args[1] != nil { - arg1 = args[1].(models.PayAllSuiRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_PayAllSui_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_PayAllSui_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_PayAllSui_Call) RunAndReturn(run func(ctx context.Context, req models.PayAllSuiRequest) (models.TxnMetaData, error)) *MockISuiAPI_PayAllSui_Call { - _c.Call.Return(run) - return _c -} - -// PaySui provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) PaySui(ctx context.Context, req models.PaySuiRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for PaySui") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PaySuiRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PaySuiRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.PaySuiRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_PaySui_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PaySui' -type MockISuiAPI_PaySui_Call struct { - *mock.Call -} - -// PaySui is a helper method to define mock.On call -// - ctx context.Context -// - req models.PaySuiRequest -func (_e *MockISuiAPI_Expecter) PaySui(ctx interface{}, req interface{}) *MockISuiAPI_PaySui_Call { - return &MockISuiAPI_PaySui_Call{Call: _e.mock.On("PaySui", ctx, req)} -} - -func (_c *MockISuiAPI_PaySui_Call) Run(run func(ctx context.Context, req models.PaySuiRequest)) *MockISuiAPI_PaySui_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.PaySuiRequest - if args[1] != nil { - arg1 = args[1].(models.PaySuiRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_PaySui_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_PaySui_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_PaySui_Call) RunAndReturn(run func(ctx context.Context, req models.PaySuiRequest) (models.TxnMetaData, error)) *MockISuiAPI_PaySui_Call { - _c.Call.Return(run) - return _c -} - -// Publish provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) Publish(ctx context.Context, req models.PublishRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for Publish") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PublishRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.PublishRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.PublishRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish' -type MockISuiAPI_Publish_Call struct { - *mock.Call -} - -// Publish is a helper method to define mock.On call -// - ctx context.Context -// - req models.PublishRequest -func (_e *MockISuiAPI_Expecter) Publish(ctx interface{}, req interface{}) *MockISuiAPI_Publish_Call { - return &MockISuiAPI_Publish_Call{Call: _e.mock.On("Publish", ctx, req)} -} - -func (_c *MockISuiAPI_Publish_Call) Run(run func(ctx context.Context, req models.PublishRequest)) *MockISuiAPI_Publish_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.PublishRequest - if args[1] != nil { - arg1 = args[1].(models.PublishRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_Publish_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_Publish_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_Publish_Call) RunAndReturn(run func(ctx context.Context, req models.PublishRequest) (models.TxnMetaData, error)) *MockISuiAPI_Publish_Call { - _c.Call.Return(run) - return _c -} - -// RequestAddStake provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) RequestAddStake(ctx context.Context, req models.AddStakeRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for RequestAddStake") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.AddStakeRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.AddStakeRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.AddStakeRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_RequestAddStake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestAddStake' -type MockISuiAPI_RequestAddStake_Call struct { - *mock.Call -} - -// RequestAddStake is a helper method to define mock.On call -// - ctx context.Context -// - req models.AddStakeRequest -func (_e *MockISuiAPI_Expecter) RequestAddStake(ctx interface{}, req interface{}) *MockISuiAPI_RequestAddStake_Call { - return &MockISuiAPI_RequestAddStake_Call{Call: _e.mock.On("RequestAddStake", ctx, req)} -} - -func (_c *MockISuiAPI_RequestAddStake_Call) Run(run func(ctx context.Context, req models.AddStakeRequest)) *MockISuiAPI_RequestAddStake_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.AddStakeRequest - if args[1] != nil { - arg1 = args[1].(models.AddStakeRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_RequestAddStake_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_RequestAddStake_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_RequestAddStake_Call) RunAndReturn(run func(ctx context.Context, req models.AddStakeRequest) (models.TxnMetaData, error)) *MockISuiAPI_RequestAddStake_Call { - _c.Call.Return(run) - return _c -} - -// RequestWithdrawStake provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) RequestWithdrawStake(ctx context.Context, req models.WithdrawStakeRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for RequestWithdrawStake") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.WithdrawStakeRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.WithdrawStakeRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.WithdrawStakeRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_RequestWithdrawStake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestWithdrawStake' -type MockISuiAPI_RequestWithdrawStake_Call struct { - *mock.Call -} - -// RequestWithdrawStake is a helper method to define mock.On call -// - ctx context.Context -// - req models.WithdrawStakeRequest -func (_e *MockISuiAPI_Expecter) RequestWithdrawStake(ctx interface{}, req interface{}) *MockISuiAPI_RequestWithdrawStake_Call { - return &MockISuiAPI_RequestWithdrawStake_Call{Call: _e.mock.On("RequestWithdrawStake", ctx, req)} -} - -func (_c *MockISuiAPI_RequestWithdrawStake_Call) Run(run func(ctx context.Context, req models.WithdrawStakeRequest)) *MockISuiAPI_RequestWithdrawStake_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.WithdrawStakeRequest - if args[1] != nil { - arg1 = args[1].(models.WithdrawStakeRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_RequestWithdrawStake_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_RequestWithdrawStake_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_RequestWithdrawStake_Call) RunAndReturn(run func(ctx context.Context, req models.WithdrawStakeRequest) (models.TxnMetaData, error)) *MockISuiAPI_RequestWithdrawStake_Call { - _c.Call.Return(run) - return _c -} - -// SignAndExecuteTransactionBlock provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SignAndExecuteTransactionBlock(ctx context.Context, req models.SignAndExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SignAndExecuteTransactionBlock") - } - - var r0 models.SuiTransactionBlockResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SignAndExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SignAndExecuteTransactionBlockRequest) models.SuiTransactionBlockResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiTransactionBlockResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SignAndExecuteTransactionBlockRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SignAndExecuteTransactionBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignAndExecuteTransactionBlock' -type MockISuiAPI_SignAndExecuteTransactionBlock_Call struct { - *mock.Call -} - -// SignAndExecuteTransactionBlock is a helper method to define mock.On call -// - ctx context.Context -// - req models.SignAndExecuteTransactionBlockRequest -func (_e *MockISuiAPI_Expecter) SignAndExecuteTransactionBlock(ctx interface{}, req interface{}) *MockISuiAPI_SignAndExecuteTransactionBlock_Call { - return &MockISuiAPI_SignAndExecuteTransactionBlock_Call{Call: _e.mock.On("SignAndExecuteTransactionBlock", ctx, req)} -} - -func (_c *MockISuiAPI_SignAndExecuteTransactionBlock_Call) Run(run func(ctx context.Context, req models.SignAndExecuteTransactionBlockRequest)) *MockISuiAPI_SignAndExecuteTransactionBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SignAndExecuteTransactionBlockRequest - if args[1] != nil { - arg1 = args[1].(models.SignAndExecuteTransactionBlockRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SignAndExecuteTransactionBlock_Call) Return(suiTransactionBlockResponse models.SuiTransactionBlockResponse, err error) *MockISuiAPI_SignAndExecuteTransactionBlock_Call { - _c.Call.Return(suiTransactionBlockResponse, err) - return _c -} - -func (_c *MockISuiAPI_SignAndExecuteTransactionBlock_Call) RunAndReturn(run func(ctx context.Context, req models.SignAndExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)) *MockISuiAPI_SignAndExecuteTransactionBlock_Call { - _c.Call.Return(run) - return _c -} - -// SplitCoin provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SplitCoin(ctx context.Context, req models.SplitCoinRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SplitCoin") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SplitCoinRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SplitCoinRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SplitCoinRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SplitCoin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SplitCoin' -type MockISuiAPI_SplitCoin_Call struct { - *mock.Call -} - -// SplitCoin is a helper method to define mock.On call -// - ctx context.Context -// - req models.SplitCoinRequest -func (_e *MockISuiAPI_Expecter) SplitCoin(ctx interface{}, req interface{}) *MockISuiAPI_SplitCoin_Call { - return &MockISuiAPI_SplitCoin_Call{Call: _e.mock.On("SplitCoin", ctx, req)} -} - -func (_c *MockISuiAPI_SplitCoin_Call) Run(run func(ctx context.Context, req models.SplitCoinRequest)) *MockISuiAPI_SplitCoin_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SplitCoinRequest - if args[1] != nil { - arg1 = args[1].(models.SplitCoinRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SplitCoin_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_SplitCoin_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_SplitCoin_Call) RunAndReturn(run func(ctx context.Context, req models.SplitCoinRequest) (models.TxnMetaData, error)) *MockISuiAPI_SplitCoin_Call { - _c.Call.Return(run) - return _c -} - -// SplitCoinEqual provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SplitCoinEqual(ctx context.Context, req models.SplitCoinEqualRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SplitCoinEqual") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SplitCoinEqualRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SplitCoinEqualRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SplitCoinEqualRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SplitCoinEqual_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SplitCoinEqual' -type MockISuiAPI_SplitCoinEqual_Call struct { - *mock.Call -} - -// SplitCoinEqual is a helper method to define mock.On call -// - ctx context.Context -// - req models.SplitCoinEqualRequest -func (_e *MockISuiAPI_Expecter) SplitCoinEqual(ctx interface{}, req interface{}) *MockISuiAPI_SplitCoinEqual_Call { - return &MockISuiAPI_SplitCoinEqual_Call{Call: _e.mock.On("SplitCoinEqual", ctx, req)} -} - -func (_c *MockISuiAPI_SplitCoinEqual_Call) Run(run func(ctx context.Context, req models.SplitCoinEqualRequest)) *MockISuiAPI_SplitCoinEqual_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SplitCoinEqualRequest - if args[1] != nil { - arg1 = args[1].(models.SplitCoinEqualRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SplitCoinEqual_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_SplitCoinEqual_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_SplitCoinEqual_Call) RunAndReturn(run func(ctx context.Context, req models.SplitCoinEqualRequest) (models.TxnMetaData, error)) *MockISuiAPI_SplitCoinEqual_Call { - _c.Call.Return(run) - return _c -} - -// SuiCall provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiCall(ctx context.Context, method string, params ...interface{}) (interface{}, error) { - var tmpRet mock.Arguments - if len(params) > 0 { - tmpRet = _mock.Called(ctx, method, params) - } else { - tmpRet = _mock.Called(ctx, method) - } - ret := tmpRet - - if len(ret) == 0 { - panic("no return value specified for SuiCall") - } - - var r0 interface{} - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) (interface{}, error)); ok { - return returnFunc(ctx, method, params...) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) interface{}); ok { - r0 = returnFunc(ctx, method, params...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(interface{}) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...interface{}) error); ok { - r1 = returnFunc(ctx, method, params...) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiCall' -type MockISuiAPI_SuiCall_Call struct { - *mock.Call -} - -// SuiCall is a helper method to define mock.On call -// - ctx context.Context -// - method string -// - params ...interface{} -func (_e *MockISuiAPI_Expecter) SuiCall(ctx interface{}, method interface{}, params ...interface{}) *MockISuiAPI_SuiCall_Call { - return &MockISuiAPI_SuiCall_Call{Call: _e.mock.On("SuiCall", - append([]interface{}{ctx, method}, params...)...)} -} - -func (_c *MockISuiAPI_SuiCall_Call) Run(run func(ctx context.Context, method string, params ...interface{})) *MockISuiAPI_SuiCall_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 string - if args[1] != nil { - arg1 = args[1].(string) - } - var arg2 []interface{} - var variadicArgs []interface{} - if len(args) > 2 { - variadicArgs = args[2].([]interface{}) - } - arg2 = variadicArgs - run( - arg0, - arg1, - arg2..., - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiCall_Call) Return(ifaceVal interface{}, err error) *MockISuiAPI_SuiCall_Call { - _c.Call.Return(ifaceVal, err) - return _c -} - -func (_c *MockISuiAPI_SuiCall_Call) RunAndReturn(run func(ctx context.Context, method string, params ...interface{}) (interface{}, error)) *MockISuiAPI_SuiCall_Call { - _c.Call.Return(run) - return _c -} - -// SuiDevInspectTransactionBlock provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiDevInspectTransactionBlock(ctx context.Context, req models.SuiDevInspectTransactionBlockRequest) (models.SuiTransactionBlockResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiDevInspectTransactionBlock") - } - - var r0 models.SuiTransactionBlockResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiDevInspectTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiDevInspectTransactionBlockRequest) models.SuiTransactionBlockResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiTransactionBlockResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiDevInspectTransactionBlockRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiDevInspectTransactionBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiDevInspectTransactionBlock' -type MockISuiAPI_SuiDevInspectTransactionBlock_Call struct { - *mock.Call -} - -// SuiDevInspectTransactionBlock is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiDevInspectTransactionBlockRequest -func (_e *MockISuiAPI_Expecter) SuiDevInspectTransactionBlock(ctx interface{}, req interface{}) *MockISuiAPI_SuiDevInspectTransactionBlock_Call { - return &MockISuiAPI_SuiDevInspectTransactionBlock_Call{Call: _e.mock.On("SuiDevInspectTransactionBlock", ctx, req)} -} - -func (_c *MockISuiAPI_SuiDevInspectTransactionBlock_Call) Run(run func(ctx context.Context, req models.SuiDevInspectTransactionBlockRequest)) *MockISuiAPI_SuiDevInspectTransactionBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiDevInspectTransactionBlockRequest - if args[1] != nil { - arg1 = args[1].(models.SuiDevInspectTransactionBlockRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiDevInspectTransactionBlock_Call) Return(suiTransactionBlockResponse models.SuiTransactionBlockResponse, err error) *MockISuiAPI_SuiDevInspectTransactionBlock_Call { - _c.Call.Return(suiTransactionBlockResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiDevInspectTransactionBlock_Call) RunAndReturn(run func(ctx context.Context, req models.SuiDevInspectTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)) *MockISuiAPI_SuiDevInspectTransactionBlock_Call { - _c.Call.Return(run) - return _c -} - -// SuiDryRunTransactionBlock provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiDryRunTransactionBlock(ctx context.Context, req models.SuiDryRunTransactionBlockRequest) (models.SuiTransactionBlockResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiDryRunTransactionBlock") - } - - var r0 models.SuiTransactionBlockResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiDryRunTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiDryRunTransactionBlockRequest) models.SuiTransactionBlockResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiTransactionBlockResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiDryRunTransactionBlockRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiDryRunTransactionBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiDryRunTransactionBlock' -type MockISuiAPI_SuiDryRunTransactionBlock_Call struct { - *mock.Call -} - -// SuiDryRunTransactionBlock is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiDryRunTransactionBlockRequest -func (_e *MockISuiAPI_Expecter) SuiDryRunTransactionBlock(ctx interface{}, req interface{}) *MockISuiAPI_SuiDryRunTransactionBlock_Call { - return &MockISuiAPI_SuiDryRunTransactionBlock_Call{Call: _e.mock.On("SuiDryRunTransactionBlock", ctx, req)} -} - -func (_c *MockISuiAPI_SuiDryRunTransactionBlock_Call) Run(run func(ctx context.Context, req models.SuiDryRunTransactionBlockRequest)) *MockISuiAPI_SuiDryRunTransactionBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiDryRunTransactionBlockRequest - if args[1] != nil { - arg1 = args[1].(models.SuiDryRunTransactionBlockRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiDryRunTransactionBlock_Call) Return(suiTransactionBlockResponse models.SuiTransactionBlockResponse, err error) *MockISuiAPI_SuiDryRunTransactionBlock_Call { - _c.Call.Return(suiTransactionBlockResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiDryRunTransactionBlock_Call) RunAndReturn(run func(ctx context.Context, req models.SuiDryRunTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)) *MockISuiAPI_SuiDryRunTransactionBlock_Call { - _c.Call.Return(run) - return _c -} - -// SuiExecuteTransactionBlock provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiExecuteTransactionBlock(ctx context.Context, req models.SuiExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiExecuteTransactionBlock") - } - - var r0 models.SuiTransactionBlockResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiExecuteTransactionBlockRequest) models.SuiTransactionBlockResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiTransactionBlockResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiExecuteTransactionBlockRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiExecuteTransactionBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiExecuteTransactionBlock' -type MockISuiAPI_SuiExecuteTransactionBlock_Call struct { - *mock.Call -} - -// SuiExecuteTransactionBlock is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiExecuteTransactionBlockRequest -func (_e *MockISuiAPI_Expecter) SuiExecuteTransactionBlock(ctx interface{}, req interface{}) *MockISuiAPI_SuiExecuteTransactionBlock_Call { - return &MockISuiAPI_SuiExecuteTransactionBlock_Call{Call: _e.mock.On("SuiExecuteTransactionBlock", ctx, req)} -} - -func (_c *MockISuiAPI_SuiExecuteTransactionBlock_Call) Run(run func(ctx context.Context, req models.SuiExecuteTransactionBlockRequest)) *MockISuiAPI_SuiExecuteTransactionBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiExecuteTransactionBlockRequest - if args[1] != nil { - arg1 = args[1].(models.SuiExecuteTransactionBlockRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiExecuteTransactionBlock_Call) Return(suiTransactionBlockResponse models.SuiTransactionBlockResponse, err error) *MockISuiAPI_SuiExecuteTransactionBlock_Call { - _c.Call.Return(suiTransactionBlockResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiExecuteTransactionBlock_Call) RunAndReturn(run func(ctx context.Context, req models.SuiExecuteTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)) *MockISuiAPI_SuiExecuteTransactionBlock_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetChainIdentifier provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetChainIdentifier(ctx context.Context) (string, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiGetChainIdentifier") - } - - var r0 string - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (string, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(string) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetChainIdentifier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetChainIdentifier' -type MockISuiAPI_SuiGetChainIdentifier_Call struct { - *mock.Call -} - -// SuiGetChainIdentifier is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiGetChainIdentifier(ctx interface{}) *MockISuiAPI_SuiGetChainIdentifier_Call { - return &MockISuiAPI_SuiGetChainIdentifier_Call{Call: _e.mock.On("SuiGetChainIdentifier", ctx)} -} - -func (_c *MockISuiAPI_SuiGetChainIdentifier_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiGetChainIdentifier_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetChainIdentifier_Call) Return(s string, err error) *MockISuiAPI_SuiGetChainIdentifier_Call { - _c.Call.Return(s, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetChainIdentifier_Call) RunAndReturn(run func(ctx context.Context) (string, error)) *MockISuiAPI_SuiGetChainIdentifier_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetCheckpoint provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetCheckpoint(ctx context.Context, req models.SuiGetCheckpointRequest) (models.CheckpointResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetCheckpoint") - } - - var r0 models.CheckpointResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetCheckpointRequest) (models.CheckpointResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetCheckpointRequest) models.CheckpointResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.CheckpointResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetCheckpointRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetCheckpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetCheckpoint' -type MockISuiAPI_SuiGetCheckpoint_Call struct { - *mock.Call -} - -// SuiGetCheckpoint is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetCheckpointRequest -func (_e *MockISuiAPI_Expecter) SuiGetCheckpoint(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetCheckpoint_Call { - return &MockISuiAPI_SuiGetCheckpoint_Call{Call: _e.mock.On("SuiGetCheckpoint", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetCheckpoint_Call) Run(run func(ctx context.Context, req models.SuiGetCheckpointRequest)) *MockISuiAPI_SuiGetCheckpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetCheckpointRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetCheckpointRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetCheckpoint_Call) Return(checkpointResponse models.CheckpointResponse, err error) *MockISuiAPI_SuiGetCheckpoint_Call { - _c.Call.Return(checkpointResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetCheckpoint_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetCheckpointRequest) (models.CheckpointResponse, error)) *MockISuiAPI_SuiGetCheckpoint_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetCheckpoints provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetCheckpoints(ctx context.Context, req models.SuiGetCheckpointsRequest) (models.PaginatedCheckpointsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetCheckpoints") - } - - var r0 models.PaginatedCheckpointsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetCheckpointsRequest) (models.PaginatedCheckpointsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetCheckpointsRequest) models.PaginatedCheckpointsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedCheckpointsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetCheckpointsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetCheckpoints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetCheckpoints' -type MockISuiAPI_SuiGetCheckpoints_Call struct { - *mock.Call -} - -// SuiGetCheckpoints is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetCheckpointsRequest -func (_e *MockISuiAPI_Expecter) SuiGetCheckpoints(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetCheckpoints_Call { - return &MockISuiAPI_SuiGetCheckpoints_Call{Call: _e.mock.On("SuiGetCheckpoints", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetCheckpoints_Call) Run(run func(ctx context.Context, req models.SuiGetCheckpointsRequest)) *MockISuiAPI_SuiGetCheckpoints_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetCheckpointsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetCheckpointsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetCheckpoints_Call) Return(paginatedCheckpointsResponse models.PaginatedCheckpointsResponse, err error) *MockISuiAPI_SuiGetCheckpoints_Call { - _c.Call.Return(paginatedCheckpointsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetCheckpoints_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetCheckpointsRequest) (models.PaginatedCheckpointsResponse, error)) *MockISuiAPI_SuiGetCheckpoints_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetEvents provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetEvents(ctx context.Context, req models.SuiGetEventsRequest) (models.GetEventsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetEvents") - } - - var r0 models.GetEventsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetEventsRequest) (models.GetEventsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetEventsRequest) models.GetEventsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(models.GetEventsResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetEventsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetEvents' -type MockISuiAPI_SuiGetEvents_Call struct { - *mock.Call -} - -// SuiGetEvents is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetEventsRequest -func (_e *MockISuiAPI_Expecter) SuiGetEvents(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetEvents_Call { - return &MockISuiAPI_SuiGetEvents_Call{Call: _e.mock.On("SuiGetEvents", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetEvents_Call) Run(run func(ctx context.Context, req models.SuiGetEventsRequest)) *MockISuiAPI_SuiGetEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetEventsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetEventsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetEvents_Call) Return(getEventsResponse models.GetEventsResponse, err error) *MockISuiAPI_SuiGetEvents_Call { - _c.Call.Return(getEventsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetEvents_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetEventsRequest) (models.GetEventsResponse, error)) *MockISuiAPI_SuiGetEvents_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetLatestCheckpointSequenceNumber provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetLatestCheckpointSequenceNumber(ctx context.Context) (uint64, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiGetLatestCheckpointSequenceNumber") - } - - var r0 uint64 - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) uint64); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(uint64) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetLatestCheckpointSequenceNumber' -type MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call struct { - *mock.Call -} - -// SuiGetLatestCheckpointSequenceNumber is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiGetLatestCheckpointSequenceNumber(ctx interface{}) *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call { - return &MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call{Call: _e.mock.On("SuiGetLatestCheckpointSequenceNumber", ctx)} -} - -func (_c *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call) Return(v uint64, err error) *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call { - _c.Call.Return(v, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *MockISuiAPI_SuiGetLatestCheckpointSequenceNumber_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetLoadedChildObjects provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetLoadedChildObjects(ctx context.Context, req models.SuiGetLoadedChildObjectsRequest) (models.ChildObjectsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetLoadedChildObjects") - } - - var r0 models.ChildObjectsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetLoadedChildObjectsRequest) (models.ChildObjectsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetLoadedChildObjectsRequest) models.ChildObjectsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.ChildObjectsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetLoadedChildObjectsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetLoadedChildObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetLoadedChildObjects' -type MockISuiAPI_SuiGetLoadedChildObjects_Call struct { - *mock.Call -} - -// SuiGetLoadedChildObjects is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetLoadedChildObjectsRequest -func (_e *MockISuiAPI_Expecter) SuiGetLoadedChildObjects(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetLoadedChildObjects_Call { - return &MockISuiAPI_SuiGetLoadedChildObjects_Call{Call: _e.mock.On("SuiGetLoadedChildObjects", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetLoadedChildObjects_Call) Run(run func(ctx context.Context, req models.SuiGetLoadedChildObjectsRequest)) *MockISuiAPI_SuiGetLoadedChildObjects_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetLoadedChildObjectsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetLoadedChildObjectsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetLoadedChildObjects_Call) Return(childObjectsResponse models.ChildObjectsResponse, err error) *MockISuiAPI_SuiGetLoadedChildObjects_Call { - _c.Call.Return(childObjectsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetLoadedChildObjects_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetLoadedChildObjectsRequest) (models.ChildObjectsResponse, error)) *MockISuiAPI_SuiGetLoadedChildObjects_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetMoveFunctionArgTypes provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetMoveFunctionArgTypes(ctx context.Context, req models.GetMoveFunctionArgTypesRequest) (models.GetMoveFunctionArgTypesResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetMoveFunctionArgTypes") - } - - var r0 models.GetMoveFunctionArgTypesResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetMoveFunctionArgTypesRequest) (models.GetMoveFunctionArgTypesResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetMoveFunctionArgTypesRequest) models.GetMoveFunctionArgTypesResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(models.GetMoveFunctionArgTypesResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.GetMoveFunctionArgTypesRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetMoveFunctionArgTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetMoveFunctionArgTypes' -type MockISuiAPI_SuiGetMoveFunctionArgTypes_Call struct { - *mock.Call -} - -// SuiGetMoveFunctionArgTypes is a helper method to define mock.On call -// - ctx context.Context -// - req models.GetMoveFunctionArgTypesRequest -func (_e *MockISuiAPI_Expecter) SuiGetMoveFunctionArgTypes(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call { - return &MockISuiAPI_SuiGetMoveFunctionArgTypes_Call{Call: _e.mock.On("SuiGetMoveFunctionArgTypes", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call) Run(run func(ctx context.Context, req models.GetMoveFunctionArgTypesRequest)) *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.GetMoveFunctionArgTypesRequest - if args[1] != nil { - arg1 = args[1].(models.GetMoveFunctionArgTypesRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call) Return(getMoveFunctionArgTypesResponse models.GetMoveFunctionArgTypesResponse, err error) *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call { - _c.Call.Return(getMoveFunctionArgTypesResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call) RunAndReturn(run func(ctx context.Context, req models.GetMoveFunctionArgTypesRequest) (models.GetMoveFunctionArgTypesResponse, error)) *MockISuiAPI_SuiGetMoveFunctionArgTypes_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetNormalizedMoveFunction provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetNormalizedMoveFunction(ctx context.Context, req models.GetNormalizedMoveFunctionRequest) (models.GetNormalizedMoveFunctionResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetNormalizedMoveFunction") - } - - var r0 models.GetNormalizedMoveFunctionResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveFunctionRequest) (models.GetNormalizedMoveFunctionResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveFunctionRequest) models.GetNormalizedMoveFunctionResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.GetNormalizedMoveFunctionResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.GetNormalizedMoveFunctionRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetNormalizedMoveFunction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetNormalizedMoveFunction' -type MockISuiAPI_SuiGetNormalizedMoveFunction_Call struct { - *mock.Call -} - -// SuiGetNormalizedMoveFunction is a helper method to define mock.On call -// - ctx context.Context -// - req models.GetNormalizedMoveFunctionRequest -func (_e *MockISuiAPI_Expecter) SuiGetNormalizedMoveFunction(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetNormalizedMoveFunction_Call { - return &MockISuiAPI_SuiGetNormalizedMoveFunction_Call{Call: _e.mock.On("SuiGetNormalizedMoveFunction", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveFunction_Call) Run(run func(ctx context.Context, req models.GetNormalizedMoveFunctionRequest)) *MockISuiAPI_SuiGetNormalizedMoveFunction_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.GetNormalizedMoveFunctionRequest - if args[1] != nil { - arg1 = args[1].(models.GetNormalizedMoveFunctionRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveFunction_Call) Return(getNormalizedMoveFunctionResponse models.GetNormalizedMoveFunctionResponse, err error) *MockISuiAPI_SuiGetNormalizedMoveFunction_Call { - _c.Call.Return(getNormalizedMoveFunctionResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveFunction_Call) RunAndReturn(run func(ctx context.Context, req models.GetNormalizedMoveFunctionRequest) (models.GetNormalizedMoveFunctionResponse, error)) *MockISuiAPI_SuiGetNormalizedMoveFunction_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetNormalizedMoveModule provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetNormalizedMoveModule(ctx context.Context, req models.GetNormalizedMoveModuleRequest) (models.GetNormalizedMoveModuleResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetNormalizedMoveModule") - } - - var r0 models.GetNormalizedMoveModuleResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveModuleRequest) (models.GetNormalizedMoveModuleResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveModuleRequest) models.GetNormalizedMoveModuleResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.GetNormalizedMoveModuleResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.GetNormalizedMoveModuleRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetNormalizedMoveModule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetNormalizedMoveModule' -type MockISuiAPI_SuiGetNormalizedMoveModule_Call struct { - *mock.Call -} - -// SuiGetNormalizedMoveModule is a helper method to define mock.On call -// - ctx context.Context -// - req models.GetNormalizedMoveModuleRequest -func (_e *MockISuiAPI_Expecter) SuiGetNormalizedMoveModule(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetNormalizedMoveModule_Call { - return &MockISuiAPI_SuiGetNormalizedMoveModule_Call{Call: _e.mock.On("SuiGetNormalizedMoveModule", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModule_Call) Run(run func(ctx context.Context, req models.GetNormalizedMoveModuleRequest)) *MockISuiAPI_SuiGetNormalizedMoveModule_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.GetNormalizedMoveModuleRequest - if args[1] != nil { - arg1 = args[1].(models.GetNormalizedMoveModuleRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModule_Call) Return(getNormalizedMoveModuleResponse models.GetNormalizedMoveModuleResponse, err error) *MockISuiAPI_SuiGetNormalizedMoveModule_Call { - _c.Call.Return(getNormalizedMoveModuleResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModule_Call) RunAndReturn(run func(ctx context.Context, req models.GetNormalizedMoveModuleRequest) (models.GetNormalizedMoveModuleResponse, error)) *MockISuiAPI_SuiGetNormalizedMoveModule_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetNormalizedMoveModulesByPackage provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetNormalizedMoveModulesByPackage(ctx context.Context, req models.GetNormalizedMoveModulesByPackageRequest) (models.GetNormalizedMoveModulesByPackageResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetNormalizedMoveModulesByPackage") - } - - var r0 models.GetNormalizedMoveModulesByPackageResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveModulesByPackageRequest) (models.GetNormalizedMoveModulesByPackageResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveModulesByPackageRequest) models.GetNormalizedMoveModulesByPackageResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(models.GetNormalizedMoveModulesByPackageResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.GetNormalizedMoveModulesByPackageRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetNormalizedMoveModulesByPackage' -type MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call struct { - *mock.Call -} - -// SuiGetNormalizedMoveModulesByPackage is a helper method to define mock.On call -// - ctx context.Context -// - req models.GetNormalizedMoveModulesByPackageRequest -func (_e *MockISuiAPI_Expecter) SuiGetNormalizedMoveModulesByPackage(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call { - return &MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call{Call: _e.mock.On("SuiGetNormalizedMoveModulesByPackage", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call) Run(run func(ctx context.Context, req models.GetNormalizedMoveModulesByPackageRequest)) *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.GetNormalizedMoveModulesByPackageRequest - if args[1] != nil { - arg1 = args[1].(models.GetNormalizedMoveModulesByPackageRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call) Return(getNormalizedMoveModulesByPackageResponse models.GetNormalizedMoveModulesByPackageResponse, err error) *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call { - _c.Call.Return(getNormalizedMoveModulesByPackageResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call) RunAndReturn(run func(ctx context.Context, req models.GetNormalizedMoveModulesByPackageRequest) (models.GetNormalizedMoveModulesByPackageResponse, error)) *MockISuiAPI_SuiGetNormalizedMoveModulesByPackage_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetNormalizedMoveStruct provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetNormalizedMoveStruct(ctx context.Context, req models.GetNormalizedMoveStructRequest) (models.GetNormalizedMoveStructResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetNormalizedMoveStruct") - } - - var r0 models.GetNormalizedMoveStructResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveStructRequest) (models.GetNormalizedMoveStructResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.GetNormalizedMoveStructRequest) models.GetNormalizedMoveStructResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.GetNormalizedMoveStructResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.GetNormalizedMoveStructRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetNormalizedMoveStruct_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetNormalizedMoveStruct' -type MockISuiAPI_SuiGetNormalizedMoveStruct_Call struct { - *mock.Call -} - -// SuiGetNormalizedMoveStruct is a helper method to define mock.On call -// - ctx context.Context -// - req models.GetNormalizedMoveStructRequest -func (_e *MockISuiAPI_Expecter) SuiGetNormalizedMoveStruct(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetNormalizedMoveStruct_Call { - return &MockISuiAPI_SuiGetNormalizedMoveStruct_Call{Call: _e.mock.On("SuiGetNormalizedMoveStruct", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveStruct_Call) Run(run func(ctx context.Context, req models.GetNormalizedMoveStructRequest)) *MockISuiAPI_SuiGetNormalizedMoveStruct_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.GetNormalizedMoveStructRequest - if args[1] != nil { - arg1 = args[1].(models.GetNormalizedMoveStructRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveStruct_Call) Return(getNormalizedMoveStructResponse models.GetNormalizedMoveStructResponse, err error) *MockISuiAPI_SuiGetNormalizedMoveStruct_Call { - _c.Call.Return(getNormalizedMoveStructResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetNormalizedMoveStruct_Call) RunAndReturn(run func(ctx context.Context, req models.GetNormalizedMoveStructRequest) (models.GetNormalizedMoveStructResponse, error)) *MockISuiAPI_SuiGetNormalizedMoveStruct_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetObject provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetObject(ctx context.Context, req models.SuiGetObjectRequest) (models.SuiObjectResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetObject") - } - - var r0 models.SuiObjectResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetObjectRequest) (models.SuiObjectResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetObjectRequest) models.SuiObjectResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiObjectResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetObjectRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetObject' -type MockISuiAPI_SuiGetObject_Call struct { - *mock.Call -} - -// SuiGetObject is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetObjectRequest -func (_e *MockISuiAPI_Expecter) SuiGetObject(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetObject_Call { - return &MockISuiAPI_SuiGetObject_Call{Call: _e.mock.On("SuiGetObject", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetObject_Call) Run(run func(ctx context.Context, req models.SuiGetObjectRequest)) *MockISuiAPI_SuiGetObject_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetObjectRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetObjectRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetObject_Call) Return(suiObjectResponse models.SuiObjectResponse, err error) *MockISuiAPI_SuiGetObject_Call { - _c.Call.Return(suiObjectResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetObject_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetObjectRequest) (models.SuiObjectResponse, error)) *MockISuiAPI_SuiGetObject_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetProtocolConfig provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetProtocolConfig(ctx context.Context, req models.SuiGetProtocolConfigRequest) (models.ProtocolConfigResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetProtocolConfig") - } - - var r0 models.ProtocolConfigResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetProtocolConfigRequest) (models.ProtocolConfigResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetProtocolConfigRequest) models.ProtocolConfigResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.ProtocolConfigResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetProtocolConfigRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetProtocolConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetProtocolConfig' -type MockISuiAPI_SuiGetProtocolConfig_Call struct { - *mock.Call -} - -// SuiGetProtocolConfig is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetProtocolConfigRequest -func (_e *MockISuiAPI_Expecter) SuiGetProtocolConfig(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetProtocolConfig_Call { - return &MockISuiAPI_SuiGetProtocolConfig_Call{Call: _e.mock.On("SuiGetProtocolConfig", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetProtocolConfig_Call) Run(run func(ctx context.Context, req models.SuiGetProtocolConfigRequest)) *MockISuiAPI_SuiGetProtocolConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetProtocolConfigRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetProtocolConfigRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetProtocolConfig_Call) Return(protocolConfigResponse models.ProtocolConfigResponse, err error) *MockISuiAPI_SuiGetProtocolConfig_Call { - _c.Call.Return(protocolConfigResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetProtocolConfig_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetProtocolConfigRequest) (models.ProtocolConfigResponse, error)) *MockISuiAPI_SuiGetProtocolConfig_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetTotalTransactionBlocks provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetTotalTransactionBlocks(ctx context.Context) (uint64, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiGetTotalTransactionBlocks") - } - - var r0 uint64 - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) uint64); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(uint64) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetTotalTransactionBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetTotalTransactionBlocks' -type MockISuiAPI_SuiGetTotalTransactionBlocks_Call struct { - *mock.Call -} - -// SuiGetTotalTransactionBlocks is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiGetTotalTransactionBlocks(ctx interface{}) *MockISuiAPI_SuiGetTotalTransactionBlocks_Call { - return &MockISuiAPI_SuiGetTotalTransactionBlocks_Call{Call: _e.mock.On("SuiGetTotalTransactionBlocks", ctx)} -} - -func (_c *MockISuiAPI_SuiGetTotalTransactionBlocks_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiGetTotalTransactionBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetTotalTransactionBlocks_Call) Return(v uint64, err error) *MockISuiAPI_SuiGetTotalTransactionBlocks_Call { - _c.Call.Return(v, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetTotalTransactionBlocks_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *MockISuiAPI_SuiGetTotalTransactionBlocks_Call { - _c.Call.Return(run) - return _c -} - -// SuiGetTransactionBlock provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiGetTransactionBlock(ctx context.Context, req models.SuiGetTransactionBlockRequest) (models.SuiTransactionBlockResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiGetTransactionBlock") - } - - var r0 models.SuiTransactionBlockResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiGetTransactionBlockRequest) models.SuiTransactionBlockResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiTransactionBlockResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiGetTransactionBlockRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiGetTransactionBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiGetTransactionBlock' -type MockISuiAPI_SuiGetTransactionBlock_Call struct { - *mock.Call -} - -// SuiGetTransactionBlock is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiGetTransactionBlockRequest -func (_e *MockISuiAPI_Expecter) SuiGetTransactionBlock(ctx interface{}, req interface{}) *MockISuiAPI_SuiGetTransactionBlock_Call { - return &MockISuiAPI_SuiGetTransactionBlock_Call{Call: _e.mock.On("SuiGetTransactionBlock", ctx, req)} -} - -func (_c *MockISuiAPI_SuiGetTransactionBlock_Call) Run(run func(ctx context.Context, req models.SuiGetTransactionBlockRequest)) *MockISuiAPI_SuiGetTransactionBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiGetTransactionBlockRequest - if args[1] != nil { - arg1 = args[1].(models.SuiGetTransactionBlockRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiGetTransactionBlock_Call) Return(suiTransactionBlockResponse models.SuiTransactionBlockResponse, err error) *MockISuiAPI_SuiGetTransactionBlock_Call { - _c.Call.Return(suiTransactionBlockResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiGetTransactionBlock_Call) RunAndReturn(run func(ctx context.Context, req models.SuiGetTransactionBlockRequest) (models.SuiTransactionBlockResponse, error)) *MockISuiAPI_SuiGetTransactionBlock_Call { - _c.Call.Return(run) - return _c -} - -// SuiMultiGetObjects provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiMultiGetObjects(ctx context.Context, req models.SuiMultiGetObjectsRequest) ([]*models.SuiObjectResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiMultiGetObjects") - } - - var r0 []*models.SuiObjectResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiMultiGetObjectsRequest) ([]*models.SuiObjectResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiMultiGetObjectsRequest) []*models.SuiObjectResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*models.SuiObjectResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiMultiGetObjectsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiMultiGetObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiMultiGetObjects' -type MockISuiAPI_SuiMultiGetObjects_Call struct { - *mock.Call -} - -// SuiMultiGetObjects is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiMultiGetObjectsRequest -func (_e *MockISuiAPI_Expecter) SuiMultiGetObjects(ctx interface{}, req interface{}) *MockISuiAPI_SuiMultiGetObjects_Call { - return &MockISuiAPI_SuiMultiGetObjects_Call{Call: _e.mock.On("SuiMultiGetObjects", ctx, req)} -} - -func (_c *MockISuiAPI_SuiMultiGetObjects_Call) Run(run func(ctx context.Context, req models.SuiMultiGetObjectsRequest)) *MockISuiAPI_SuiMultiGetObjects_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiMultiGetObjectsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiMultiGetObjectsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiMultiGetObjects_Call) Return(suiObjectResponses []*models.SuiObjectResponse, err error) *MockISuiAPI_SuiMultiGetObjects_Call { - _c.Call.Return(suiObjectResponses, err) - return _c -} - -func (_c *MockISuiAPI_SuiMultiGetObjects_Call) RunAndReturn(run func(ctx context.Context, req models.SuiMultiGetObjectsRequest) ([]*models.SuiObjectResponse, error)) *MockISuiAPI_SuiMultiGetObjects_Call { - _c.Call.Return(run) - return _c -} - -// SuiMultiGetTransactionBlocks provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiMultiGetTransactionBlocks(ctx context.Context, req models.SuiMultiGetTransactionBlocksRequest) (models.SuiMultiGetTransactionBlocksResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiMultiGetTransactionBlocks") - } - - var r0 models.SuiMultiGetTransactionBlocksResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiMultiGetTransactionBlocksRequest) (models.SuiMultiGetTransactionBlocksResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiMultiGetTransactionBlocksRequest) models.SuiMultiGetTransactionBlocksResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(models.SuiMultiGetTransactionBlocksResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiMultiGetTransactionBlocksRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiMultiGetTransactionBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiMultiGetTransactionBlocks' -type MockISuiAPI_SuiMultiGetTransactionBlocks_Call struct { - *mock.Call -} - -// SuiMultiGetTransactionBlocks is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiMultiGetTransactionBlocksRequest -func (_e *MockISuiAPI_Expecter) SuiMultiGetTransactionBlocks(ctx interface{}, req interface{}) *MockISuiAPI_SuiMultiGetTransactionBlocks_Call { - return &MockISuiAPI_SuiMultiGetTransactionBlocks_Call{Call: _e.mock.On("SuiMultiGetTransactionBlocks", ctx, req)} -} - -func (_c *MockISuiAPI_SuiMultiGetTransactionBlocks_Call) Run(run func(ctx context.Context, req models.SuiMultiGetTransactionBlocksRequest)) *MockISuiAPI_SuiMultiGetTransactionBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiMultiGetTransactionBlocksRequest - if args[1] != nil { - arg1 = args[1].(models.SuiMultiGetTransactionBlocksRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiMultiGetTransactionBlocks_Call) Return(suiMultiGetTransactionBlocksResponse models.SuiMultiGetTransactionBlocksResponse, err error) *MockISuiAPI_SuiMultiGetTransactionBlocks_Call { - _c.Call.Return(suiMultiGetTransactionBlocksResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiMultiGetTransactionBlocks_Call) RunAndReturn(run func(ctx context.Context, req models.SuiMultiGetTransactionBlocksRequest) (models.SuiMultiGetTransactionBlocksResponse, error)) *MockISuiAPI_SuiMultiGetTransactionBlocks_Call { - _c.Call.Return(run) - return _c -} - -// SuiTryGetPastObject provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiTryGetPastObject(ctx context.Context, req models.SuiTryGetPastObjectRequest) (models.PastObjectResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiTryGetPastObject") - } - - var r0 models.PastObjectResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiTryGetPastObjectRequest) (models.PastObjectResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiTryGetPastObjectRequest) models.PastObjectResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PastObjectResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiTryGetPastObjectRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiTryGetPastObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiTryGetPastObject' -type MockISuiAPI_SuiTryGetPastObject_Call struct { - *mock.Call -} - -// SuiTryGetPastObject is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiTryGetPastObjectRequest -func (_e *MockISuiAPI_Expecter) SuiTryGetPastObject(ctx interface{}, req interface{}) *MockISuiAPI_SuiTryGetPastObject_Call { - return &MockISuiAPI_SuiTryGetPastObject_Call{Call: _e.mock.On("SuiTryGetPastObject", ctx, req)} -} - -func (_c *MockISuiAPI_SuiTryGetPastObject_Call) Run(run func(ctx context.Context, req models.SuiTryGetPastObjectRequest)) *MockISuiAPI_SuiTryGetPastObject_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiTryGetPastObjectRequest - if args[1] != nil { - arg1 = args[1].(models.SuiTryGetPastObjectRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiTryGetPastObject_Call) Return(pastObjectResponse models.PastObjectResponse, err error) *MockISuiAPI_SuiTryGetPastObject_Call { - _c.Call.Return(pastObjectResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiTryGetPastObject_Call) RunAndReturn(run func(ctx context.Context, req models.SuiTryGetPastObjectRequest) (models.PastObjectResponse, error)) *MockISuiAPI_SuiTryGetPastObject_Call { - _c.Call.Return(run) - return _c -} - -// SuiTryMultiGetPastObjects provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiTryMultiGetPastObjects(ctx context.Context, req models.SuiTryMultiGetPastObjectsRequest) ([]*models.PastObjectResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiTryMultiGetPastObjects") - } - - var r0 []*models.PastObjectResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiTryMultiGetPastObjectsRequest) ([]*models.PastObjectResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiTryMultiGetPastObjectsRequest) []*models.PastObjectResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*models.PastObjectResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiTryMultiGetPastObjectsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiTryMultiGetPastObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiTryMultiGetPastObjects' -type MockISuiAPI_SuiTryMultiGetPastObjects_Call struct { - *mock.Call -} - -// SuiTryMultiGetPastObjects is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiTryMultiGetPastObjectsRequest -func (_e *MockISuiAPI_Expecter) SuiTryMultiGetPastObjects(ctx interface{}, req interface{}) *MockISuiAPI_SuiTryMultiGetPastObjects_Call { - return &MockISuiAPI_SuiTryMultiGetPastObjects_Call{Call: _e.mock.On("SuiTryMultiGetPastObjects", ctx, req)} -} - -func (_c *MockISuiAPI_SuiTryMultiGetPastObjects_Call) Run(run func(ctx context.Context, req models.SuiTryMultiGetPastObjectsRequest)) *MockISuiAPI_SuiTryMultiGetPastObjects_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiTryMultiGetPastObjectsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiTryMultiGetPastObjectsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiTryMultiGetPastObjects_Call) Return(pastObjectResponses []*models.PastObjectResponse, err error) *MockISuiAPI_SuiTryMultiGetPastObjects_Call { - _c.Call.Return(pastObjectResponses, err) - return _c -} - -func (_c *MockISuiAPI_SuiTryMultiGetPastObjects_Call) RunAndReturn(run func(ctx context.Context, req models.SuiTryMultiGetPastObjectsRequest) ([]*models.PastObjectResponse, error)) *MockISuiAPI_SuiTryMultiGetPastObjects_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetAllBalance provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetAllBalance(ctx context.Context, req models.SuiXGetAllBalanceRequest) (models.CoinAllBalanceResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetAllBalance") - } - - var r0 models.CoinAllBalanceResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetAllBalanceRequest) (models.CoinAllBalanceResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetAllBalanceRequest) models.CoinAllBalanceResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(models.CoinAllBalanceResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetAllBalanceRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetAllBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetAllBalance' -type MockISuiAPI_SuiXGetAllBalance_Call struct { - *mock.Call -} - -// SuiXGetAllBalance is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetAllBalanceRequest -func (_e *MockISuiAPI_Expecter) SuiXGetAllBalance(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetAllBalance_Call { - return &MockISuiAPI_SuiXGetAllBalance_Call{Call: _e.mock.On("SuiXGetAllBalance", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetAllBalance_Call) Run(run func(ctx context.Context, req models.SuiXGetAllBalanceRequest)) *MockISuiAPI_SuiXGetAllBalance_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetAllBalanceRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetAllBalanceRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetAllBalance_Call) Return(coinAllBalanceResponse models.CoinAllBalanceResponse, err error) *MockISuiAPI_SuiXGetAllBalance_Call { - _c.Call.Return(coinAllBalanceResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetAllBalance_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetAllBalanceRequest) (models.CoinAllBalanceResponse, error)) *MockISuiAPI_SuiXGetAllBalance_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetAllCoins provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetAllCoins(ctx context.Context, req models.SuiXGetAllCoinsRequest) (models.PaginatedCoinsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetAllCoins") - } - - var r0 models.PaginatedCoinsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetAllCoinsRequest) (models.PaginatedCoinsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetAllCoinsRequest) models.PaginatedCoinsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedCoinsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetAllCoinsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetAllCoins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetAllCoins' -type MockISuiAPI_SuiXGetAllCoins_Call struct { - *mock.Call -} - -// SuiXGetAllCoins is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetAllCoinsRequest -func (_e *MockISuiAPI_Expecter) SuiXGetAllCoins(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetAllCoins_Call { - return &MockISuiAPI_SuiXGetAllCoins_Call{Call: _e.mock.On("SuiXGetAllCoins", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetAllCoins_Call) Run(run func(ctx context.Context, req models.SuiXGetAllCoinsRequest)) *MockISuiAPI_SuiXGetAllCoins_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetAllCoinsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetAllCoinsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetAllCoins_Call) Return(paginatedCoinsResponse models.PaginatedCoinsResponse, err error) *MockISuiAPI_SuiXGetAllCoins_Call { - _c.Call.Return(paginatedCoinsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetAllCoins_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetAllCoinsRequest) (models.PaginatedCoinsResponse, error)) *MockISuiAPI_SuiXGetAllCoins_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetBalance provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetBalance(ctx context.Context, req models.SuiXGetBalanceRequest) (models.CoinBalanceResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetBalance") - } - - var r0 models.CoinBalanceResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetBalanceRequest) (models.CoinBalanceResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetBalanceRequest) models.CoinBalanceResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.CoinBalanceResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetBalanceRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetBalance' -type MockISuiAPI_SuiXGetBalance_Call struct { - *mock.Call -} - -// SuiXGetBalance is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetBalanceRequest -func (_e *MockISuiAPI_Expecter) SuiXGetBalance(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetBalance_Call { - return &MockISuiAPI_SuiXGetBalance_Call{Call: _e.mock.On("SuiXGetBalance", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetBalance_Call) Run(run func(ctx context.Context, req models.SuiXGetBalanceRequest)) *MockISuiAPI_SuiXGetBalance_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetBalanceRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetBalanceRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetBalance_Call) Return(coinBalanceResponse models.CoinBalanceResponse, err error) *MockISuiAPI_SuiXGetBalance_Call { - _c.Call.Return(coinBalanceResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetBalance_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetBalanceRequest) (models.CoinBalanceResponse, error)) *MockISuiAPI_SuiXGetBalance_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetCoinMetadata provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetCoinMetadata(ctx context.Context, req models.SuiXGetCoinMetadataRequest) (models.CoinMetadataResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetCoinMetadata") - } - - var r0 models.CoinMetadataResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCoinMetadataRequest) (models.CoinMetadataResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCoinMetadataRequest) models.CoinMetadataResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.CoinMetadataResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetCoinMetadataRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetCoinMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetCoinMetadata' -type MockISuiAPI_SuiXGetCoinMetadata_Call struct { - *mock.Call -} - -// SuiXGetCoinMetadata is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetCoinMetadataRequest -func (_e *MockISuiAPI_Expecter) SuiXGetCoinMetadata(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetCoinMetadata_Call { - return &MockISuiAPI_SuiXGetCoinMetadata_Call{Call: _e.mock.On("SuiXGetCoinMetadata", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetCoinMetadata_Call) Run(run func(ctx context.Context, req models.SuiXGetCoinMetadataRequest)) *MockISuiAPI_SuiXGetCoinMetadata_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetCoinMetadataRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetCoinMetadataRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCoinMetadata_Call) Return(coinMetadataResponse models.CoinMetadataResponse, err error) *MockISuiAPI_SuiXGetCoinMetadata_Call { - _c.Call.Return(coinMetadataResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCoinMetadata_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetCoinMetadataRequest) (models.CoinMetadataResponse, error)) *MockISuiAPI_SuiXGetCoinMetadata_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetCoins provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetCoins(ctx context.Context, req models.SuiXGetCoinsRequest) (models.PaginatedCoinsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetCoins") - } - - var r0 models.PaginatedCoinsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCoinsRequest) (models.PaginatedCoinsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCoinsRequest) models.PaginatedCoinsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedCoinsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetCoinsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetCoins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetCoins' -type MockISuiAPI_SuiXGetCoins_Call struct { - *mock.Call -} - -// SuiXGetCoins is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetCoinsRequest -func (_e *MockISuiAPI_Expecter) SuiXGetCoins(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetCoins_Call { - return &MockISuiAPI_SuiXGetCoins_Call{Call: _e.mock.On("SuiXGetCoins", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetCoins_Call) Run(run func(ctx context.Context, req models.SuiXGetCoinsRequest)) *MockISuiAPI_SuiXGetCoins_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetCoinsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetCoinsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCoins_Call) Return(paginatedCoinsResponse models.PaginatedCoinsResponse, err error) *MockISuiAPI_SuiXGetCoins_Call { - _c.Call.Return(paginatedCoinsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCoins_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetCoinsRequest) (models.PaginatedCoinsResponse, error)) *MockISuiAPI_SuiXGetCoins_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetCommitteeInfo provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetCommitteeInfo(ctx context.Context, req models.SuiXGetCommitteeInfoRequest) (models.SuiXGetCommitteeInfoResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetCommitteeInfo") - } - - var r0 models.SuiXGetCommitteeInfoResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCommitteeInfoRequest) (models.SuiXGetCommitteeInfoResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetCommitteeInfoRequest) models.SuiXGetCommitteeInfoResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiXGetCommitteeInfoResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetCommitteeInfoRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetCommitteeInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetCommitteeInfo' -type MockISuiAPI_SuiXGetCommitteeInfo_Call struct { - *mock.Call -} - -// SuiXGetCommitteeInfo is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetCommitteeInfoRequest -func (_e *MockISuiAPI_Expecter) SuiXGetCommitteeInfo(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetCommitteeInfo_Call { - return &MockISuiAPI_SuiXGetCommitteeInfo_Call{Call: _e.mock.On("SuiXGetCommitteeInfo", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetCommitteeInfo_Call) Run(run func(ctx context.Context, req models.SuiXGetCommitteeInfoRequest)) *MockISuiAPI_SuiXGetCommitteeInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetCommitteeInfoRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetCommitteeInfoRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCommitteeInfo_Call) Return(suiXGetCommitteeInfoResponse models.SuiXGetCommitteeInfoResponse, err error) *MockISuiAPI_SuiXGetCommitteeInfo_Call { - _c.Call.Return(suiXGetCommitteeInfoResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCommitteeInfo_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetCommitteeInfoRequest) (models.SuiXGetCommitteeInfoResponse, error)) *MockISuiAPI_SuiXGetCommitteeInfo_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetCurrentEpoch provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetCurrentEpoch(ctx context.Context) (models.EpochInfo, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetCurrentEpoch") - } - - var r0 models.EpochInfo - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (models.EpochInfo, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) models.EpochInfo); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(models.EpochInfo) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetCurrentEpoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetCurrentEpoch' -type MockISuiAPI_SuiXGetCurrentEpoch_Call struct { - *mock.Call -} - -// SuiXGetCurrentEpoch is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiXGetCurrentEpoch(ctx interface{}) *MockISuiAPI_SuiXGetCurrentEpoch_Call { - return &MockISuiAPI_SuiXGetCurrentEpoch_Call{Call: _e.mock.On("SuiXGetCurrentEpoch", ctx)} -} - -func (_c *MockISuiAPI_SuiXGetCurrentEpoch_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiXGetCurrentEpoch_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCurrentEpoch_Call) Return(epochInfo models.EpochInfo, err error) *MockISuiAPI_SuiXGetCurrentEpoch_Call { - _c.Call.Return(epochInfo, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetCurrentEpoch_Call) RunAndReturn(run func(ctx context.Context) (models.EpochInfo, error)) *MockISuiAPI_SuiXGetCurrentEpoch_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetDynamicField provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetDynamicField(ctx context.Context, req models.SuiXGetDynamicFieldRequest) (models.PaginatedDynamicFieldInfoResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetDynamicField") - } - - var r0 models.PaginatedDynamicFieldInfoResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetDynamicFieldRequest) (models.PaginatedDynamicFieldInfoResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetDynamicFieldRequest) models.PaginatedDynamicFieldInfoResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedDynamicFieldInfoResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetDynamicFieldRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetDynamicField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetDynamicField' -type MockISuiAPI_SuiXGetDynamicField_Call struct { - *mock.Call -} - -// SuiXGetDynamicField is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetDynamicFieldRequest -func (_e *MockISuiAPI_Expecter) SuiXGetDynamicField(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetDynamicField_Call { - return &MockISuiAPI_SuiXGetDynamicField_Call{Call: _e.mock.On("SuiXGetDynamicField", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetDynamicField_Call) Run(run func(ctx context.Context, req models.SuiXGetDynamicFieldRequest)) *MockISuiAPI_SuiXGetDynamicField_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetDynamicFieldRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetDynamicFieldRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetDynamicField_Call) Return(paginatedDynamicFieldInfoResponse models.PaginatedDynamicFieldInfoResponse, err error) *MockISuiAPI_SuiXGetDynamicField_Call { - _c.Call.Return(paginatedDynamicFieldInfoResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetDynamicField_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetDynamicFieldRequest) (models.PaginatedDynamicFieldInfoResponse, error)) *MockISuiAPI_SuiXGetDynamicField_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetDynamicFieldObject provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetDynamicFieldObject(ctx context.Context, req models.SuiXGetDynamicFieldObjectRequest) (models.SuiObjectResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetDynamicFieldObject") - } - - var r0 models.SuiObjectResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetDynamicFieldObjectRequest) (models.SuiObjectResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetDynamicFieldObjectRequest) models.SuiObjectResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiObjectResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetDynamicFieldObjectRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetDynamicFieldObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetDynamicFieldObject' -type MockISuiAPI_SuiXGetDynamicFieldObject_Call struct { - *mock.Call -} - -// SuiXGetDynamicFieldObject is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetDynamicFieldObjectRequest -func (_e *MockISuiAPI_Expecter) SuiXGetDynamicFieldObject(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetDynamicFieldObject_Call { - return &MockISuiAPI_SuiXGetDynamicFieldObject_Call{Call: _e.mock.On("SuiXGetDynamicFieldObject", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetDynamicFieldObject_Call) Run(run func(ctx context.Context, req models.SuiXGetDynamicFieldObjectRequest)) *MockISuiAPI_SuiXGetDynamicFieldObject_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetDynamicFieldObjectRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetDynamicFieldObjectRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetDynamicFieldObject_Call) Return(suiObjectResponse models.SuiObjectResponse, err error) *MockISuiAPI_SuiXGetDynamicFieldObject_Call { - _c.Call.Return(suiObjectResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetDynamicFieldObject_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetDynamicFieldObjectRequest) (models.SuiObjectResponse, error)) *MockISuiAPI_SuiXGetDynamicFieldObject_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetEpochs provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetEpochs(ctx context.Context, req models.SuiXGetEpochsRequest) (models.PaginatedEpochInfoResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetEpochs") - } - - var r0 models.PaginatedEpochInfoResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetEpochsRequest) (models.PaginatedEpochInfoResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetEpochsRequest) models.PaginatedEpochInfoResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedEpochInfoResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetEpochsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetEpochs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetEpochs' -type MockISuiAPI_SuiXGetEpochs_Call struct { - *mock.Call -} - -// SuiXGetEpochs is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetEpochsRequest -func (_e *MockISuiAPI_Expecter) SuiXGetEpochs(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetEpochs_Call { - return &MockISuiAPI_SuiXGetEpochs_Call{Call: _e.mock.On("SuiXGetEpochs", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetEpochs_Call) Run(run func(ctx context.Context, req models.SuiXGetEpochsRequest)) *MockISuiAPI_SuiXGetEpochs_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetEpochsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetEpochsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetEpochs_Call) Return(paginatedEpochInfoResponse models.PaginatedEpochInfoResponse, err error) *MockISuiAPI_SuiXGetEpochs_Call { - _c.Call.Return(paginatedEpochInfoResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetEpochs_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetEpochsRequest) (models.PaginatedEpochInfoResponse, error)) *MockISuiAPI_SuiXGetEpochs_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetLatestSuiSystemState provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetLatestSuiSystemState(ctx context.Context) (models.SuiSystemStateSummary, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetLatestSuiSystemState") - } - - var r0 models.SuiSystemStateSummary - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (models.SuiSystemStateSummary, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) models.SuiSystemStateSummary); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(models.SuiSystemStateSummary) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetLatestSuiSystemState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetLatestSuiSystemState' -type MockISuiAPI_SuiXGetLatestSuiSystemState_Call struct { - *mock.Call -} - -// SuiXGetLatestSuiSystemState is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiXGetLatestSuiSystemState(ctx interface{}) *MockISuiAPI_SuiXGetLatestSuiSystemState_Call { - return &MockISuiAPI_SuiXGetLatestSuiSystemState_Call{Call: _e.mock.On("SuiXGetLatestSuiSystemState", ctx)} -} - -func (_c *MockISuiAPI_SuiXGetLatestSuiSystemState_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiXGetLatestSuiSystemState_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetLatestSuiSystemState_Call) Return(suiSystemStateSummary models.SuiSystemStateSummary, err error) *MockISuiAPI_SuiXGetLatestSuiSystemState_Call { - _c.Call.Return(suiSystemStateSummary, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetLatestSuiSystemState_Call) RunAndReturn(run func(ctx context.Context) (models.SuiSystemStateSummary, error)) *MockISuiAPI_SuiXGetLatestSuiSystemState_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetOwnedObjects provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetOwnedObjects(ctx context.Context, req models.SuiXGetOwnedObjectsRequest) (models.PaginatedObjectsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetOwnedObjects") - } - - var r0 models.PaginatedObjectsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetOwnedObjectsRequest) (models.PaginatedObjectsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetOwnedObjectsRequest) models.PaginatedObjectsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedObjectsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetOwnedObjectsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetOwnedObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetOwnedObjects' -type MockISuiAPI_SuiXGetOwnedObjects_Call struct { - *mock.Call -} - -// SuiXGetOwnedObjects is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetOwnedObjectsRequest -func (_e *MockISuiAPI_Expecter) SuiXGetOwnedObjects(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetOwnedObjects_Call { - return &MockISuiAPI_SuiXGetOwnedObjects_Call{Call: _e.mock.On("SuiXGetOwnedObjects", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetOwnedObjects_Call) Run(run func(ctx context.Context, req models.SuiXGetOwnedObjectsRequest)) *MockISuiAPI_SuiXGetOwnedObjects_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetOwnedObjectsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetOwnedObjectsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetOwnedObjects_Call) Return(paginatedObjectsResponse models.PaginatedObjectsResponse, err error) *MockISuiAPI_SuiXGetOwnedObjects_Call { - _c.Call.Return(paginatedObjectsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetOwnedObjects_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetOwnedObjectsRequest) (models.PaginatedObjectsResponse, error)) *MockISuiAPI_SuiXGetOwnedObjects_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetReferenceGasPrice provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetReferenceGasPrice(ctx context.Context) (uint64, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetReferenceGasPrice") - } - - var r0 uint64 - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) uint64); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(uint64) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetReferenceGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetReferenceGasPrice' -type MockISuiAPI_SuiXGetReferenceGasPrice_Call struct { - *mock.Call -} - -// SuiXGetReferenceGasPrice is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiXGetReferenceGasPrice(ctx interface{}) *MockISuiAPI_SuiXGetReferenceGasPrice_Call { - return &MockISuiAPI_SuiXGetReferenceGasPrice_Call{Call: _e.mock.On("SuiXGetReferenceGasPrice", ctx)} -} - -func (_c *MockISuiAPI_SuiXGetReferenceGasPrice_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiXGetReferenceGasPrice_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetReferenceGasPrice_Call) Return(v uint64, err error) *MockISuiAPI_SuiXGetReferenceGasPrice_Call { - _c.Call.Return(v, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetReferenceGasPrice_Call) RunAndReturn(run func(ctx context.Context) (uint64, error)) *MockISuiAPI_SuiXGetReferenceGasPrice_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetStakes provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetStakes(ctx context.Context, req models.SuiXGetStakesRequest) ([]*models.DelegatedStakesResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetStakes") - } - - var r0 []*models.DelegatedStakesResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetStakesRequest) ([]*models.DelegatedStakesResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetStakesRequest) []*models.DelegatedStakesResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*models.DelegatedStakesResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetStakesRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetStakes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetStakes' -type MockISuiAPI_SuiXGetStakes_Call struct { - *mock.Call -} - -// SuiXGetStakes is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetStakesRequest -func (_e *MockISuiAPI_Expecter) SuiXGetStakes(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetStakes_Call { - return &MockISuiAPI_SuiXGetStakes_Call{Call: _e.mock.On("SuiXGetStakes", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetStakes_Call) Run(run func(ctx context.Context, req models.SuiXGetStakesRequest)) *MockISuiAPI_SuiXGetStakes_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetStakesRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetStakesRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetStakes_Call) Return(delegatedStakesResponses []*models.DelegatedStakesResponse, err error) *MockISuiAPI_SuiXGetStakes_Call { - _c.Call.Return(delegatedStakesResponses, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetStakes_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetStakesRequest) ([]*models.DelegatedStakesResponse, error)) *MockISuiAPI_SuiXGetStakes_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetStakesByIds provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetStakesByIds(ctx context.Context, req models.SuiXGetStakesByIdsRequest) ([]*models.DelegatedStakesResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetStakesByIds") - } - - var r0 []*models.DelegatedStakesResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetStakesByIdsRequest) ([]*models.DelegatedStakesResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetStakesByIdsRequest) []*models.DelegatedStakesResponse); ok { - r0 = returnFunc(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*models.DelegatedStakesResponse) - } - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetStakesByIdsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetStakesByIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetStakesByIds' -type MockISuiAPI_SuiXGetStakesByIds_Call struct { - *mock.Call -} - -// SuiXGetStakesByIds is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetStakesByIdsRequest -func (_e *MockISuiAPI_Expecter) SuiXGetStakesByIds(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetStakesByIds_Call { - return &MockISuiAPI_SuiXGetStakesByIds_Call{Call: _e.mock.On("SuiXGetStakesByIds", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetStakesByIds_Call) Run(run func(ctx context.Context, req models.SuiXGetStakesByIdsRequest)) *MockISuiAPI_SuiXGetStakesByIds_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetStakesByIdsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetStakesByIdsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetStakesByIds_Call) Return(delegatedStakesResponses []*models.DelegatedStakesResponse, err error) *MockISuiAPI_SuiXGetStakesByIds_Call { - _c.Call.Return(delegatedStakesResponses, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetStakesByIds_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetStakesByIdsRequest) ([]*models.DelegatedStakesResponse, error)) *MockISuiAPI_SuiXGetStakesByIds_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetTotalSupply provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetTotalSupply(ctx context.Context, req models.SuiXGetTotalSupplyRequest) (models.TotalSupplyResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetTotalSupply") - } - - var r0 models.TotalSupplyResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetTotalSupplyRequest) (models.TotalSupplyResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXGetTotalSupplyRequest) models.TotalSupplyResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TotalSupplyResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXGetTotalSupplyRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetTotalSupply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetTotalSupply' -type MockISuiAPI_SuiXGetTotalSupply_Call struct { - *mock.Call -} - -// SuiXGetTotalSupply is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXGetTotalSupplyRequest -func (_e *MockISuiAPI_Expecter) SuiXGetTotalSupply(ctx interface{}, req interface{}) *MockISuiAPI_SuiXGetTotalSupply_Call { - return &MockISuiAPI_SuiXGetTotalSupply_Call{Call: _e.mock.On("SuiXGetTotalSupply", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXGetTotalSupply_Call) Run(run func(ctx context.Context, req models.SuiXGetTotalSupplyRequest)) *MockISuiAPI_SuiXGetTotalSupply_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXGetTotalSupplyRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXGetTotalSupplyRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetTotalSupply_Call) Return(totalSupplyResponse models.TotalSupplyResponse, err error) *MockISuiAPI_SuiXGetTotalSupply_Call { - _c.Call.Return(totalSupplyResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetTotalSupply_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXGetTotalSupplyRequest) (models.TotalSupplyResponse, error)) *MockISuiAPI_SuiXGetTotalSupply_Call { - _c.Call.Return(run) - return _c -} - -// SuiXGetValidatorsApy provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXGetValidatorsApy(ctx context.Context) (models.ValidatorsApy, error) { - ret := _mock.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuiXGetValidatorsApy") - } - - var r0 models.ValidatorsApy - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context) (models.ValidatorsApy, error)); ok { - return returnFunc(ctx) - } - if returnFunc, ok := ret.Get(0).(func(context.Context) models.ValidatorsApy); ok { - r0 = returnFunc(ctx) - } else { - r0 = ret.Get(0).(models.ValidatorsApy) - } - if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = returnFunc(ctx) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXGetValidatorsApy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXGetValidatorsApy' -type MockISuiAPI_SuiXGetValidatorsApy_Call struct { - *mock.Call -} - -// SuiXGetValidatorsApy is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockISuiAPI_Expecter) SuiXGetValidatorsApy(ctx interface{}) *MockISuiAPI_SuiXGetValidatorsApy_Call { - return &MockISuiAPI_SuiXGetValidatorsApy_Call{Call: _e.mock.On("SuiXGetValidatorsApy", ctx)} -} - -func (_c *MockISuiAPI_SuiXGetValidatorsApy_Call) Run(run func(ctx context.Context)) *MockISuiAPI_SuiXGetValidatorsApy_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - run( - arg0, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXGetValidatorsApy_Call) Return(validatorsApy models.ValidatorsApy, err error) *MockISuiAPI_SuiXGetValidatorsApy_Call { - _c.Call.Return(validatorsApy, err) - return _c -} - -func (_c *MockISuiAPI_SuiXGetValidatorsApy_Call) RunAndReturn(run func(ctx context.Context) (models.ValidatorsApy, error)) *MockISuiAPI_SuiXGetValidatorsApy_Call { - _c.Call.Return(run) - return _c -} - -// SuiXQueryEvents provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXQueryEvents(ctx context.Context, req models.SuiXQueryEventsRequest) (models.PaginatedEventsResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXQueryEvents") - } - - var r0 models.PaginatedEventsResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXQueryEventsRequest) (models.PaginatedEventsResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXQueryEventsRequest) models.PaginatedEventsResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.PaginatedEventsResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXQueryEventsRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXQueryEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXQueryEvents' -type MockISuiAPI_SuiXQueryEvents_Call struct { - *mock.Call -} - -// SuiXQueryEvents is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXQueryEventsRequest -func (_e *MockISuiAPI_Expecter) SuiXQueryEvents(ctx interface{}, req interface{}) *MockISuiAPI_SuiXQueryEvents_Call { - return &MockISuiAPI_SuiXQueryEvents_Call{Call: _e.mock.On("SuiXQueryEvents", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXQueryEvents_Call) Run(run func(ctx context.Context, req models.SuiXQueryEventsRequest)) *MockISuiAPI_SuiXQueryEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXQueryEventsRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXQueryEventsRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXQueryEvents_Call) Return(paginatedEventsResponse models.PaginatedEventsResponse, err error) *MockISuiAPI_SuiXQueryEvents_Call { - _c.Call.Return(paginatedEventsResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXQueryEvents_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXQueryEventsRequest) (models.PaginatedEventsResponse, error)) *MockISuiAPI_SuiXQueryEvents_Call { - _c.Call.Return(run) - return _c -} - -// SuiXQueryTransactionBlocks provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXQueryTransactionBlocks(ctx context.Context, req models.SuiXQueryTransactionBlocksRequest) (models.SuiXQueryTransactionBlocksResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXQueryTransactionBlocks") - } - - var r0 models.SuiXQueryTransactionBlocksResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXQueryTransactionBlocksRequest) (models.SuiXQueryTransactionBlocksResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXQueryTransactionBlocksRequest) models.SuiXQueryTransactionBlocksResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiXQueryTransactionBlocksResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXQueryTransactionBlocksRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXQueryTransactionBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXQueryTransactionBlocks' -type MockISuiAPI_SuiXQueryTransactionBlocks_Call struct { - *mock.Call -} - -// SuiXQueryTransactionBlocks is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXQueryTransactionBlocksRequest -func (_e *MockISuiAPI_Expecter) SuiXQueryTransactionBlocks(ctx interface{}, req interface{}) *MockISuiAPI_SuiXQueryTransactionBlocks_Call { - return &MockISuiAPI_SuiXQueryTransactionBlocks_Call{Call: _e.mock.On("SuiXQueryTransactionBlocks", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXQueryTransactionBlocks_Call) Run(run func(ctx context.Context, req models.SuiXQueryTransactionBlocksRequest)) *MockISuiAPI_SuiXQueryTransactionBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXQueryTransactionBlocksRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXQueryTransactionBlocksRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXQueryTransactionBlocks_Call) Return(suiXQueryTransactionBlocksResponse models.SuiXQueryTransactionBlocksResponse, err error) *MockISuiAPI_SuiXQueryTransactionBlocks_Call { - _c.Call.Return(suiXQueryTransactionBlocksResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXQueryTransactionBlocks_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXQueryTransactionBlocksRequest) (models.SuiXQueryTransactionBlocksResponse, error)) *MockISuiAPI_SuiXQueryTransactionBlocks_Call { - _c.Call.Return(run) - return _c -} - -// SuiXResolveNameServiceAddress provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXResolveNameServiceAddress(ctx context.Context, req models.SuiXResolveNameServiceAddressRequest) (string, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXResolveNameServiceAddress") - } - - var r0 string - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXResolveNameServiceAddressRequest) (string, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXResolveNameServiceAddressRequest) string); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(string) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXResolveNameServiceAddressRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXResolveNameServiceAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXResolveNameServiceAddress' -type MockISuiAPI_SuiXResolveNameServiceAddress_Call struct { - *mock.Call -} - -// SuiXResolveNameServiceAddress is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXResolveNameServiceAddressRequest -func (_e *MockISuiAPI_Expecter) SuiXResolveNameServiceAddress(ctx interface{}, req interface{}) *MockISuiAPI_SuiXResolveNameServiceAddress_Call { - return &MockISuiAPI_SuiXResolveNameServiceAddress_Call{Call: _e.mock.On("SuiXResolveNameServiceAddress", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceAddress_Call) Run(run func(ctx context.Context, req models.SuiXResolveNameServiceAddressRequest)) *MockISuiAPI_SuiXResolveNameServiceAddress_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXResolveNameServiceAddressRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXResolveNameServiceAddressRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceAddress_Call) Return(s string, err error) *MockISuiAPI_SuiXResolveNameServiceAddress_Call { - _c.Call.Return(s, err) - return _c -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceAddress_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXResolveNameServiceAddressRequest) (string, error)) *MockISuiAPI_SuiXResolveNameServiceAddress_Call { - _c.Call.Return(run) - return _c -} - -// SuiXResolveNameServiceNames provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) SuiXResolveNameServiceNames(ctx context.Context, req models.SuiXResolveNameServiceNamesRequest) (models.SuiXResolveNameServiceNamesResponse, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for SuiXResolveNameServiceNames") - } - - var r0 models.SuiXResolveNameServiceNamesResponse - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXResolveNameServiceNamesRequest) (models.SuiXResolveNameServiceNamesResponse, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.SuiXResolveNameServiceNamesRequest) models.SuiXResolveNameServiceNamesResponse); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.SuiXResolveNameServiceNamesResponse) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.SuiXResolveNameServiceNamesRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_SuiXResolveNameServiceNames_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuiXResolveNameServiceNames' -type MockISuiAPI_SuiXResolveNameServiceNames_Call struct { - *mock.Call -} - -// SuiXResolveNameServiceNames is a helper method to define mock.On call -// - ctx context.Context -// - req models.SuiXResolveNameServiceNamesRequest -func (_e *MockISuiAPI_Expecter) SuiXResolveNameServiceNames(ctx interface{}, req interface{}) *MockISuiAPI_SuiXResolveNameServiceNames_Call { - return &MockISuiAPI_SuiXResolveNameServiceNames_Call{Call: _e.mock.On("SuiXResolveNameServiceNames", ctx, req)} -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceNames_Call) Run(run func(ctx context.Context, req models.SuiXResolveNameServiceNamesRequest)) *MockISuiAPI_SuiXResolveNameServiceNames_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.SuiXResolveNameServiceNamesRequest - if args[1] != nil { - arg1 = args[1].(models.SuiXResolveNameServiceNamesRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceNames_Call) Return(suiXResolveNameServiceNamesResponse models.SuiXResolveNameServiceNamesResponse, err error) *MockISuiAPI_SuiXResolveNameServiceNames_Call { - _c.Call.Return(suiXResolveNameServiceNamesResponse, err) - return _c -} - -func (_c *MockISuiAPI_SuiXResolveNameServiceNames_Call) RunAndReturn(run func(ctx context.Context, req models.SuiXResolveNameServiceNamesRequest) (models.SuiXResolveNameServiceNamesResponse, error)) *MockISuiAPI_SuiXResolveNameServiceNames_Call { - _c.Call.Return(run) - return _c -} - -// TransferObject provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) TransferObject(ctx context.Context, req models.TransferObjectRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for TransferObject") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.TransferObjectRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.TransferObjectRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.TransferObjectRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_TransferObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferObject' -type MockISuiAPI_TransferObject_Call struct { - *mock.Call -} - -// TransferObject is a helper method to define mock.On call -// - ctx context.Context -// - req models.TransferObjectRequest -func (_e *MockISuiAPI_Expecter) TransferObject(ctx interface{}, req interface{}) *MockISuiAPI_TransferObject_Call { - return &MockISuiAPI_TransferObject_Call{Call: _e.mock.On("TransferObject", ctx, req)} -} - -func (_c *MockISuiAPI_TransferObject_Call) Run(run func(ctx context.Context, req models.TransferObjectRequest)) *MockISuiAPI_TransferObject_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.TransferObjectRequest - if args[1] != nil { - arg1 = args[1].(models.TransferObjectRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_TransferObject_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_TransferObject_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_TransferObject_Call) RunAndReturn(run func(ctx context.Context, req models.TransferObjectRequest) (models.TxnMetaData, error)) *MockISuiAPI_TransferObject_Call { - _c.Call.Return(run) - return _c -} - -// TransferSui provides a mock function for the type MockISuiAPI -func (_mock *MockISuiAPI) TransferSui(ctx context.Context, req models.TransferSuiRequest) (models.TxnMetaData, error) { - ret := _mock.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for TransferSui") - } - - var r0 models.TxnMetaData - var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, models.TransferSuiRequest) (models.TxnMetaData, error)); ok { - return returnFunc(ctx, req) - } - if returnFunc, ok := ret.Get(0).(func(context.Context, models.TransferSuiRequest) models.TxnMetaData); ok { - r0 = returnFunc(ctx, req) - } else { - r0 = ret.Get(0).(models.TxnMetaData) - } - if returnFunc, ok := ret.Get(1).(func(context.Context, models.TransferSuiRequest) error); ok { - r1 = returnFunc(ctx, req) - } else { - r1 = ret.Error(1) - } - return r0, r1 -} - -// MockISuiAPI_TransferSui_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferSui' -type MockISuiAPI_TransferSui_Call struct { - *mock.Call -} - -// TransferSui is a helper method to define mock.On call -// - ctx context.Context -// - req models.TransferSuiRequest -func (_e *MockISuiAPI_Expecter) TransferSui(ctx interface{}, req interface{}) *MockISuiAPI_TransferSui_Call { - return &MockISuiAPI_TransferSui_Call{Call: _e.mock.On("TransferSui", ctx, req)} -} - -func (_c *MockISuiAPI_TransferSui_Call) Run(run func(ctx context.Context, req models.TransferSuiRequest)) *MockISuiAPI_TransferSui_Call { - _c.Call.Run(func(args mock.Arguments) { - var arg0 context.Context - if args[0] != nil { - arg0 = args[0].(context.Context) - } - var arg1 models.TransferSuiRequest - if args[1] != nil { - arg1 = args[1].(models.TransferSuiRequest) - } - run( - arg0, - arg1, - ) - }) - return _c -} - -func (_c *MockISuiAPI_TransferSui_Call) Return(txnMetaData models.TxnMetaData, err error) *MockISuiAPI_TransferSui_Call { - _c.Call.Return(txnMetaData, err) - return _c -} - -func (_c *MockISuiAPI_TransferSui_Call) RunAndReturn(run func(ctx context.Context, req models.TransferSuiRequest) (models.TxnMetaData, error)) *MockISuiAPI_TransferSui_Call { - _c.Call.Return(run) - return _c -} diff --git a/chain/sui/mocks/sui_ptb_client.go b/chain/sui/mocks/sui_ptb_client.go new file mode 100644 index 000000000..cb37b0cfd --- /dev/null +++ b/chain/sui/mocks/sui_ptb_client.go @@ -0,0 +1,2374 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "math/big" + + "github.com/block-vision/sui-go-sdk/models" + "github.com/block-vision/sui-go-sdk/pb/sui/rpc/v2" + "github.com/block-vision/sui-go-sdk/signer" + "github.com/block-vision/sui-go-sdk/transaction" + "github.com/patrickmn/go-cache" + "github.com/smartcontractkit/chainlink-sui/relayer/client" + mock "github.com/stretchr/testify/mock" +) + +// NewMockSuiPTBClient creates a new instance of MockSuiPTBClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockSuiPTBClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSuiPTBClient { + mock := &MockSuiPTBClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockSuiPTBClient is an autogenerated mock type for the SuiPTBClient type +type MockSuiPTBClient struct { + mock.Mock +} + +type MockSuiPTBClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSuiPTBClient) EXPECT() *MockSuiPTBClient_Expecter { + return &MockSuiPTBClient_Expecter{mock: &_m.Mock} +} + +// EstimateGas provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) EstimateGas(ctx context.Context, tx *transaction.Transaction) (uint64, error) { + ret := _mock.Called(ctx, tx) + + if len(ret) == 0 { + panic("no return value specified for EstimateGas") + } + + var r0 uint64 + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *transaction.Transaction) (uint64, error)); ok { + return returnFunc(ctx, tx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *transaction.Transaction) uint64); ok { + r0 = returnFunc(ctx, tx) + } else { + r0 = ret.Get(0).(uint64) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *transaction.Transaction) error); ok { + r1 = returnFunc(ctx, tx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas' +type MockSuiPTBClient_EstimateGas_Call struct { + *mock.Call +} + +// EstimateGas is a helper method to define mock.On call +// - ctx context.Context +// - tx *transaction.Transaction +func (_e *MockSuiPTBClient_Expecter) EstimateGas(ctx interface{}, tx interface{}) *MockSuiPTBClient_EstimateGas_Call { + return &MockSuiPTBClient_EstimateGas_Call{Call: _e.mock.On("EstimateGas", ctx, tx)} +} + +func (_c *MockSuiPTBClient_EstimateGas_Call) Run(run func(ctx context.Context, tx *transaction.Transaction)) *MockSuiPTBClient_EstimateGas_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *transaction.Transaction + if args[1] != nil { + arg1 = args[1].(*transaction.Transaction) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_EstimateGas_Call) Return(v uint64, err error) *MockSuiPTBClient_EstimateGas_Call { + _c.Call.Return(v, err) + return _c +} + +func (_c *MockSuiPTBClient_EstimateGas_Call) RunAndReturn(run func(ctx context.Context, tx *transaction.Transaction) (uint64, error)) *MockSuiPTBClient_EstimateGas_Call { + _c.Call.Return(run) + return _c +} + +// FinishPTBAndSend provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) FinishPTBAndSend(ctx context.Context, txnSigner *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error) { + ret := _mock.Called(ctx, txnSigner, tx, requestType) + + if len(ret) == 0 { + panic("no return value specified for FinishPTBAndSend") + } + + var r0 *v2.ExecuteTransactionResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error)); ok { + return returnFunc(ctx, txnSigner, tx, requestType) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) *v2.ExecuteTransactionResponse); ok { + r0 = returnFunc(ctx, txnSigner, tx, requestType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.ExecuteTransactionResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *signer.Signer, *transaction.Transaction, client.TransactionRequestType) error); ok { + r1 = returnFunc(ctx, txnSigner, tx, requestType) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_FinishPTBAndSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishPTBAndSend' +type MockSuiPTBClient_FinishPTBAndSend_Call struct { + *mock.Call +} + +// FinishPTBAndSend is a helper method to define mock.On call +// - ctx context.Context +// - txnSigner *signer.Signer +// - tx *transaction.Transaction +// - requestType client.TransactionRequestType +func (_e *MockSuiPTBClient_Expecter) FinishPTBAndSend(ctx interface{}, txnSigner interface{}, tx interface{}, requestType interface{}) *MockSuiPTBClient_FinishPTBAndSend_Call { + return &MockSuiPTBClient_FinishPTBAndSend_Call{Call: _e.mock.On("FinishPTBAndSend", ctx, txnSigner, tx, requestType)} +} + +func (_c *MockSuiPTBClient_FinishPTBAndSend_Call) Run(run func(ctx context.Context, txnSigner *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType)) *MockSuiPTBClient_FinishPTBAndSend_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *signer.Signer + if args[1] != nil { + arg1 = args[1].(*signer.Signer) + } + var arg2 *transaction.Transaction + if args[2] != nil { + arg2 = args[2].(*transaction.Transaction) + } + var arg3 client.TransactionRequestType + if args[3] != nil { + arg3 = args[3].(client.TransactionRequestType) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_FinishPTBAndSend_Call) Return(executeTransactionResponse *v2.ExecuteTransactionResponse, err error) *MockSuiPTBClient_FinishPTBAndSend_Call { + _c.Call.Return(executeTransactionResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_FinishPTBAndSend_Call) RunAndReturn(run func(ctx context.Context, txnSigner *signer.Signer, tx *transaction.Transaction, requestType client.TransactionRequestType) (*v2.ExecuteTransactionResponse, error)) *MockSuiPTBClient_FinishPTBAndSend_Call { + _c.Call.Return(run) + return _c +} + +// GetBlockById provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetBlockById(ctx context.Context, checkpointDigest string) (*v2.Checkpoint, error) { + ret := _mock.Called(ctx, checkpointDigest) + + if len(ret) == 0 { + panic("no return value specified for GetBlockById") + } + + var r0 *v2.Checkpoint + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v2.Checkpoint, error)); ok { + return returnFunc(ctx, checkpointDigest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v2.Checkpoint); ok { + r0 = returnFunc(ctx, checkpointDigest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Checkpoint) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, checkpointDigest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetBlockById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockById' +type MockSuiPTBClient_GetBlockById_Call struct { + *mock.Call +} + +// GetBlockById is a helper method to define mock.On call +// - ctx context.Context +// - checkpointDigest string +func (_e *MockSuiPTBClient_Expecter) GetBlockById(ctx interface{}, checkpointDigest interface{}) *MockSuiPTBClient_GetBlockById_Call { + return &MockSuiPTBClient_GetBlockById_Call{Call: _e.mock.On("GetBlockById", ctx, checkpointDigest)} +} + +func (_c *MockSuiPTBClient_GetBlockById_Call) Run(run func(ctx context.Context, checkpointDigest string)) *MockSuiPTBClient_GetBlockById_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetBlockById_Call) Return(checkpoint *v2.Checkpoint, err error) *MockSuiPTBClient_GetBlockById_Call { + _c.Call.Return(checkpoint, err) + return _c +} + +func (_c *MockSuiPTBClient_GetBlockById_Call) RunAndReturn(run func(ctx context.Context, checkpointDigest string) (*v2.Checkpoint, error)) *MockSuiPTBClient_GetBlockById_Call { + _c.Call.Return(run) + return _c +} + +// GetCCIPPackageID provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCCIPPackageID(ctx context.Context, offRampPackageID string) (string, error) { + ret := _mock.Called(ctx, offRampPackageID) + + if len(ret) == 0 { + panic("no return value specified for GetCCIPPackageID") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { + return returnFunc(ctx, offRampPackageID) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { + r0 = returnFunc(ctx, offRampPackageID) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, offRampPackageID) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCCIPPackageID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCCIPPackageID' +type MockSuiPTBClient_GetCCIPPackageID_Call struct { + *mock.Call +} + +// GetCCIPPackageID is a helper method to define mock.On call +// - ctx context.Context +// - offRampPackageID string +func (_e *MockSuiPTBClient_Expecter) GetCCIPPackageID(ctx interface{}, offRampPackageID interface{}) *MockSuiPTBClient_GetCCIPPackageID_Call { + return &MockSuiPTBClient_GetCCIPPackageID_Call{Call: _e.mock.On("GetCCIPPackageID", ctx, offRampPackageID)} +} + +func (_c *MockSuiPTBClient_GetCCIPPackageID_Call) Run(run func(ctx context.Context, offRampPackageID string)) *MockSuiPTBClient_GetCCIPPackageID_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCCIPPackageID_Call) Return(s string, err error) *MockSuiPTBClient_GetCCIPPackageID_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockSuiPTBClient_GetCCIPPackageID_Call) RunAndReturn(run func(ctx context.Context, offRampPackageID string) (string, error)) *MockSuiPTBClient_GetCCIPPackageID_Call { + _c.Call.Return(run) + return _c +} + +// GetCache provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCache() *cache.Cache { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + + var r0 *cache.Cache + if returnFunc, ok := ret.Get(0).(func() *cache.Cache); ok { + r0 = returnFunc() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cache.Cache) + } + } + return r0 +} + +// MockSuiPTBClient_GetCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCache' +type MockSuiPTBClient_GetCache_Call struct { + *mock.Call +} + +// GetCache is a helper method to define mock.On call +func (_e *MockSuiPTBClient_Expecter) GetCache() *MockSuiPTBClient_GetCache_Call { + return &MockSuiPTBClient_GetCache_Call{Call: _e.mock.On("GetCache")} +} + +func (_c *MockSuiPTBClient_GetCache_Call) Run(run func()) *MockSuiPTBClient_GetCache_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCache_Call) Return(cache1 *cache.Cache) *MockSuiPTBClient_GetCache_Call { + _c.Call.Return(cache1) + return _c +} + +func (_c *MockSuiPTBClient_GetCache_Call) RunAndReturn(run func() *cache.Cache) *MockSuiPTBClient_GetCache_Call { + _c.Call.Return(run) + return _c +} + +// GetCachedValue provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCachedValue(key string) (any, bool) { + ret := _mock.Called(key) + + if len(ret) == 0 { + panic("no return value specified for GetCachedValue") + } + + var r0 any + var r1 bool + if returnFunc, ok := ret.Get(0).(func(string) (any, bool)); ok { + return returnFunc(key) + } + if returnFunc, ok := ret.Get(0).(func(string) any); ok { + r0 = returnFunc(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(any) + } + } + if returnFunc, ok := ret.Get(1).(func(string) bool); ok { + r1 = returnFunc(key) + } else { + r1 = ret.Get(1).(bool) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCachedValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCachedValue' +type MockSuiPTBClient_GetCachedValue_Call struct { + *mock.Call +} + +// GetCachedValue is a helper method to define mock.On call +// - key string +func (_e *MockSuiPTBClient_Expecter) GetCachedValue(key interface{}) *MockSuiPTBClient_GetCachedValue_Call { + return &MockSuiPTBClient_GetCachedValue_Call{Call: _e.mock.On("GetCachedValue", key)} +} + +func (_c *MockSuiPTBClient_GetCachedValue_Call) Run(run func(key string)) *MockSuiPTBClient_GetCachedValue_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCachedValue_Call) Return(v any, b bool) *MockSuiPTBClient_GetCachedValue_Call { + _c.Call.Return(v, b) + return _c +} + +func (_c *MockSuiPTBClient_GetCachedValue_Call) RunAndReturn(run func(key string) (any, bool)) *MockSuiPTBClient_GetCachedValue_Call { + _c.Call.Return(run) + return _c +} + +// GetCachedValues provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCachedValues(keys []string) (map[string]any, bool) { + ret := _mock.Called(keys) + + if len(ret) == 0 { + panic("no return value specified for GetCachedValues") + } + + var r0 map[string]any + var r1 bool + if returnFunc, ok := ret.Get(0).(func([]string) (map[string]any, bool)); ok { + return returnFunc(keys) + } + if returnFunc, ok := ret.Get(0).(func([]string) map[string]any); ok { + r0 = returnFunc(keys) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]any) + } + } + if returnFunc, ok := ret.Get(1).(func([]string) bool); ok { + r1 = returnFunc(keys) + } else { + r1 = ret.Get(1).(bool) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCachedValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCachedValues' +type MockSuiPTBClient_GetCachedValues_Call struct { + *mock.Call +} + +// GetCachedValues is a helper method to define mock.On call +// - keys []string +func (_e *MockSuiPTBClient_Expecter) GetCachedValues(keys interface{}) *MockSuiPTBClient_GetCachedValues_Call { + return &MockSuiPTBClient_GetCachedValues_Call{Call: _e.mock.On("GetCachedValues", keys)} +} + +func (_c *MockSuiPTBClient_GetCachedValues_Call) Run(run func(keys []string)) *MockSuiPTBClient_GetCachedValues_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 []string + if args[0] != nil { + arg0 = args[0].([]string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCachedValues_Call) Return(stringToV map[string]any, b bool) *MockSuiPTBClient_GetCachedValues_Call { + _c.Call.Return(stringToV, b) + return _c +} + +func (_c *MockSuiPTBClient_GetCachedValues_Call) RunAndReturn(run func(keys []string) (map[string]any, bool)) *MockSuiPTBClient_GetCachedValues_Call { + _c.Call.Return(run) + return _c +} + +// GetCheckpointData provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCheckpointData(ctx context.Context, checkpointSequenceNumber uint64) (*client.CheckpointData, error) { + ret := _mock.Called(ctx, checkpointSequenceNumber) + + if len(ret) == 0 { + panic("no return value specified for GetCheckpointData") + } + + var r0 *client.CheckpointData + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uint64) (*client.CheckpointData, error)); ok { + return returnFunc(ctx, checkpointSequenceNumber) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uint64) *client.CheckpointData); ok { + r0 = returnFunc(ctx, checkpointSequenceNumber) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*client.CheckpointData) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uint64) error); ok { + r1 = returnFunc(ctx, checkpointSequenceNumber) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCheckpointData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCheckpointData' +type MockSuiPTBClient_GetCheckpointData_Call struct { + *mock.Call +} + +// GetCheckpointData is a helper method to define mock.On call +// - ctx context.Context +// - checkpointSequenceNumber uint64 +func (_e *MockSuiPTBClient_Expecter) GetCheckpointData(ctx interface{}, checkpointSequenceNumber interface{}) *MockSuiPTBClient_GetCheckpointData_Call { + return &MockSuiPTBClient_GetCheckpointData_Call{Call: _e.mock.On("GetCheckpointData", ctx, checkpointSequenceNumber)} +} + +func (_c *MockSuiPTBClient_GetCheckpointData_Call) Run(run func(ctx context.Context, checkpointSequenceNumber uint64)) *MockSuiPTBClient_GetCheckpointData_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uint64 + if args[1] != nil { + arg1 = args[1].(uint64) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCheckpointData_Call) Return(checkpointData *client.CheckpointData, err error) *MockSuiPTBClient_GetCheckpointData_Call { + _c.Call.Return(checkpointData, err) + return _c +} + +func (_c *MockSuiPTBClient_GetCheckpointData_Call) RunAndReturn(run func(ctx context.Context, checkpointSequenceNumber uint64) (*client.CheckpointData, error)) *MockSuiPTBClient_GetCheckpointData_Call { + _c.Call.Return(run) + return _c +} + +// GetCoinMetadata provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCoinMetadata(ctx context.Context, coinType string) (models.CoinMetadataResponse, error) { + ret := _mock.Called(ctx, coinType) + + if len(ret) == 0 { + panic("no return value specified for GetCoinMetadata") + } + + var r0 models.CoinMetadataResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (models.CoinMetadataResponse, error)); ok { + return returnFunc(ctx, coinType) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) models.CoinMetadataResponse); ok { + r0 = returnFunc(ctx, coinType) + } else { + r0 = ret.Get(0).(models.CoinMetadataResponse) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, coinType) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCoinMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCoinMetadata' +type MockSuiPTBClient_GetCoinMetadata_Call struct { + *mock.Call +} + +// GetCoinMetadata is a helper method to define mock.On call +// - ctx context.Context +// - coinType string +func (_e *MockSuiPTBClient_Expecter) GetCoinMetadata(ctx interface{}, coinType interface{}) *MockSuiPTBClient_GetCoinMetadata_Call { + return &MockSuiPTBClient_GetCoinMetadata_Call{Call: _e.mock.On("GetCoinMetadata", ctx, coinType)} +} + +func (_c *MockSuiPTBClient_GetCoinMetadata_Call) Run(run func(ctx context.Context, coinType string)) *MockSuiPTBClient_GetCoinMetadata_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCoinMetadata_Call) Return(coinMetadataResponse models.CoinMetadataResponse, err error) *MockSuiPTBClient_GetCoinMetadata_Call { + _c.Call.Return(coinMetadataResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_GetCoinMetadata_Call) RunAndReturn(run func(ctx context.Context, coinType string) (models.CoinMetadataResponse, error)) *MockSuiPTBClient_GetCoinMetadata_Call { + _c.Call.Return(run) + return _c +} + +// GetCoinsByAddress provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetCoinsByAddress(ctx context.Context, address string) ([]*v2.Object, error) { + ret := _mock.Called(ctx, address) + + if len(ret) == 0 { + panic("no return value specified for GetCoinsByAddress") + } + + var r0 []*v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]*v2.Object, error)); ok { + return returnFunc(ctx, address) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) []*v2.Object); ok { + r0 = returnFunc(ctx, address) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, address) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetCoinsByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCoinsByAddress' +type MockSuiPTBClient_GetCoinsByAddress_Call struct { + *mock.Call +} + +// GetCoinsByAddress is a helper method to define mock.On call +// - ctx context.Context +// - address string +func (_e *MockSuiPTBClient_Expecter) GetCoinsByAddress(ctx interface{}, address interface{}) *MockSuiPTBClient_GetCoinsByAddress_Call { + return &MockSuiPTBClient_GetCoinsByAddress_Call{Call: _e.mock.On("GetCoinsByAddress", ctx, address)} +} + +func (_c *MockSuiPTBClient_GetCoinsByAddress_Call) Run(run func(ctx context.Context, address string)) *MockSuiPTBClient_GetCoinsByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetCoinsByAddress_Call) Return(objects []*v2.Object, err error) *MockSuiPTBClient_GetCoinsByAddress_Call { + _c.Call.Return(objects, err) + return _c +} + +func (_c *MockSuiPTBClient_GetCoinsByAddress_Call) RunAndReturn(run func(ctx context.Context, address string) ([]*v2.Object, error)) *MockSuiPTBClient_GetCoinsByAddress_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestCheckpoint provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetLatestCheckpoint(ctx context.Context) (*v2.Checkpoint, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetLatestCheckpoint") + } + + var r0 *v2.Checkpoint + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v2.Checkpoint, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *v2.Checkpoint); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Checkpoint) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetLatestCheckpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestCheckpoint' +type MockSuiPTBClient_GetLatestCheckpoint_Call struct { + *mock.Call +} + +// GetLatestCheckpoint is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSuiPTBClient_Expecter) GetLatestCheckpoint(ctx interface{}) *MockSuiPTBClient_GetLatestCheckpoint_Call { + return &MockSuiPTBClient_GetLatestCheckpoint_Call{Call: _e.mock.On("GetLatestCheckpoint", ctx)} +} + +func (_c *MockSuiPTBClient_GetLatestCheckpoint_Call) Run(run func(ctx context.Context)) *MockSuiPTBClient_GetLatestCheckpoint_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestCheckpoint_Call) Return(checkpoint *v2.Checkpoint, err error) *MockSuiPTBClient_GetLatestCheckpoint_Call { + _c.Call.Return(checkpoint, err) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestCheckpoint_Call) RunAndReturn(run func(ctx context.Context) (*v2.Checkpoint, error)) *MockSuiPTBClient_GetLatestCheckpoint_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestEpoch provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetLatestEpoch(ctx context.Context) (*v2.Epoch, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetLatestEpoch") + } + + var r0 *v2.Epoch + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*v2.Epoch, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *v2.Epoch); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Epoch) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetLatestEpoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestEpoch' +type MockSuiPTBClient_GetLatestEpoch_Call struct { + *mock.Call +} + +// GetLatestEpoch is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSuiPTBClient_Expecter) GetLatestEpoch(ctx interface{}) *MockSuiPTBClient_GetLatestEpoch_Call { + return &MockSuiPTBClient_GetLatestEpoch_Call{Call: _e.mock.On("GetLatestEpoch", ctx)} +} + +func (_c *MockSuiPTBClient_GetLatestEpoch_Call) Run(run func(ctx context.Context)) *MockSuiPTBClient_GetLatestEpoch_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestEpoch_Call) Return(epoch *v2.Epoch, err error) *MockSuiPTBClient_GetLatestEpoch_Call { + _c.Call.Return(epoch, err) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestEpoch_Call) RunAndReturn(run func(ctx context.Context) (*v2.Epoch, error)) *MockSuiPTBClient_GetLatestEpoch_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestPackageId provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetLatestPackageId(ctx context.Context, packageId string, module string) (string, error) { + ret := _mock.Called(ctx, packageId, module) + + if len(ret) == 0 { + panic("no return value specified for GetLatestPackageId") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { + return returnFunc(ctx, packageId, module) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { + r0 = returnFunc(ctx, packageId, module) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, packageId, module) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetLatestPackageId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestPackageId' +type MockSuiPTBClient_GetLatestPackageId_Call struct { + *mock.Call +} + +// GetLatestPackageId is a helper method to define mock.On call +// - ctx context.Context +// - packageId string +// - module string +func (_e *MockSuiPTBClient_Expecter) GetLatestPackageId(ctx interface{}, packageId interface{}, module interface{}) *MockSuiPTBClient_GetLatestPackageId_Call { + return &MockSuiPTBClient_GetLatestPackageId_Call{Call: _e.mock.On("GetLatestPackageId", ctx, packageId, module)} +} + +func (_c *MockSuiPTBClient_GetLatestPackageId_Call) Run(run func(ctx context.Context, packageId string, module string)) *MockSuiPTBClient_GetLatestPackageId_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestPackageId_Call) Return(s string, err error) *MockSuiPTBClient_GetLatestPackageId_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockSuiPTBClient_GetLatestPackageId_Call) RunAndReturn(run func(ctx context.Context, packageId string, module string) (string, error)) *MockSuiPTBClient_GetLatestPackageId_Call { + _c.Call.Return(run) + return _c +} + +// GetNormalizedModule provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetNormalizedModule(ctx context.Context, packageId string, moduleId string) (models.GetNormalizedMoveModuleResponse, error) { + ret := _mock.Called(ctx, packageId, moduleId) + + if len(ret) == 0 { + panic("no return value specified for GetNormalizedModule") + } + + var r0 models.GetNormalizedMoveModuleResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (models.GetNormalizedMoveModuleResponse, error)); ok { + return returnFunc(ctx, packageId, moduleId) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) models.GetNormalizedMoveModuleResponse); ok { + r0 = returnFunc(ctx, packageId, moduleId) + } else { + r0 = ret.Get(0).(models.GetNormalizedMoveModuleResponse) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, packageId, moduleId) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetNormalizedModule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNormalizedModule' +type MockSuiPTBClient_GetNormalizedModule_Call struct { + *mock.Call +} + +// GetNormalizedModule is a helper method to define mock.On call +// - ctx context.Context +// - packageId string +// - moduleId string +func (_e *MockSuiPTBClient_Expecter) GetNormalizedModule(ctx interface{}, packageId interface{}, moduleId interface{}) *MockSuiPTBClient_GetNormalizedModule_Call { + return &MockSuiPTBClient_GetNormalizedModule_Call{Call: _e.mock.On("GetNormalizedModule", ctx, packageId, moduleId)} +} + +func (_c *MockSuiPTBClient_GetNormalizedModule_Call) Run(run func(ctx context.Context, packageId string, moduleId string)) *MockSuiPTBClient_GetNormalizedModule_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetNormalizedModule_Call) Return(getNormalizedMoveModuleResponse models.GetNormalizedMoveModuleResponse, err error) *MockSuiPTBClient_GetNormalizedModule_Call { + _c.Call.Return(getNormalizedMoveModuleResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_GetNormalizedModule_Call) RunAndReturn(run func(ctx context.Context, packageId string, moduleId string) (models.GetNormalizedMoveModuleResponse, error)) *MockSuiPTBClient_GetNormalizedModule_Call { + _c.Call.Return(run) + return _c +} + +// GetParentObjectID provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetParentObjectID(ctx context.Context, packageID string, moduleID string, pointerObjectName string) (string, error) { + ret := _mock.Called(ctx, packageID, moduleID, pointerObjectName) + + if len(ret) == 0 { + panic("no return value specified for GetParentObjectID") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (string, error)); ok { + return returnFunc(ctx, packageID, moduleID, pointerObjectName) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) string); ok { + r0 = returnFunc(ctx, packageID, moduleID, pointerObjectName) + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = returnFunc(ctx, packageID, moduleID, pointerObjectName) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetParentObjectID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentObjectID' +type MockSuiPTBClient_GetParentObjectID_Call struct { + *mock.Call +} + +// GetParentObjectID is a helper method to define mock.On call +// - ctx context.Context +// - packageID string +// - moduleID string +// - pointerObjectName string +func (_e *MockSuiPTBClient_Expecter) GetParentObjectID(ctx interface{}, packageID interface{}, moduleID interface{}, pointerObjectName interface{}) *MockSuiPTBClient_GetParentObjectID_Call { + return &MockSuiPTBClient_GetParentObjectID_Call{Call: _e.mock.On("GetParentObjectID", ctx, packageID, moduleID, pointerObjectName)} +} + +func (_c *MockSuiPTBClient_GetParentObjectID_Call) Run(run func(ctx context.Context, packageID string, moduleID string, pointerObjectName string)) *MockSuiPTBClient_GetParentObjectID_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetParentObjectID_Call) Return(s string, err error) *MockSuiPTBClient_GetParentObjectID_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockSuiPTBClient_GetParentObjectID_Call) RunAndReturn(run func(ctx context.Context, packageID string, moduleID string, pointerObjectName string) (string, error)) *MockSuiPTBClient_GetParentObjectID_Call { + _c.Call.Return(run) + return _c +} + +// GetReferenceGasPrice provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetReferenceGasPrice(ctx context.Context) (*big.Int, error) { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetReferenceGasPrice") + } + + var r0 *big.Int + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { + return returnFunc(ctx) + } + if returnFunc, ok := ret.Get(0).(func(context.Context) *big.Int); ok { + r0 = returnFunc(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*big.Int) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = returnFunc(ctx) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetReferenceGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReferenceGasPrice' +type MockSuiPTBClient_GetReferenceGasPrice_Call struct { + *mock.Call +} + +// GetReferenceGasPrice is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSuiPTBClient_Expecter) GetReferenceGasPrice(ctx interface{}) *MockSuiPTBClient_GetReferenceGasPrice_Call { + return &MockSuiPTBClient_GetReferenceGasPrice_Call{Call: _e.mock.On("GetReferenceGasPrice", ctx)} +} + +func (_c *MockSuiPTBClient_GetReferenceGasPrice_Call) Run(run func(ctx context.Context)) *MockSuiPTBClient_GetReferenceGasPrice_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetReferenceGasPrice_Call) Return(intParam *big.Int, err error) *MockSuiPTBClient_GetReferenceGasPrice_Call { + _c.Call.Return(intParam, err) + return _c +} + +func (_c *MockSuiPTBClient_GetReferenceGasPrice_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockSuiPTBClient_GetReferenceGasPrice_Call { + _c.Call.Return(run) + return _c +} + +// GetSUIBalance provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetSUIBalance(ctx context.Context, address string) (*v2.Balance, error) { + ret := _mock.Called(ctx, address) + + if len(ret) == 0 { + panic("no return value specified for GetSUIBalance") + } + + var r0 *v2.Balance + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v2.Balance, error)); ok { + return returnFunc(ctx, address) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v2.Balance); ok { + r0 = returnFunc(ctx, address) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Balance) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, address) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetSUIBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSUIBalance' +type MockSuiPTBClient_GetSUIBalance_Call struct { + *mock.Call +} + +// GetSUIBalance is a helper method to define mock.On call +// - ctx context.Context +// - address string +func (_e *MockSuiPTBClient_Expecter) GetSUIBalance(ctx interface{}, address interface{}) *MockSuiPTBClient_GetSUIBalance_Call { + return &MockSuiPTBClient_GetSUIBalance_Call{Call: _e.mock.On("GetSUIBalance", ctx, address)} +} + +func (_c *MockSuiPTBClient_GetSUIBalance_Call) Run(run func(ctx context.Context, address string)) *MockSuiPTBClient_GetSUIBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetSUIBalance_Call) Return(balance *v2.Balance, err error) *MockSuiPTBClient_GetSUIBalance_Call { + _c.Call.Return(balance, err) + return _c +} + +func (_c *MockSuiPTBClient_GetSUIBalance_Call) RunAndReturn(run func(ctx context.Context, address string) (*v2.Balance, error)) *MockSuiPTBClient_GetSUIBalance_Call { + _c.Call.Return(run) + return _c +} + +// GetTransactionStatus provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetTransactionStatus(ctx context.Context, digest string) (client.TransactionResult, error) { + ret := _mock.Called(ctx, digest) + + if len(ret) == 0 { + panic("no return value specified for GetTransactionStatus") + } + + var r0 client.TransactionResult + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (client.TransactionResult, error)); ok { + return returnFunc(ctx, digest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) client.TransactionResult); ok { + r0 = returnFunc(ctx, digest) + } else { + r0 = ret.Get(0).(client.TransactionResult) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, digest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetTransactionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionStatus' +type MockSuiPTBClient_GetTransactionStatus_Call struct { + *mock.Call +} + +// GetTransactionStatus is a helper method to define mock.On call +// - ctx context.Context +// - digest string +func (_e *MockSuiPTBClient_Expecter) GetTransactionStatus(ctx interface{}, digest interface{}) *MockSuiPTBClient_GetTransactionStatus_Call { + return &MockSuiPTBClient_GetTransactionStatus_Call{Call: _e.mock.On("GetTransactionStatus", ctx, digest)} +} + +func (_c *MockSuiPTBClient_GetTransactionStatus_Call) Run(run func(ctx context.Context, digest string)) *MockSuiPTBClient_GetTransactionStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetTransactionStatus_Call) Return(transactionResult client.TransactionResult, err error) *MockSuiPTBClient_GetTransactionStatus_Call { + _c.Call.Return(transactionResult, err) + return _c +} + +func (_c *MockSuiPTBClient_GetTransactionStatus_Call) RunAndReturn(run func(ctx context.Context, digest string) (client.TransactionResult, error)) *MockSuiPTBClient_GetTransactionStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetValuesFromPackageOwnedObjectField provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) GetValuesFromPackageOwnedObjectField(ctx context.Context, packageID string, moduleID string, objectName string, fieldKeys []string) (map[string]string, error) { + ret := _mock.Called(ctx, packageID, moduleID, objectName, fieldKeys) + + if len(ret) == 0 { + panic("no return value specified for GetValuesFromPackageOwnedObjectField") + } + + var r0 map[string]string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, []string) (map[string]string, error)); ok { + return returnFunc(ctx, packageID, moduleID, objectName, fieldKeys) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, []string) map[string]string); ok { + r0 = returnFunc(ctx, packageID, moduleID, objectName, fieldKeys) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]string) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, []string) error); ok { + r1 = returnFunc(ctx, packageID, moduleID, objectName, fieldKeys) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValuesFromPackageOwnedObjectField' +type MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call struct { + *mock.Call +} + +// GetValuesFromPackageOwnedObjectField is a helper method to define mock.On call +// - ctx context.Context +// - packageID string +// - moduleID string +// - objectName string +// - fieldKeys []string +func (_e *MockSuiPTBClient_Expecter) GetValuesFromPackageOwnedObjectField(ctx interface{}, packageID interface{}, moduleID interface{}, objectName interface{}, fieldKeys interface{}) *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call { + return &MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call{Call: _e.mock.On("GetValuesFromPackageOwnedObjectField", ctx, packageID, moduleID, objectName, fieldKeys)} +} + +func (_c *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call) Run(run func(ctx context.Context, packageID string, moduleID string, objectName string, fieldKeys []string)) *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []string + if args[4] != nil { + arg4 = args[4].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call) Return(stringToString map[string]string, err error) *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call { + _c.Call.Return(stringToString, err) + return _c +} + +func (_c *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call) RunAndReturn(run func(ctx context.Context, packageID string, moduleID string, objectName string, fieldKeys []string) (map[string]string, error)) *MockSuiPTBClient_GetValuesFromPackageOwnedObjectField_Call { + _c.Call.Return(run) + return _c +} + +// HashTxBytes provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) HashTxBytes(txBytes []byte) []byte { + ret := _mock.Called(txBytes) + + if len(ret) == 0 { + panic("no return value specified for HashTxBytes") + } + + var r0 []byte + if returnFunc, ok := ret.Get(0).(func([]byte) []byte); ok { + r0 = returnFunc(txBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + return r0 +} + +// MockSuiPTBClient_HashTxBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTxBytes' +type MockSuiPTBClient_HashTxBytes_Call struct { + *mock.Call +} + +// HashTxBytes is a helper method to define mock.On call +// - txBytes []byte +func (_e *MockSuiPTBClient_Expecter) HashTxBytes(txBytes interface{}) *MockSuiPTBClient_HashTxBytes_Call { + return &MockSuiPTBClient_HashTxBytes_Call{Call: _e.mock.On("HashTxBytes", txBytes)} +} + +func (_c *MockSuiPTBClient_HashTxBytes_Call) Run(run func(txBytes []byte)) *MockSuiPTBClient_HashTxBytes_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 []byte + if args[0] != nil { + arg0 = args[0].([]byte) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_HashTxBytes_Call) Return(bytes []byte) *MockSuiPTBClient_HashTxBytes_Call { + _c.Call.Return(bytes) + return _c +} + +func (_c *MockSuiPTBClient_HashTxBytes_Call) RunAndReturn(run func(txBytes []byte) []byte) *MockSuiPTBClient_HashTxBytes_Call { + _c.Call.Return(run) + return _c +} + +// LoadModulePackageIds provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) LoadModulePackageIds(ctx context.Context, packageId string, module string) ([]string, error) { + ret := _mock.Called(ctx, packageId, module) + + if len(ret) == 0 { + panic("no return value specified for LoadModulePackageIds") + } + + var r0 []string + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]string, error)); ok { + return returnFunc(ctx, packageId, module) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []string); ok { + r0 = returnFunc(ctx, packageId, module) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, packageId, module) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_LoadModulePackageIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadModulePackageIds' +type MockSuiPTBClient_LoadModulePackageIds_Call struct { + *mock.Call +} + +// LoadModulePackageIds is a helper method to define mock.On call +// - ctx context.Context +// - packageId string +// - module string +func (_e *MockSuiPTBClient_Expecter) LoadModulePackageIds(ctx interface{}, packageId interface{}, module interface{}) *MockSuiPTBClient_LoadModulePackageIds_Call { + return &MockSuiPTBClient_LoadModulePackageIds_Call{Call: _e.mock.On("LoadModulePackageIds", ctx, packageId, module)} +} + +func (_c *MockSuiPTBClient_LoadModulePackageIds_Call) Run(run func(ctx context.Context, packageId string, module string)) *MockSuiPTBClient_LoadModulePackageIds_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_LoadModulePackageIds_Call) Return(strings []string, err error) *MockSuiPTBClient_LoadModulePackageIds_Call { + _c.Call.Return(strings, err) + return _c +} + +func (_c *MockSuiPTBClient_LoadModulePackageIds_Call) RunAndReturn(run func(ctx context.Context, packageId string, module string) ([]string, error)) *MockSuiPTBClient_LoadModulePackageIds_Call { + _c.Call.Return(run) + return _c +} + +// MoveCall provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) MoveCall(ctx context.Context, req client.MoveCallRequest) (client.TxnMetaData, error) { + ret := _mock.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for MoveCall") + } + + var r0 client.TxnMetaData + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, client.MoveCallRequest) (client.TxnMetaData, error)); ok { + return returnFunc(ctx, req) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, client.MoveCallRequest) client.TxnMetaData); ok { + r0 = returnFunc(ctx, req) + } else { + r0 = ret.Get(0).(client.TxnMetaData) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, client.MoveCallRequest) error); ok { + r1 = returnFunc(ctx, req) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_MoveCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MoveCall' +type MockSuiPTBClient_MoveCall_Call struct { + *mock.Call +} + +// MoveCall is a helper method to define mock.On call +// - ctx context.Context +// - req client.MoveCallRequest +func (_e *MockSuiPTBClient_Expecter) MoveCall(ctx interface{}, req interface{}) *MockSuiPTBClient_MoveCall_Call { + return &MockSuiPTBClient_MoveCall_Call{Call: _e.mock.On("MoveCall", ctx, req)} +} + +func (_c *MockSuiPTBClient_MoveCall_Call) Run(run func(ctx context.Context, req client.MoveCallRequest)) *MockSuiPTBClient_MoveCall_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 client.MoveCallRequest + if args[1] != nil { + arg1 = args[1].(client.MoveCallRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_MoveCall_Call) Return(txnMetaData client.TxnMetaData, err error) *MockSuiPTBClient_MoveCall_Call { + _c.Call.Return(txnMetaData, err) + return _c +} + +func (_c *MockSuiPTBClient_MoveCall_Call) RunAndReturn(run func(ctx context.Context, req client.MoveCallRequest) (client.TxnMetaData, error)) *MockSuiPTBClient_MoveCall_Call { + _c.Call.Return(run) + return _c +} + +// QueryCoinsByAddress provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) QueryCoinsByAddress(ctx context.Context, address string, coinType string) ([]*v2.Object, error) { + ret := _mock.Called(ctx, address, coinType) + + if len(ret) == 0 { + panic("no return value specified for QueryCoinsByAddress") + } + + var r0 []*v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]*v2.Object, error)); ok { + return returnFunc(ctx, address, coinType) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []*v2.Object); ok { + r0 = returnFunc(ctx, address, coinType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, address, coinType) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_QueryCoinsByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryCoinsByAddress' +type MockSuiPTBClient_QueryCoinsByAddress_Call struct { + *mock.Call +} + +// QueryCoinsByAddress is a helper method to define mock.On call +// - ctx context.Context +// - address string +// - coinType string +func (_e *MockSuiPTBClient_Expecter) QueryCoinsByAddress(ctx interface{}, address interface{}, coinType interface{}) *MockSuiPTBClient_QueryCoinsByAddress_Call { + return &MockSuiPTBClient_QueryCoinsByAddress_Call{Call: _e.mock.On("QueryCoinsByAddress", ctx, address, coinType)} +} + +func (_c *MockSuiPTBClient_QueryCoinsByAddress_Call) Run(run func(ctx context.Context, address string, coinType string)) *MockSuiPTBClient_QueryCoinsByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_QueryCoinsByAddress_Call) Return(objects []*v2.Object, err error) *MockSuiPTBClient_QueryCoinsByAddress_Call { + _c.Call.Return(objects, err) + return _c +} + +func (_c *MockSuiPTBClient_QueryCoinsByAddress_Call) RunAndReturn(run func(ctx context.Context, address string, coinType string) ([]*v2.Object, error)) *MockSuiPTBClient_QueryCoinsByAddress_Call { + _c.Call.Return(run) + return _c +} + +// QueryEvents provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) QueryEvents(ctx context.Context, filter client.EventFilterByMoveEventModule, limit *uint, cursor *client.EventId, sortOptions *client.QuerySortOptions) (*models.PaginatedEventsResponse, error) { + ret := _mock.Called(ctx, filter, limit, cursor, sortOptions) + + if len(ret) == 0 { + panic("no return value specified for QueryEvents") + } + + var r0 *models.PaginatedEventsResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, client.EventFilterByMoveEventModule, *uint, *client.EventId, *client.QuerySortOptions) (*models.PaginatedEventsResponse, error)); ok { + return returnFunc(ctx, filter, limit, cursor, sortOptions) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, client.EventFilterByMoveEventModule, *uint, *client.EventId, *client.QuerySortOptions) *models.PaginatedEventsResponse); ok { + r0 = returnFunc(ctx, filter, limit, cursor, sortOptions) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.PaginatedEventsResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, client.EventFilterByMoveEventModule, *uint, *client.EventId, *client.QuerySortOptions) error); ok { + r1 = returnFunc(ctx, filter, limit, cursor, sortOptions) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_QueryEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryEvents' +type MockSuiPTBClient_QueryEvents_Call struct { + *mock.Call +} + +// QueryEvents is a helper method to define mock.On call +// - ctx context.Context +// - filter client.EventFilterByMoveEventModule +// - limit *uint +// - cursor *client.EventId +// - sortOptions *client.QuerySortOptions +func (_e *MockSuiPTBClient_Expecter) QueryEvents(ctx interface{}, filter interface{}, limit interface{}, cursor interface{}, sortOptions interface{}) *MockSuiPTBClient_QueryEvents_Call { + return &MockSuiPTBClient_QueryEvents_Call{Call: _e.mock.On("QueryEvents", ctx, filter, limit, cursor, sortOptions)} +} + +func (_c *MockSuiPTBClient_QueryEvents_Call) Run(run func(ctx context.Context, filter client.EventFilterByMoveEventModule, limit *uint, cursor *client.EventId, sortOptions *client.QuerySortOptions)) *MockSuiPTBClient_QueryEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 client.EventFilterByMoveEventModule + if args[1] != nil { + arg1 = args[1].(client.EventFilterByMoveEventModule) + } + var arg2 *uint + if args[2] != nil { + arg2 = args[2].(*uint) + } + var arg3 *client.EventId + if args[3] != nil { + arg3 = args[3].(*client.EventId) + } + var arg4 *client.QuerySortOptions + if args[4] != nil { + arg4 = args[4].(*client.QuerySortOptions) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_QueryEvents_Call) Return(paginatedEventsResponse *models.PaginatedEventsResponse, err error) *MockSuiPTBClient_QueryEvents_Call { + _c.Call.Return(paginatedEventsResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_QueryEvents_Call) RunAndReturn(run func(ctx context.Context, filter client.EventFilterByMoveEventModule, limit *uint, cursor *client.EventId, sortOptions *client.QuerySortOptions) (*models.PaginatedEventsResponse, error)) *MockSuiPTBClient_QueryEvents_Call { + _c.Call.Return(run) + return _c +} + +// QueryTransactions provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) QueryTransactions(ctx context.Context, fromAddress string, cursor *v2.Checkpoint, limit *uint64) ([]*v2.ExecutedTransaction, error) { + ret := _mock.Called(ctx, fromAddress, cursor, limit) + + if len(ret) == 0 { + panic("no return value specified for QueryTransactions") + } + + var r0 []*v2.ExecutedTransaction + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *v2.Checkpoint, *uint64) ([]*v2.ExecutedTransaction, error)); ok { + return returnFunc(ctx, fromAddress, cursor, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, *v2.Checkpoint, *uint64) []*v2.ExecutedTransaction); ok { + r0 = returnFunc(ctx, fromAddress, cursor, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.ExecutedTransaction) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, *v2.Checkpoint, *uint64) error); ok { + r1 = returnFunc(ctx, fromAddress, cursor, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_QueryTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryTransactions' +type MockSuiPTBClient_QueryTransactions_Call struct { + *mock.Call +} + +// QueryTransactions is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress string +// - cursor *v2.Checkpoint +// - limit *uint64 +func (_e *MockSuiPTBClient_Expecter) QueryTransactions(ctx interface{}, fromAddress interface{}, cursor interface{}, limit interface{}) *MockSuiPTBClient_QueryTransactions_Call { + return &MockSuiPTBClient_QueryTransactions_Call{Call: _e.mock.On("QueryTransactions", ctx, fromAddress, cursor, limit)} +} + +func (_c *MockSuiPTBClient_QueryTransactions_Call) Run(run func(ctx context.Context, fromAddress string, cursor *v2.Checkpoint, limit *uint64)) *MockSuiPTBClient_QueryTransactions_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 *v2.Checkpoint + if args[2] != nil { + arg2 = args[2].(*v2.Checkpoint) + } + var arg3 *uint64 + if args[3] != nil { + arg3 = args[3].(*uint64) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_QueryTransactions_Call) Return(executedTransactions []*v2.ExecutedTransaction, err error) *MockSuiPTBClient_QueryTransactions_Call { + _c.Call.Return(executedTransactions, err) + return _c +} + +func (_c *MockSuiPTBClient_QueryTransactions_Call) RunAndReturn(run func(ctx context.Context, fromAddress string, cursor *v2.Checkpoint, limit *uint64) ([]*v2.ExecutedTransaction, error)) *MockSuiPTBClient_QueryTransactions_Call { + _c.Call.Return(run) + return _c +} + +// ReadFilterOwnedObjectIds provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) ReadFilterOwnedObjectIds(ctx context.Context, ownerAddress string, structType string, cursor []byte) ([]*v2.Object, error) { + ret := _mock.Called(ctx, ownerAddress, structType, cursor) + + if len(ret) == 0 { + panic("no return value specified for ReadFilterOwnedObjectIds") + } + + var r0 []*v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []byte) ([]*v2.Object, error)); ok { + return returnFunc(ctx, ownerAddress, structType, cursor) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, []byte) []*v2.Object); ok { + r0 = returnFunc(ctx, ownerAddress, structType, cursor) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, []byte) error); ok { + r1 = returnFunc(ctx, ownerAddress, structType, cursor) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_ReadFilterOwnedObjectIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFilterOwnedObjectIds' +type MockSuiPTBClient_ReadFilterOwnedObjectIds_Call struct { + *mock.Call +} + +// ReadFilterOwnedObjectIds is a helper method to define mock.On call +// - ctx context.Context +// - ownerAddress string +// - structType string +// - cursor []byte +func (_e *MockSuiPTBClient_Expecter) ReadFilterOwnedObjectIds(ctx interface{}, ownerAddress interface{}, structType interface{}, cursor interface{}) *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call { + return &MockSuiPTBClient_ReadFilterOwnedObjectIds_Call{Call: _e.mock.On("ReadFilterOwnedObjectIds", ctx, ownerAddress, structType, cursor)} +} + +func (_c *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call) Run(run func(ctx context.Context, ownerAddress string, structType string, cursor []byte)) *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 []byte + if args[3] != nil { + arg3 = args[3].([]byte) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call) Return(objects []*v2.Object, err error) *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call { + _c.Call.Return(objects, err) + return _c +} + +func (_c *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call) RunAndReturn(run func(ctx context.Context, ownerAddress string, structType string, cursor []byte) ([]*v2.Object, error)) *MockSuiPTBClient_ReadFilterOwnedObjectIds_Call { + _c.Call.Return(run) + return _c +} + +// ReadFunction provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) ReadFunction(ctx context.Context, packageId string, module string, function string, args []any, argTypes []string, typeArgs []string) ([]any, error) { + ret := _mock.Called(ctx, packageId, module, function, args, argTypes, typeArgs) + + if len(ret) == 0 { + panic("no return value specified for ReadFunction") + } + + var r0 []any + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, []any, []string, []string) ([]any, error)); ok { + return returnFunc(ctx, packageId, module, function, args, argTypes, typeArgs) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, []any, []string, []string) []any); ok { + r0 = returnFunc(ctx, packageId, module, function, args, argTypes, typeArgs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]any) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, []any, []string, []string) error); ok { + r1 = returnFunc(ctx, packageId, module, function, args, argTypes, typeArgs) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_ReadFunction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFunction' +type MockSuiPTBClient_ReadFunction_Call struct { + *mock.Call +} + +// ReadFunction is a helper method to define mock.On call +// - ctx context.Context +// - packageId string +// - module string +// - function string +// - args []any +// - argTypes []string +// - typeArgs []string +func (_e *MockSuiPTBClient_Expecter) ReadFunction(ctx interface{}, packageId interface{}, module interface{}, function interface{}, args interface{}, argTypes interface{}, typeArgs interface{}) *MockSuiPTBClient_ReadFunction_Call { + return &MockSuiPTBClient_ReadFunction_Call{Call: _e.mock.On("ReadFunction", ctx, packageId, module, function, args, argTypes, typeArgs)} +} + +func (_c *MockSuiPTBClient_ReadFunction_Call) Run(run func(ctx context.Context, packageId string, module string, function string, args []any, argTypes []string, typeArgs []string)) *MockSuiPTBClient_ReadFunction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 string + if args[3] != nil { + arg3 = args[3].(string) + } + var arg4 []any + if args[4] != nil { + arg4 = args[4].([]any) + } + var arg5 []string + if args[5] != nil { + arg5 = args[5].([]string) + } + var arg6 []string + if args[6] != nil { + arg6 = args[6].([]string) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_ReadFunction_Call) Return(vs []any, err error) *MockSuiPTBClient_ReadFunction_Call { + _c.Call.Return(vs, err) + return _c +} + +func (_c *MockSuiPTBClient_ReadFunction_Call) RunAndReturn(run func(ctx context.Context, packageId string, module string, function string, args []any, argTypes []string, typeArgs []string) ([]any, error)) *MockSuiPTBClient_ReadFunction_Call { + _c.Call.Return(run) + return _c +} + +// ReadObjectId provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) ReadObjectId(ctx context.Context, objectId string) (*v2.Object, error) { + ret := _mock.Called(ctx, objectId) + + if len(ret) == 0 { + panic("no return value specified for ReadObjectId") + } + + var r0 *v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*v2.Object, error)); ok { + return returnFunc(ctx, objectId) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) *v2.Object); ok { + r0 = returnFunc(ctx, objectId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, objectId) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_ReadObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadObjectId' +type MockSuiPTBClient_ReadObjectId_Call struct { + *mock.Call +} + +// ReadObjectId is a helper method to define mock.On call +// - ctx context.Context +// - objectId string +func (_e *MockSuiPTBClient_Expecter) ReadObjectId(ctx interface{}, objectId interface{}) *MockSuiPTBClient_ReadObjectId_Call { + return &MockSuiPTBClient_ReadObjectId_Call{Call: _e.mock.On("ReadObjectId", ctx, objectId)} +} + +func (_c *MockSuiPTBClient_ReadObjectId_Call) Run(run func(ctx context.Context, objectId string)) *MockSuiPTBClient_ReadObjectId_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_ReadObjectId_Call) Return(object *v2.Object, err error) *MockSuiPTBClient_ReadObjectId_Call { + _c.Call.Return(object, err) + return _c +} + +func (_c *MockSuiPTBClient_ReadObjectId_Call) RunAndReturn(run func(ctx context.Context, objectId string) (*v2.Object, error)) *MockSuiPTBClient_ReadObjectId_Call { + _c.Call.Return(run) + return _c +} + +// ReadOwnedObjects provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) ReadOwnedObjects(ctx context.Context, ownerAddress string, cursor []byte) ([]*v2.Object, error) { + ret := _mock.Called(ctx, ownerAddress, cursor) + + if len(ret) == 0 { + panic("no return value specified for ReadOwnedObjects") + } + + var r0 []*v2.Object + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) ([]*v2.Object, error)); ok { + return returnFunc(ctx, ownerAddress, cursor) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) []*v2.Object); ok { + r0 = returnFunc(ctx, ownerAddress, cursor) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*v2.Object) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, []byte) error); ok { + r1 = returnFunc(ctx, ownerAddress, cursor) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_ReadOwnedObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadOwnedObjects' +type MockSuiPTBClient_ReadOwnedObjects_Call struct { + *mock.Call +} + +// ReadOwnedObjects is a helper method to define mock.On call +// - ctx context.Context +// - ownerAddress string +// - cursor []byte +func (_e *MockSuiPTBClient_Expecter) ReadOwnedObjects(ctx interface{}, ownerAddress interface{}, cursor interface{}) *MockSuiPTBClient_ReadOwnedObjects_Call { + return &MockSuiPTBClient_ReadOwnedObjects_Call{Call: _e.mock.On("ReadOwnedObjects", ctx, ownerAddress, cursor)} +} + +func (_c *MockSuiPTBClient_ReadOwnedObjects_Call) Run(run func(ctx context.Context, ownerAddress string, cursor []byte)) *MockSuiPTBClient_ReadOwnedObjects_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []byte + if args[2] != nil { + arg2 = args[2].([]byte) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_ReadOwnedObjects_Call) Return(objects []*v2.Object, err error) *MockSuiPTBClient_ReadOwnedObjects_Call { + _c.Call.Return(objects, err) + return _c +} + +func (_c *MockSuiPTBClient_ReadOwnedObjects_Call) RunAndReturn(run func(ctx context.Context, ownerAddress string, cursor []byte) ([]*v2.Object, error)) *MockSuiPTBClient_ReadOwnedObjects_Call { + _c.Call.Return(run) + return _c +} + +// SendTransaction provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) SendTransaction(ctx context.Context, execRequest *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error) { + ret := _mock.Called(ctx, execRequest) + + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + + var r0 *v2.ExecuteTransactionResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error)); ok { + return returnFunc(ctx, execRequest) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, *v2.ExecuteTransactionRequest) *v2.ExecuteTransactionResponse); ok { + r0 = returnFunc(ctx, execRequest) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.ExecuteTransactionResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, *v2.ExecuteTransactionRequest) error); ok { + r1 = returnFunc(ctx, execRequest) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction' +type MockSuiPTBClient_SendTransaction_Call struct { + *mock.Call +} + +// SendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - execRequest *v2.ExecuteTransactionRequest +func (_e *MockSuiPTBClient_Expecter) SendTransaction(ctx interface{}, execRequest interface{}) *MockSuiPTBClient_SendTransaction_Call { + return &MockSuiPTBClient_SendTransaction_Call{Call: _e.mock.On("SendTransaction", ctx, execRequest)} +} + +func (_c *MockSuiPTBClient_SendTransaction_Call) Run(run func(ctx context.Context, execRequest *v2.ExecuteTransactionRequest)) *MockSuiPTBClient_SendTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 *v2.ExecuteTransactionRequest + if args[1] != nil { + arg1 = args[1].(*v2.ExecuteTransactionRequest) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_SendTransaction_Call) Return(executeTransactionResponse *v2.ExecuteTransactionResponse, err error) *MockSuiPTBClient_SendTransaction_Call { + _c.Call.Return(executeTransactionResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_SendTransaction_Call) RunAndReturn(run func(ctx context.Context, execRequest *v2.ExecuteTransactionRequest) (*v2.ExecuteTransactionResponse, error)) *MockSuiPTBClient_SendTransaction_Call { + _c.Call.Return(run) + return _c +} + +// SetCachedValue provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) SetCachedValue(key string, value any) { + _mock.Called(key, value) + return +} + +// MockSuiPTBClient_SetCachedValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCachedValue' +type MockSuiPTBClient_SetCachedValue_Call struct { + *mock.Call +} + +// SetCachedValue is a helper method to define mock.On call +// - key string +// - value any +func (_e *MockSuiPTBClient_Expecter) SetCachedValue(key interface{}, value interface{}) *MockSuiPTBClient_SetCachedValue_Call { + return &MockSuiPTBClient_SetCachedValue_Call{Call: _e.mock.On("SetCachedValue", key, value)} +} + +func (_c *MockSuiPTBClient_SetCachedValue_Call) Run(run func(key string, value any)) *MockSuiPTBClient_SetCachedValue_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + var arg1 any + if args[1] != nil { + arg1 = args[1].(any) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_SetCachedValue_Call) Return() *MockSuiPTBClient_SetCachedValue_Call { + _c.Call.Return() + return _c +} + +func (_c *MockSuiPTBClient_SetCachedValue_Call) RunAndReturn(run func(key string, value any)) *MockSuiPTBClient_SetCachedValue_Call { + _c.Run(run) + return _c +} + +// SetCachedValues provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) SetCachedValues(keyValues map[string]any) { + _mock.Called(keyValues) + return +} + +// MockSuiPTBClient_SetCachedValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCachedValues' +type MockSuiPTBClient_SetCachedValues_Call struct { + *mock.Call +} + +// SetCachedValues is a helper method to define mock.On call +// - keyValues map[string]any +func (_e *MockSuiPTBClient_Expecter) SetCachedValues(keyValues interface{}) *MockSuiPTBClient_SetCachedValues_Call { + return &MockSuiPTBClient_SetCachedValues_Call{Call: _e.mock.On("SetCachedValues", keyValues)} +} + +func (_c *MockSuiPTBClient_SetCachedValues_Call) Run(run func(keyValues map[string]any)) *MockSuiPTBClient_SetCachedValues_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 map[string]any + if args[0] != nil { + arg0 = args[0].(map[string]any) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_SetCachedValues_Call) Return() *MockSuiPTBClient_SetCachedValues_Call { + _c.Call.Return() + return _c +} + +func (_c *MockSuiPTBClient_SetCachedValues_Call) RunAndReturn(run func(keyValues map[string]any)) *MockSuiPTBClient_SetCachedValues_Call { + _c.Run(run) + return _c +} + +// SignAndSendTransaction provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) SignAndSendTransaction(ctx context.Context, txBytesRaw string, signerPublicKey []byte) (*v2.ExecuteTransactionResponse, error) { + ret := _mock.Called(ctx, txBytesRaw, signerPublicKey) + + if len(ret) == 0 { + panic("no return value specified for SignAndSendTransaction") + } + + var r0 *v2.ExecuteTransactionResponse + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) (*v2.ExecuteTransactionResponse, error)); ok { + return returnFunc(ctx, txBytesRaw, signerPublicKey) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) *v2.ExecuteTransactionResponse); ok { + r0 = returnFunc(ctx, txBytesRaw, signerPublicKey) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v2.ExecuteTransactionResponse) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, []byte) error); ok { + r1 = returnFunc(ctx, txBytesRaw, signerPublicKey) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_SignAndSendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignAndSendTransaction' +type MockSuiPTBClient_SignAndSendTransaction_Call struct { + *mock.Call +} + +// SignAndSendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - txBytesRaw string +// - signerPublicKey []byte +func (_e *MockSuiPTBClient_Expecter) SignAndSendTransaction(ctx interface{}, txBytesRaw interface{}, signerPublicKey interface{}) *MockSuiPTBClient_SignAndSendTransaction_Call { + return &MockSuiPTBClient_SignAndSendTransaction_Call{Call: _e.mock.On("SignAndSendTransaction", ctx, txBytesRaw, signerPublicKey)} +} + +func (_c *MockSuiPTBClient_SignAndSendTransaction_Call) Run(run func(ctx context.Context, txBytesRaw string, signerPublicKey []byte)) *MockSuiPTBClient_SignAndSendTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []byte + if args[2] != nil { + arg2 = args[2].([]byte) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_SignAndSendTransaction_Call) Return(executeTransactionResponse *v2.ExecuteTransactionResponse, err error) *MockSuiPTBClient_SignAndSendTransaction_Call { + _c.Call.Return(executeTransactionResponse, err) + return _c +} + +func (_c *MockSuiPTBClient_SignAndSendTransaction_Call) RunAndReturn(run func(ctx context.Context, txBytesRaw string, signerPublicKey []byte) (*v2.ExecuteTransactionResponse, error)) *MockSuiPTBClient_SignAndSendTransaction_Call { + _c.Call.Return(run) + return _c +} + +// SimulatePTB provides a mock function for the type MockSuiPTBClient +func (_mock *MockSuiPTBClient) SimulatePTB(ctx context.Context, bcsBytes []byte) ([]any, error) { + ret := _mock.Called(ctx, bcsBytes) + + if len(ret) == 0 { + panic("no return value specified for SimulatePTB") + } + + var r0 []any + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) ([]any, error)); ok { + return returnFunc(ctx, bcsBytes) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) []any); ok { + r0 = returnFunc(ctx, bcsBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]any) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { + r1 = returnFunc(ctx, bcsBytes) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiPTBClient_SimulatePTB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimulatePTB' +type MockSuiPTBClient_SimulatePTB_Call struct { + *mock.Call +} + +// SimulatePTB is a helper method to define mock.On call +// - ctx context.Context +// - bcsBytes []byte +func (_e *MockSuiPTBClient_Expecter) SimulatePTB(ctx interface{}, bcsBytes interface{}) *MockSuiPTBClient_SimulatePTB_Call { + return &MockSuiPTBClient_SimulatePTB_Call{Call: _e.mock.On("SimulatePTB", ctx, bcsBytes)} +} + +func (_c *MockSuiPTBClient_SimulatePTB_Call) Run(run func(ctx context.Context, bcsBytes []byte)) *MockSuiPTBClient_SimulatePTB_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []byte + if args[1] != nil { + arg1 = args[1].([]byte) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSuiPTBClient_SimulatePTB_Call) Return(vs []any, err error) *MockSuiPTBClient_SimulatePTB_Call { + _c.Call.Return(vs, err) + return _c +} + +func (_c *MockSuiPTBClient_SimulatePTB_Call) RunAndReturn(run func(ctx context.Context, bcsBytes []byte) ([]any, error)) *MockSuiPTBClient_SimulatePTB_Call { + _c.Call.Return(run) + return _c +} diff --git a/chain/sui/mocks/sui_signer.go b/chain/sui/mocks/sui_signer.go new file mode 100644 index 000000000..0bf9898c8 --- /dev/null +++ b/chain/sui/mocks/sui_signer.go @@ -0,0 +1,151 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewMockSuiSigner creates a new instance of MockSuiSigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockSuiSigner(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSuiSigner { + mock := &MockSuiSigner{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} + +// MockSuiSigner is an autogenerated mock type for the SuiSigner type +type MockSuiSigner struct { + mock.Mock +} + +type MockSuiSigner_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSuiSigner) EXPECT() *MockSuiSigner_Expecter { + return &MockSuiSigner_Expecter{mock: &_m.Mock} +} + +// GetAddress provides a mock function for the type MockSuiSigner +func (_mock *MockSuiSigner) GetAddress() (string, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAddress") + } + + var r0 string + var r1 error + if returnFunc, ok := ret.Get(0).(func() (string, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func() error); ok { + r1 = returnFunc() + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiSigner_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress' +type MockSuiSigner_GetAddress_Call struct { + *mock.Call +} + +// GetAddress is a helper method to define mock.On call +func (_e *MockSuiSigner_Expecter) GetAddress() *MockSuiSigner_GetAddress_Call { + return &MockSuiSigner_GetAddress_Call{Call: _e.mock.On("GetAddress")} +} + +func (_c *MockSuiSigner_GetAddress_Call) Run(run func()) *MockSuiSigner_GetAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockSuiSigner_GetAddress_Call) Return(s string, err error) *MockSuiSigner_GetAddress_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *MockSuiSigner_GetAddress_Call) RunAndReturn(run func() (string, error)) *MockSuiSigner_GetAddress_Call { + _c.Call.Return(run) + return _c +} + +// Sign provides a mock function for the type MockSuiSigner +func (_mock *MockSuiSigner) Sign(message []byte) ([]string, error) { + ret := _mock.Called(message) + + if len(ret) == 0 { + panic("no return value specified for Sign") + } + + var r0 []string + var r1 error + if returnFunc, ok := ret.Get(0).(func([]byte) ([]string, error)); ok { + return returnFunc(message) + } + if returnFunc, ok := ret.Get(0).(func([]byte) []string); ok { + r0 = returnFunc(message) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + if returnFunc, ok := ret.Get(1).(func([]byte) error); ok { + r1 = returnFunc(message) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSuiSigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type MockSuiSigner_Sign_Call struct { + *mock.Call +} + +// Sign is a helper method to define mock.On call +// - message []byte +func (_e *MockSuiSigner_Expecter) Sign(message interface{}) *MockSuiSigner_Sign_Call { + return &MockSuiSigner_Sign_Call{Call: _e.mock.On("Sign", message)} +} + +func (_c *MockSuiSigner_Sign_Call) Run(run func(message []byte)) *MockSuiSigner_Sign_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 []byte + if args[0] != nil { + arg0 = args[0].([]byte) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockSuiSigner_Sign_Call) Return(strings []string, err error) *MockSuiSigner_Sign_Call { + _c.Call.Return(strings, err) + return _c +} + +func (_c *MockSuiSigner_Sign_Call) RunAndReturn(run func(message []byte) ([]string, error)) *MockSuiSigner_Sign_Call { + _c.Call.Return(run) + return _c +} diff --git a/chain/sui/provider/ctf_provider.go b/chain/sui/provider/ctf_provider.go index 78d00b0f1..20d57b256 100644 --- a/chain/sui/provider/ctf_provider.go +++ b/chain/sui/provider/ctf_provider.go @@ -12,9 +12,10 @@ import ( "github.com/avast/retry-go/v4" "github.com/block-vision/sui-go-sdk/models" - sui_sdk "github.com/block-vision/sui-go-sdk/sui" "github.com/go-resty/resty/v2" chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + cslclient "github.com/smartcontractkit/chainlink-sui/relayer/client" "github.com/smartcontractkit/chainlink-testing-framework/framework" "github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain" "github.com/smartcontractkit/freeport" @@ -148,7 +149,7 @@ func (p *CTFChainProvider) BlockChain() chain.BlockChain { // It returns the URL of the Sui node and the client to interact with it. func (p *CTFChainProvider) startContainer( chainID string, account sui.SuiSigner, -) (string, string, sui_sdk.ISuiAPI) { +) (string, string, cslclient.SuiPTBClient) { var ( attempts = uint(10) url string @@ -223,7 +224,11 @@ func (p *CTFChainProvider) startContainer( url = result.url fauceturl = fmt.Sprintf("http://%s:%s", "127.0.0.1", result.faucetPort) - client := sui_sdk.NewSuiClient(url) + log, logErr := logger.New() + require.NoError(p.t, logErr, "Failed to create logger") + + client, clientErr := sui.NewPTBClientFromNodeURL(log, url, "") + require.NoError(p.t, clientErr, "Failed to create Sui PTB client") var ready bool for i := range 30 { diff --git a/chain/sui/provider/rpc_provider.go b/chain/sui/provider/rpc_provider.go index 93b3d7e26..ea32ee64e 100644 --- a/chain/sui/provider/rpc_provider.go +++ b/chain/sui/provider/rpc_provider.go @@ -5,9 +5,8 @@ import ( "errors" "fmt" - suisdk "github.com/block-vision/sui-go-sdk/sui" - chainsel "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/chain/sui" @@ -82,7 +81,15 @@ func (p *RPCChainProvider) Initialize(_ context.Context) (chain.BlockChain, erro return nil, fmt.Errorf("failed to get chain ID from selector %d: %w", p.selector, err) } - client := suisdk.NewSuiClient(p.config.RPCURL) + log, err := logger.New() + if err != nil { + return nil, fmt.Errorf("failed to create logger: %w", err) + } + + client, err := sui.NewPTBClientFromNodeURL(log, p.config.RPCURL, "") + if err != nil { + return nil, fmt.Errorf("failed to create Sui PTB client: %w", err) + } p.chain = &sui.Chain{ ChainMetadata: sui.ChainMetadata{ diff --git a/chain/sui/sui_chain.go b/chain/sui/sui_chain.go index b674d32d3..e76a6a997 100644 --- a/chain/sui/sui_chain.go +++ b/chain/sui/sui_chain.go @@ -5,7 +5,7 @@ import ( "crypto/rand" "fmt" - "github.com/block-vision/sui-go-sdk/sui" + cslclient "github.com/smartcontractkit/chainlink-sui/relayer/client" "github.com/smartcontractkit/chainlink-deployments-framework/chain/internal/common" ) @@ -15,7 +15,7 @@ type ChainMetadata = common.ChainMetadata // Chain represents an Sui chain. type Chain struct { ChainMetadata - Client sui.ISuiAPI + Client cslclient.SuiPTBClient Signer SuiSigner URL string FaucetURL string diff --git a/chain/sui/sui_chain_test.go b/chain/sui/sui_chain_test.go index b5615e75d..b476608c5 100644 --- a/chain/sui/sui_chain_test.go +++ b/chain/sui/sui_chain_test.go @@ -4,13 +4,13 @@ import ( "sync" "testing" - "github.com/block-vision/sui-go-sdk/models" chainsel "github.com/smartcontractkit/chain-selectors" - "github.com/smartcontractkit/chainlink-sui/bindings/bind" - "github.com/smartcontractkit/chainlink-sui/bindings/packages/mcms" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-sui/bindings/bind" + "github.com/smartcontractkit/chainlink-sui/bindings/packages/mcms" + "github.com/smartcontractkit/chainlink-deployments-framework/chain/sui" "github.com/smartcontractkit/chainlink-deployments-framework/chain/sui/provider" "github.com/smartcontractkit/chainlink-deployments-framework/internal/pointer" @@ -75,10 +75,11 @@ func TestChain_ReadOnly(t *testing.T) { require.NoError(t, err) // read with read-only client should work - balanceReq := models.SuiXGetBalanceRequest{Owner: signer, CoinType: "0x2::sui::SUI"} - balance, err := roSuiChain.Client.SuiXGetBalance(t.Context(), balanceReq) + balance, err := roSuiChain.Client.GetSUIBalance(t.Context(), signer) require.NoError(t, err) - require.Equal(t, "1000000000000", balance.TotalBalance) + expectedBalance := uint64(1000000000000) + actualBalance := balance.GetBalance() + require.Equal(t, expectedBalance, actualBalance) // write with read-write client should work opts := &bind.CallOpts{WaitForExecution: true, GasBudget: pointer.To(uint64(400_000_000)), Signer: suiChain.Signer} diff --git a/datastore/catalog/remote/main_test.go b/datastore/catalog/remote/main_test.go index c212346c6..55ee8695b 100644 --- a/datastore/catalog/remote/main_test.go +++ b/datastore/catalog/remote/main_test.go @@ -41,7 +41,7 @@ func TestMain(m *testing.M) { log.Fatalf("Failed to setup testcontainers: %v", err) } globalTestSetup = setup - catalogGRPCAddress = setup.GetCatalogGRPCAddress() + catalogGRPCAddress = setup.CatalogGRPCAddr log.Println("========================================") log.Println("Testcontainers setup complete!") diff --git a/go.mod b/go.mod index aac9fab79..b52a51cad 100644 --- a/go.mod +++ b/go.mod @@ -27,16 +27,18 @@ require ( github.com/google/uuid v1.6.0 github.com/jarcoal/httpmock v1.4.1 github.com/olekukonko/tablewriter v0.0.5 + github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pelletier/go-toml/v2 v2.3.0 github.com/samber/lo v1.53.0 github.com/segmentio/ksuid v1.0.4 github.com/smartcontractkit/ccip-owner-contracts v0.1.0 - github.com/smartcontractkit/chain-selectors v1.0.101 + github.com/smartcontractkit/chain-selectors v1.0.102 github.com/smartcontractkit/chainlink-aptos v0.0.0-20260428085939-5c70de12dbfc github.com/smartcontractkit/chainlink-canton v0.0.0-20260609155219-dcbe77d4a320 github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260608180601-efa81bfdfda9 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260129103204-4c8453dd8139 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260129103204-4c8453dd8139 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260506120607-7f10be016c89 github.com/smartcontractkit/chainlink-protos/job-distributor v0.19.0 github.com/smartcontractkit/chainlink-protos/op-catalog v0.1.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.5 @@ -46,7 +48,7 @@ require ( github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad github.com/smartcontractkit/go-daml v0.0.0-20260604143752-c6f6567940ba github.com/smartcontractkit/libocr v0.0.0-20260304194147-a03701e2c02e - github.com/smartcontractkit/mcms v0.47.1-0.20260610155329-856384f2ce70 + github.com/smartcontractkit/mcms v0.47.2-0.20260611004209-3f43937dcffd github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.21.0 @@ -101,7 +103,6 @@ require ( github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/onsi/ginkgo/v2 v2.22.1 // indirect github.com/onsi/gomega v1.36.2 // indirect - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260506120607-7f10be016c89 // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260505131349-78e491b80735 // indirect github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect @@ -282,7 +283,7 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect github.com/sirupsen/logrus v1.9.4 // indirect - github.com/smartcontractkit/chainlink-sui v0.0.0-20260527160341-aa3adc0abf67 + github.com/smartcontractkit/chainlink-sui v0.0.0-20260610194843-349ea43d69ce github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect diff --git a/go.sum b/go.sum index 79be3ed51..c41e57bb2 100644 --- a/go.sum +++ b/go.sum @@ -585,6 +585,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.3.0 h1:k59bC/lIZREW0/iVaQR8nDHxVq8OVlIzYCOJf421CaM= @@ -667,12 +669,14 @@ github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/smartcontractkit/ccip-owner-contracts v0.1.0 h1:GiBDtlx7539o7AKlDV+9LsA7vTMPv+0n7ClhSFnZFAk= github.com/smartcontractkit/ccip-owner-contracts v0.1.0/go.mod h1:NnT6w4Kj42OFFXhSx99LvJZWPpMjmo4+CpDEWfw61xY= -github.com/smartcontractkit/chain-selectors v1.0.101 h1:TF4ma9h3QeyIZ8XoEmgI5lrUvZfzHAz8tfR0pV0+GCA= -github.com/smartcontractkit/chain-selectors v1.0.101/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w= +github.com/smartcontractkit/chain-selectors v1.0.102 h1:qYP4+72HfvogCHR5ymwRFee36WH77514ZBj299SVCBA= +github.com/smartcontractkit/chain-selectors v1.0.102/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260428085939-5c70de12dbfc h1:Um9FBcf0JNSFuGbxgccDG1vM3cNrMGy0SdJ7r6VbX0o= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260428085939-5c70de12dbfc/go.mod h1:zfE2R7887kiwXkGTHKPe5NBgwhFwIC3pnA2uAxrbvig= github.com/smartcontractkit/chainlink-canton v0.0.0-20260609155219-dcbe77d4a320 h1:ix4tCtSTB7S2XGll+uqnhrqAQ+2iW/Zk/vnPjBMYRB0= github.com/smartcontractkit/chainlink-canton v0.0.0-20260609155219-dcbe77d4a320/go.mod h1:WKmNUX4oy8IvB66ukudrE99uaXjlZ7WghCDwHOTyB1c= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 h1:p0nFrTYrOQzDhWYm6suaM5CoWiXV5NV7llHnp6/Kn/8= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1/go.mod h1:1XxxpkgCmG/z6y30yRuVrcxre6zixIVX3xzi706Db/8= github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260608180601-efa81bfdfda9 h1:rLU5tQ/1BaQOjnYj9WWNlbqXCqd61oqasOXJ7upaKaM= github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260608180601-efa81bfdfda9/go.mod h1:TfYlPkIj2wa35qqWLrk5//HkLoee5jzokxZ7PhK0tgk= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260129103204-4c8453dd8139 h1:jkChf04hhdiMBApbb+lLDxHMY62Md6UeM7v++GSw3K8= @@ -693,8 +697,8 @@ github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260211172625 github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260211172625-dff40e83b3c9/go.mod h1:dkR2uYg9XYJuT1JASkPzWE51jjFkVb86P7a/yXe5/GM= github.com/smartcontractkit/chainlink-protos/op-catalog v0.1.0 h1:hGEJFD2X3oNIPXQbtIPxCJyg5CcKglRCYBmESS+gmeQ= github.com/smartcontractkit/chainlink-protos/op-catalog v0.1.0/go.mod h1:PjZD54vr6rIKEKQj6HNA4hllvYI/QpT+Zefj3tqkFAs= -github.com/smartcontractkit/chainlink-sui v0.0.0-20260527160341-aa3adc0abf67 h1:NNvPOgvf5vbOYVLxLST+5E88iPOAnpmzZGPihEx8DFc= -github.com/smartcontractkit/chainlink-sui v0.0.0-20260527160341-aa3adc0abf67/go.mod h1:k1HSbHyPaQWPOj6lXDIAe04EuwbC5ge1nK+cpG2E8hE= +github.com/smartcontractkit/chainlink-sui v0.0.0-20260610194843-349ea43d69ce h1:Xglr7eM24+Y9eMOhgK//QjXLDjPuT1oUAtdvsGqY8P0= +github.com/smartcontractkit/chainlink-sui v0.0.0-20260610194843-349ea43d69ce/go.mod h1:Y2kTVIsAUjqqSNGiEQomsaVH5XsBJzxov4j07MaDJOw= github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.5 h1:EiQx0LCPzxlfO9piSPeMCVSZAnp/BxAsPIGh/jBal18= github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.5/go.mod h1:nyOjn4ADJGqRMe3+4ZXSV+J/7nWb1H2Vx8Qk57eLRYA= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 h1:RwZXxdIAOyjp6cwc9Quxgr38k8r7ACz+Lxh9o/A6oH0= @@ -713,8 +717,8 @@ github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12i github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20260304194147-a03701e2c02e h1:poXTj5cFVM6XfC4HICIDYkDVc/A6OYB0eeID0wU2JQE= github.com/smartcontractkit/libocr v0.0.0-20260304194147-a03701e2c02e/go.mod h1:PLdNK6GlqfxIWXzziPkU7dCAVlVFeYkyyW7AQY0R+4Q= -github.com/smartcontractkit/mcms v0.47.1-0.20260610155329-856384f2ce70 h1:SBtw4WjSxS7AvFoFdWxLGju1GRIqi7ic2rgFXBUbwmo= -github.com/smartcontractkit/mcms v0.47.1-0.20260610155329-856384f2ce70/go.mod h1:7ZPOnN9CeoiiZkGQSPsyk23X+XFEtxQYpIx7kKy2ZP0= +github.com/smartcontractkit/mcms v0.47.2-0.20260611004209-3f43937dcffd h1:5G3V6voYht7bxD3EDiM/w7B/9O7nJkE9kaqxZnVeXS4= +github.com/smartcontractkit/mcms v0.47.2-0.20260611004209-3f43937dcffd/go.mod h1:qyDpiJC7Yo2FouVBQL3rc3wB4VB/8tw8xAcypOb4FT8= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=