Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func BytesToAddress ¶
func StringToAddress ¶
StringToAddress converts a hex-encoded address string into an *Address.
func (*Address) ShortHex ¶
ShortHex returns a hex-encoded address that is usually shorted than Hex().
If the full address returned by Hex() is prefixed 12 bytes set to zero, this function will trim those bytes.
The reason we need this function is that a few database collections (governorConfig, governorStatus, heartbeats) store guardian addresses as 40 hex digits instead of the full 64-digit hex representation. When performing lookups over those collections, this function can perform the conversion.
type TxHash ¶
type TxHash struct {
// contains filtered or unexported fields
}
TxHash represents a transaction hash passed by query params.
func ParseTxHash ¶
ParseTxHash parses a transaction hash from a string.
The transaction hash can be provided in different formats, depending on the blockchain it belongs to: * Solana: 64 bytes, encoded as base58. * All other chains: 32 bytes, encoded as hex.
More cases could be added in the future as needed.