Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateKeccak256(input []byte) string
- func ClientIpFromContext(ctx context.Context) (*net.IP, bool)
- func ComputeBlockHash(bHeight, chainId uint64) []byte
- func GetChainId(ctx context.Context) uint64
- func GetPrehistoryChainId() uint64
- func GetPrehistoryHeight() uint64
- func IndexerBlockToDbBlock(block *indexer.Block) *dbt.Block
- func IndexerLogToDbLog(log *indexer.Log) *dbt.Log
- func IndexerTxnToDbTxn(txn *indexer.Transaction, cumulativeGas primitives.Quantity) *dbt.Transaction
- func ParseEVMRevertReason(data []byte) (string, error)
- func PutChainId(ctx context.Context, chainId uint64) context.Context
- func PutClientIpKey(ctx context.Context, ip net.IP) context.Context
Constants ¶
View Source
const (
AccountId = "aurora"
)
Variables ¶
View Source
var Constants constants
Functions ¶
func CalculateKeccak256 ¶ added in v1.1.0
CalculateKeccak256 calculates and returns the Keccak256 hash of the input data
func ClientIpFromContext ¶ added in v1.1.0
ClientIpFromContext returns the clientIp value stored in ctx, if any.
func ComputeBlockHash ¶
func GetChainId ¶
GetChainId returns the chainId in the following order;
- returns chainId if exists in ctx
- returns chainId if exists in relayer configuration .yml file
- returns defaultChainId=1313161554
func GetPrehistoryChainId ¶
func GetPrehistoryChainId() uint64
GetPrehistoryChainId returns the chainId config that the prehistory was indexed for;
- returns prehistoryChainId if exists in relayer configuration .yml file
- returns defaultChainId=1313161554
func GetPrehistoryHeight ¶
func GetPrehistoryHeight() uint64
GetPrehistoryHeight returns the height of the prehistory given in relayer configuration .yml file
- returns prehistoryHeight if exists in relayer configuration .yml file
- returns defaultPrehistoryHeight=37157758 that is for mainnet
func IndexerTxnToDbTxn ¶
func IndexerTxnToDbTxn(txn *indexer.Transaction, cumulativeGas primitives.Quantity) *dbt.Transaction
func ParseEVMRevertReason ¶
ParseEVMRevertReason resolves the abi-encoded revert reason
func PutChainId ¶
PutChainId is a helper function to put chainId in the context, also see GetChainId
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.