mock

package
v0.0.0-...-0ff5682 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: cmd/server/api/handler.go

Generated by this command:

mockgen -source=cmd/server/api/handler.go -destination=cmd/server/api/mock/handler.go -package=mock

Package mock is a generated GoMock package.

Code generated by MockGen. DO NOT EDIT. Source: cmd/server/api/rpcmethods.go

Generated by this command:

mockgen -source=cmd/server/api/rpcmethods.go -destination=cmd/server/api/mock/rpcmethods.go -package=mock

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var MockResponseBlock = json.RawMessage(`{
    "difficulty": "0x4ea3f27bc",
    "extraData": "0xd883010a08846765746888676f312e31352e31856c696e7578",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "hash": "0x7c2a5a3e2e7a6d3e2a1f9d6d8e0c7d2a9a6f6f0d6d2f3e3d9d1d4d0d3c3f5f7",
    "logsBloom": "0x000000",
    "miner": "0x0000000000000000000000000000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "number": "0x29b8ef5",
    "parentHash": "0x879892876fc8821b4e37058a3a7445e5b16b4e344223d1f7c69321ab25b855ea",
        "receiptsRoot": "0xc9f18a6c6b66c1e4873939d1263a943cfbdbf90ef3afa1515b9cb5ae8c58d08e",
        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
        "size": "0x361",
        "stateRoot": "0x48779a67043e53ad6acac5ec4f46a94fb18b017fb2b7d2b29bb8e654e86bd5e3",
        "timestamp": "0x658148b2",
        "totalDifficulty": "0xff8d4a7",
        "transactions": [
            {
                "blockHash": "0x782a46ff73d68a58153d9df0d309d4a4c5dd48f9802ded44efc6bd6e16677aac",
                "blockNumber": "0x29b8ef5",
                "from": "0xf429a23b511b23a0ddb4415bd7afb327afca3c7d",
                "gas": "0x3f6c0",
                "gasPrice": "0x9c2a0700",
                "maxFeePerGas": "0x9c2a0700",
                "maxPriorityFeePerGas": "0x9c2a0700",
                "hash": "0xeebb76b4f36fe5d1e368dbf6fb62c6f90d0a548d28b9c335f75e646f84377bfc",
                "input": "0xe8eda9df000000000000000000000000169929497847235c5569de26daa042b643f3d3a300000000000000000000000000000000000000000000000821ab0d4414980000000000000000000000000000f429a23b511b23a0ddb4415bd7afb327afca3c7d0000000000000000000000000000000000000000000000000000000000000000",
                "nonce": "0x81",
                "to": "0x14cac28d3b8ce63f362ca6a7354c4b13d6b561ec",
                "transactionIndex": "0x0",
                "value": "0x0",
                "type": "0x2",
                "accessList": [],
                "chainId": "0x13881",
                "v": "0x0",
                "r": "0x3412f2ed3a7876380e43624cb983ba71e631cd1647752f74c44e98ddb539d163",
                "s": "0x51be04e78fe2c4c7c13c90349ad40286a88c8be297c096c4bb6a31e59b87800f"
            }
        ],
        "transactionsRoot": "0x6ea17a28615cd164720317abce24e1ab140400fc42dc7afbb8cf836e1d9550f0",
        "uncles": []
        }`)
View Source
var MockResponseTransaction = json.RawMessage(`{
          "blockHash": "0x782a46ff73d68a58153d9df0d309d4a4c5dd48f9802ded44efc6bd6e16677aac",
            "blockNumber": "0x29b8ef5",
            "from": "0xf429a23b511b23a0ddb4415bd7afb327afca3c7d",
            "gas": "0x3f6c0",
            "gasPrice": "0x9c2a0700",
            "maxFeePerGas": "0x9c2a0700",
            "maxPriorityFeePerGas": "0x9c2a0700",
            "hash": "0xeebb76b4f36fe5d1e368dbf6fb62c6f90d0a548d28b9c335f75e646f84377bfc",
            "input": "0xe8eda9df000000000000000000000000169929497847235c5569de26daa042b643f3d3a300000000000000000000000000000000000000000000000821ab0d4414980000000000000000000000000000f429a23b511b23a0ddb4415bd7afb327afca3c7d0000000000000000000000000000000000000000000000000000000000000000",
            "nonce": "0x81",
            "to": "0x14cac28d3b8ce63f362ca6a7354c4b13d6b561ec",
            "transactionIndex": "0x0",
            "value": "0x0",
            "type": "0x2",
            "accessList": [],
            "chainId": "0x13881",
            "v": "0x0",
            "r": "0x3412f2ed3a7876380e43624cb983ba71e631cd1647752f74c44e98ddb539d163",
            "s": "0x51be04e78fe2c4c7c13c90349ad40286a88c8be297c096c4bb6a31e59b87800f"
        }`)

Functions

func GetFilterRequest

func GetFilterRequest(fromBlock, toBlock string) json.RawMessage

func GetLogsRequest

func GetLogsRequest(fromBlock, toBlock string) json.RawMessage

Types

type MockHTTPClientInterface

type MockHTTPClientInterface struct {
	// contains filtered or unexported fields
}

MockHTTPClientInterface is a mock of HTTPClientInterface interface.

func NewMockHTTPClientInterface

func NewMockHTTPClientInterface(ctrl *gomock.Controller) *MockHTTPClientInterface

NewMockHTTPClientInterface creates a new mock instance.

func (*MockHTTPClientInterface) Do

Do mocks base method.

func (*MockHTTPClientInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockHTTPClientInterfaceMockRecorder

type MockHTTPClientInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockHTTPClientInterfaceMockRecorder is the mock recorder for MockHTTPClientInterface.

func (*MockHTTPClientInterfaceMockRecorder) Do

Do indicates an expected call of Do.

type MockProxyHandler

type MockProxyHandler struct {
	// contains filtered or unexported fields
}

MockProxyHandler is a mock of ProxyHandler interface.

func NewMockProxyHandler

func NewMockProxyHandler(ctrl *gomock.Controller) *MockProxyHandler

NewMockProxyHandler creates a new mock instance.

func (*MockProxyHandler) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProxyHandler) GetHttpClient

func (m *MockProxyHandler) GetHttpClient() api.HTTPClientInterface

GetHttpClient mocks base method.

func (*MockProxyHandler) GetRpcUrl

func (m *MockProxyHandler) GetRpcUrl() string

GetRpcUrl mocks base method.

func (*MockProxyHandler) HandleProxyRPC

func (m *MockProxyHandler) HandleProxyRPC(r *http.Request, req api.JSONRPCRequest, stateService state.Service) api.RPCResponse

HandleProxyRPC mocks base method.

func (*MockProxyHandler) SetHttpClient

func (m *MockProxyHandler) SetHttpClient(client api.HTTPClientInterface)

SetHttpClient mocks base method.

type MockProxyHandlerMockRecorder

type MockProxyHandlerMockRecorder struct {
	// contains filtered or unexported fields
}

MockProxyHandlerMockRecorder is the mock recorder for MockProxyHandler.

func (*MockProxyHandlerMockRecorder) GetHttpClient

func (mr *MockProxyHandlerMockRecorder) GetHttpClient() *gomock.Call

GetHttpClient indicates an expected call of GetHttpClient.

func (*MockProxyHandlerMockRecorder) GetRpcUrl

func (mr *MockProxyHandlerMockRecorder) GetRpcUrl() *gomock.Call

GetRpcUrl indicates an expected call of GetRpcUrl.

func (*MockProxyHandlerMockRecorder) HandleProxyRPC

func (mr *MockProxyHandlerMockRecorder) HandleProxyRPC(r, req, stateService any) *gomock.Call

HandleProxyRPC indicates an expected call of HandleProxyRPC.

func (*MockProxyHandlerMockRecorder) SetHttpClient

func (mr *MockProxyHandlerMockRecorder) SetHttpClient(client any) *gomock.Call

SetHttpClient indicates an expected call of SetHttpClient.

type MockRPCHandler

type MockRPCHandler struct {
	// contains filtered or unexported fields
}

MockRPCHandler is a mock of RPCHandler interface.

func NewMockRPCHandler

func NewMockRPCHandler(ctrl *gomock.Controller) *MockRPCHandler

NewMockRPCHandler creates a new mock instance.

func (*MockRPCHandler) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRPCHandler) HandleProxyRPC

func (m *MockRPCHandler) HandleProxyRPC(r *http.Request, req api.JSONRPCRequest) api.RPCResponse

HandleProxyRPC mocks base method.

func (*MockRPCHandler) HandleUniversalMinting

func (m *MockRPCHandler) HandleUniversalMinting(r *http.Request, req api.JSONRPCRequest) api.RPCResponse

HandleUniversalMinting mocks base method.

func (*MockRPCHandler) PostRPCRequestHandler

func (m *MockRPCHandler) PostRPCRequestHandler(w http.ResponseWriter, r *http.Request)

PostRPCRequestHandler mocks base method.

func (*MockRPCHandler) SetStateService

func (m *MockRPCHandler) SetStateService(stateService state.Service)

SetStateService mocks base method.

type MockRPCHandlerMockRecorder

type MockRPCHandlerMockRecorder struct {
	// contains filtered or unexported fields
}

MockRPCHandlerMockRecorder is the mock recorder for MockRPCHandler.

func (*MockRPCHandlerMockRecorder) HandleProxyRPC

func (mr *MockRPCHandlerMockRecorder) HandleProxyRPC(r, req any) *gomock.Call

HandleProxyRPC indicates an expected call of HandleProxyRPC.

func (*MockRPCHandlerMockRecorder) HandleUniversalMinting

func (mr *MockRPCHandlerMockRecorder) HandleUniversalMinting(r, req any) *gomock.Call

HandleUniversalMinting indicates an expected call of HandleUniversalMinting.

func (*MockRPCHandlerMockRecorder) PostRPCRequestHandler

func (mr *MockRPCHandlerMockRecorder) PostRPCRequestHandler(w, r any) *gomock.Call

PostRPCRequestHandler indicates an expected call of PostRPCRequestHandler.

func (*MockRPCHandlerMockRecorder) SetStateService

func (mr *MockRPCHandlerMockRecorder) SetStateService(stateService any) *gomock.Call

SetStateService indicates an expected call of SetStateService.

type MockRPCMethodManager

type MockRPCMethodManager struct {
	// contains filtered or unexported fields
}

MockRPCMethodManager is a mock of RPCMethodManager interface.

func NewMockRPCMethodManager

func NewMockRPCMethodManager(ctrl *gomock.Controller) *MockRPCMethodManager

NewMockRPCMethodManager creates a new mock instance.

func (*MockRPCMethodManager) CheckBlockNumberFromResponseFromHashCalls

func (m *MockRPCMethodManager) CheckBlockNumberFromResponseFromHashCalls(resp *api.RPCResponse, method api.RPCMethod, blockNumberUnode string) error

CheckBlockNumberFromResponseFromHashCalls mocks base method.

func (*MockRPCMethodManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRPCMethodManager) HasRPCMethodWithBlockNumber

func (m *MockRPCMethodManager) HasRPCMethodWithBlockNumber(methodName string) (api.RPCMethod, bool)

HasRPCMethodWithBlockNumber mocks base method.

func (*MockRPCMethodManager) HasRPCMethodWithHash

func (m *MockRPCMethodManager) HasRPCMethodWithHash(methodName string) (api.RPCMethod, bool)

HasRPCMethodWithHash mocks base method.

func (*MockRPCMethodManager) ReplaceBlockTag

func (m *MockRPCMethodManager) ReplaceBlockTag(req *api.JSONRPCRequest, method api.RPCMethod, blockNumberUnode string) error

ReplaceBlockTag mocks base method.

type MockRPCMethodManagerMockRecorder

type MockRPCMethodManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockRPCMethodManagerMockRecorder is the mock recorder for MockRPCMethodManager.

func (*MockRPCMethodManagerMockRecorder) CheckBlockNumberFromResponseFromHashCalls

func (mr *MockRPCMethodManagerMockRecorder) CheckBlockNumberFromResponseFromHashCalls(resp, method, blockNumberUnode any) *gomock.Call

CheckBlockNumberFromResponseFromHashCalls indicates an expected call of CheckBlockNumberFromResponseFromHashCalls.

func (*MockRPCMethodManagerMockRecorder) HasRPCMethodWithBlockNumber

func (mr *MockRPCMethodManagerMockRecorder) HasRPCMethodWithBlockNumber(methodName any) *gomock.Call

HasRPCMethodWithBlockNumber indicates an expected call of HasRPCMethodWithBlockNumber.

func (*MockRPCMethodManagerMockRecorder) HasRPCMethodWithHash

func (mr *MockRPCMethodManagerMockRecorder) HasRPCMethodWithHash(methodName any) *gomock.Call

HasRPCMethodWithHash indicates an expected call of HasRPCMethodWithHash.

func (*MockRPCMethodManagerMockRecorder) ReplaceBlockTag

func (mr *MockRPCMethodManagerMockRecorder) ReplaceBlockTag(req, method, blockNumberUnode any) *gomock.Call

ReplaceBlockTag indicates an expected call of ReplaceBlockTag.

type MockRPCUniversalHandler

type MockRPCUniversalHandler struct {
	// contains filtered or unexported fields
}

MockRPCUniversalHandler is a mock of RPCUniversalHandler interface.

func NewMockRPCUniversalHandler

func NewMockRPCUniversalHandler(ctrl *gomock.Controller) *MockRPCUniversalHandler

NewMockRPCUniversalHandler creates a new mock instance.

func (*MockRPCUniversalHandler) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRPCUniversalHandler) HandleUniversalMinting

func (m *MockRPCUniversalHandler) HandleUniversalMinting(r *http.Request, req api.JSONRPCRequest, stateService state.Service) api.RPCResponse

HandleUniversalMinting mocks base method.

type MockRPCUniversalHandlerMockRecorder

type MockRPCUniversalHandlerMockRecorder struct {
	// contains filtered or unexported fields
}

MockRPCUniversalHandlerMockRecorder is the mock recorder for MockRPCUniversalHandler.

func (*MockRPCUniversalHandlerMockRecorder) HandleUniversalMinting

func (mr *MockRPCUniversalHandlerMockRecorder) HandleUniversalMinting(r, req, stateService any) *gomock.Call

HandleUniversalMinting indicates an expected call of HandleUniversalMinting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL