rpcunpack

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RPC = struct {
	RpcService struct{ Abi, Contract, EventsBySignature, EventByContractSignature, FunctionsBySignature, FunctionByContractSignature, Opcode, Transaction string }
}{
	RpcService: struct{ Abi, Contract, EventsBySignature, EventByContractSignature, FunctionsBySignature, FunctionByContractSignature, Opcode, Transaction string }{
		Abi:                         "abi",
		Contract:                    "contract",
		EventsBySignature:           "eventsbysignature",
		EventByContractSignature:    "eventbycontractsignature",
		FunctionsBySignature:        "functionsbysignature",
		FunctionByContractSignature: "functionbycontractsignature",
		Opcode:                      "opcode",
		Transaction:                 "transaction",
	},
}

Functions

func GetEntryFromAddress

func GetEntryFromAddress(networkId utils.NetworkID, address common.Address) (*entries.Entry, error)

func GetEntryFromContract

func GetEntryFromContract(ctx context.Context, pool *clients.ClientPool, contract *models.Contract) (*entries.Entry, error)

Types

type RpcService

type RpcService struct {
	zenrpc.Service
	// contains filtered or unexported fields
}

func G

func G() *RpcService

func NewRpcService

func NewRpcService(db db.Adapter, pool *clients.ClientPool, nats *nats.Conn, cache *cache.Redis) *RpcService

func (RpcService) Abi

func (s RpcService) Abi(ctx context.Context, networkId utils.NetworkID, address *common.Address, bytecode string) (*rpctypes.Abi, *zenrpc.Error)

func (RpcService) Contract

func (s RpcService) Contract(ctx context.Context, networkId utils.NetworkID, address common.Address) (*rpctypes.Contract, *zenrpc.Error)

func (RpcService) EventByContractSignature

func (s RpcService) EventByContractSignature(ctx context.Context, networkId utils.NetworkID, address common.Address, signature common.Hash) (*rpctypes.Event, *zenrpc.Error)

func (RpcService) EventsBySignature

func (s RpcService) EventsBySignature(ctx context.Context, networkId utils.NetworkID, signature common.Hash, limit uint, offset uint) ([]*rpctypes.Event, *zenrpc.Error)

func (RpcService) FunctionByContractSignature

func (s RpcService) FunctionByContractSignature(ctx context.Context, networkId utils.NetworkID, address common.Address, signature string) (*rpctypes.Function, *zenrpc.Error)

func (RpcService) FunctionsBySignature

func (s RpcService) FunctionsBySignature(ctx context.Context, networkId utils.NetworkID, signature string, limit uint, offset uint) ([]*rpctypes.Function, *zenrpc.Error)

func (RpcService) Invoke

func (s RpcService) Invoke(ctx context.Context, method string, params json.RawMessage) zenrpc.Response

Invoke is as generated code from zenrpc cmd

func (RpcService) Opcode

func (s RpcService) Opcode(ctx context.Context, networkId utils.NetworkID, address *common.Address, bytecode string) (*rpctypes.Opcode, *zenrpc.Error)

func (RpcService) SMD

func (RpcService) SMD() smd.ServiceInfo

func (RpcService) Transaction

func (s RpcService) Transaction(ctx context.Context, networkId utils.NetworkID, hash common.Hash, showAst bool) (*rpctypes.Transaction, *zenrpc.Error)

Jump to

Keyboard shortcuts

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