package
0.0.0-20240916203516-2473a21e2bfc
Repository: https://github.com/kava-labs/kava-proxy-service.git
Documentation: pkg.go.dev

# Functions

DecodeEVMRPCRequest attempts to decode the provided bytes into an EVMRPCRequestEnvelope for use by the service to extract request details and create an enriched request metric, returning the decoded request and error (if any).
DecodeEVMRPCRequest attempts to decode raw bytes to a list of EVMRPCRequestEnvelopes.
IsMethodStatic checks if method is static.
MethodHasBlockHashParam returns true when the method expects a block hash in the request parameters.
MethodHasBlockNumberParam returns true when the method expects a block number in the request parameters.
MethodHasTxHashParam checks if method is cacheable by tx hash.
MethodRequiresNoHistory returns true when the JSON-RPC method always functions correctly when sent to the latest block.
Generic method to parse the block number from a set of params errors if method does not have a block number in the param, or the param has an unexpected value block tags are encoded to an int64 according to the BlockTagToNumberCodec map.

# Constants

These block tags are special strings used to reference blocks in JSON-RPC see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.
"empty" is not in the spec, it is our encoding for requests made with a nil block tag param.
These block tags are special strings used to reference blocks in JSON-RPC see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.
These block tags are special strings used to reference blocks in JSON-RPC see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.
These block tags are special strings used to reference blocks in JSON-RPC see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.
These block tags are special strings used to reference blocks in JSON-RPC see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.

# Variables

Mapping of string tag values used in the eth api to normalized int values that can be stored as the block number for the proxied request metric see https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block.
List of evm methods that can be cached by block hash and so are useful for converting and tracking the block hash associated with any requests invoking those methods to the matching block number.
List of evm methods that can be cached by block number and so are useful for tracking the block number associated with any requests invoking those methods.
CacheableByTxHashMethods is a list of EVM methods which can be cached indefinitely by transaction hash.
List of evm methods that can be cached and so are useful for tracking the params associated with the request to help in making caching decisions for future similar requests.
Errors that might result from decoding parts or the whole of an EVM RPC request.
Errors that might result from decoding parts or the whole of an EVM RPC request.
Errors that might result from decoding parts or the whole of an EVM RPC request.
Errors that might result from decoding parts or the whole of an EVM RPC request.
Mapping of the position of the block hash param for a given method name.
Mapping of the position of the block number param for a given method name.
NoHistoryMethods is a list of JSON-RPC methods that rely only on the present state of the chain.
List of evm methods that can be cached independent of block number (i.e.
StaticMethods is a list of static EVM methods which can be cached indefinitely, response will never change.

# Structs

EVMRPCRequest wraps expected values present in a request to the RPC endpoint for an EVM node API https://ethereum.org/en/developers/docs/apis/json-rpc/.

# Interfaces

EVMBlockGetter defines an interface which can be implemented by any client capable of getting ethereum block header by hash.