Documentation ¶
Index ¶
Constants ¶
View Source
const GET_DETAIL_EVM_TX = "/api/v1?module=transaction&action=getTxCosmosInfo&txhash="
View Source
const GET_SEARCH_RESULTS = "/token-autocomplete?q="
View Source
const TX_NOT_FOUND = "transaction not found"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressResult ¶
type AddressResult struct { AddressHash string `json:"addressHash"` Address string `json:"address"` Name string `json:"name"` InsertedAt utctime.UTCTime `json:"insertedAt"` }
func SearchResultsToAddresses ¶
func SearchResultsToAddresses(data []SearchResult) []AddressResult
type BlockResult ¶
type BlockResult struct { BlockHash string `json:"blockHash"` BlockNumber int `json:"blockNumber"` InsertedAt utctime.UTCTime `json:"insertedAt"` }
func SearchResultsToBlocks ¶
func SearchResultsToBlocks(data []SearchResult) []BlockResult
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(logger applogger.Logger, url string) *HTTPClient
func (*HTTPClient) GetDetailEvmTx ¶
func (client *HTTPClient) GetDetailEvmTx(txHash string) (*TransactionEvm, error)
func (*HTTPClient) GetSearchResults ¶
func (client *HTTPClient) GetSearchResults(keyword string) []SearchResult
func (*HTTPClient) GetSearchResultsAsync ¶
func (client *HTTPClient) GetSearchResultsAsync(keyword string, results chan []SearchResult)
type SearchResult ¶
type SearchResult struct { AddressHash string `json:"address_hash"` BlockHash string `json:"block_hash"` BlockNumber int `json:"block_number"` CosmosHash string `json:"cosmos_hash"` HolderCount int `json:"holder_count"` InsertedAt utctime.UTCTime `json:"inserted_at"` Name string `json:"name"` Symbol string `json:"symbol"` TxHash string `json:"tx_hash"` Type string `json:"type"` }
type TokenResult ¶
type TokenResult struct { AddressHash string `json:"addressHash"` HolderCount int `json:"holderCount"` Name string `json:"name"` Symbol string `json:"symbol"` InsertedAt utctime.UTCTime `json:"insertedAt"` }
func SearchResultsToTokens ¶
func SearchResultsToTokens(data []SearchResult) []TokenResult
type TokenTransfer ¶
type TokenTransfer struct { Amount string `json:"amount"` Decimals string `json:"decimals"` FromAddress string `json:"fromAddress"` FromAddressName string `json:"fromAddressName"` LogIndex string `json:"logIndex"` ToAddress string `json:"toAddress"` ToAddressName string `json:"toAddressName"` TokenContractAddress string `json:"tokenContractAddress"` TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` }
type TransactionEvm ¶
type TransactionEvm struct { BlockHeight int64 `json:"blockHeight"` BlockHash string `json:"blockHash"` BlockTime utctime.UTCTime `json:"blockTime"` Confirmations int64 `json:"confirmations"` Hash string `json:"hash"` CosmosHash string `json:"cosmosHash"` Index int `json:"index"` Success bool `json:"success"` Error string `json:"error"` RevertReason string `json:"revertReason"` CreatedContractAddressHash string `json:"createdContractAddressHash"` CreatedContractCodeIndexedAt utctime.UTCTime `json:"createdContractCodeIndexedAt"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasLimit string `json:"gasLimit"` GasPrice string `json:"gasPrice"` GasUsed string `json:"gasUsed"` MaxFeePerGas string `json:"maxFeePerGas"` MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"` Input string `json:"input"` Nonce int `json:"nonce"` R string `json:"r"` S string `json:"s"` V string `json:"v"` Type int `json:"type"` Logs []Log `json:"logs"` TokenTransfers []TokenTransfer `json:"tokenTransfers"` }
type TransactionResult ¶
type TransactionResult struct { EvmHash string `json:"evmHash"` CosmosHash string `json:"cosmosHash"` InsertedAt utctime.UTCTime `json:"insertedAt"` }
func SearchResultsToTransactions ¶
func SearchResultsToTransactions(data []SearchResult) []TransactionResult
type TxResp ¶
type TxResp struct { Message string `json:"message"` Result TransactionEvm `json:"result"` Status string `json:"status"` }
type ValidatorResult ¶
type ValidatorResult struct { OperatorAddress string `json:"operatorAddress"` ConsensusNodeAddress string `json:"consensusNodeAddress"` InitialDelegatorAddress string `json:"initialDelegatorAddress"` InitialDelegatorAddressHash string `json:"initialDelegatorAddressHash"` Moniker string `json:"moniker"` Status string `json:"status"` Jailed bool `json:"jailed"` }
Click to show internal directories.
Click to hide internal directories.