Documentation ¶
Index ¶
- type BaseClient
- func (bc *BaseClient) Call(name, module, action, apiUrl string, param map[string]interface{}, ...) (err error)
- func (bc *BaseClient) CraftEtherScanURL(module, action string, param map[string]interface{}) (URL string)
- func (bc *BaseClient) CraftOkLinkURL(apiUrl string) (URL string)
- func (bc *BaseClient) CraftSolScanURL(apiUrl string, param map[string]interface{}) (URL string)
- func (bc *BaseClient) HandleEtherscanResponse(action string, data []byte, outcome interface{}) error
- func (bc *BaseClient) HandleOklinkResponse(data []byte, outcome interface{}) error
- func (bc *BaseClient) HandleSolScanResponse(data []byte, outcome interface{}) error
- type BlockRewards
- type ContractSource
- type CustomizationClient
- type ERC1155Transfer
- type ERC20Transfer
- type ERC721Transfer
- type EtherscanEnvelope
- type ExecutionStatus
- type GasPrices
- type InternalTx
- type LatestPrice
- type Log
- type MinedBlock
- type NormalTx
- type OklinkEnvelope
- type SolScanEnvelope
- type SwapTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
type BaseClient struct { Verbose bool BeforeRequest func(name, module, action string, param map[string]interface{}) error AfterRequest func(name, module, action string, param map[string]interface{}, outcome interface{}, requestErr error) // contains filtered or unexported fields }
func NewBaseClient ¶
func NewCustomizedClient ¶
func NewCustomizedClient(cc CustomizationClient) *BaseClient
func (*BaseClient) Call ¶
func (bc *BaseClient) Call(name, module, action, apiUrl string, param map[string]interface{}, outcome interface{}) (err error)
func (*BaseClient) CraftEtherScanURL ¶
func (bc *BaseClient) CraftEtherScanURL(module, action string, param map[string]interface{}) (URL string)
func (*BaseClient) CraftOkLinkURL ¶
func (bc *BaseClient) CraftOkLinkURL(apiUrl string) (URL string)
func (*BaseClient) CraftSolScanURL ¶
func (bc *BaseClient) CraftSolScanURL(apiUrl string, param map[string]interface{}) (URL string)
func (*BaseClient) HandleEtherscanResponse ¶
func (bc *BaseClient) HandleEtherscanResponse(action string, data []byte, outcome interface{}) error
func (*BaseClient) HandleOklinkResponse ¶
func (bc *BaseClient) HandleOklinkResponse(data []byte, outcome interface{}) error
func (*BaseClient) HandleSolScanResponse ¶
func (bc *BaseClient) HandleSolScanResponse(data []byte, outcome interface{}) error
type BlockRewards ¶
type BlockRewards struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` BlockMiner string `json:"blockMiner"` BlockReward *common.BigInt `json:"blockReward"` Uncles []struct { Miner string `json:"miner"` UnclePosition int `json:"unclePosition,string"` BlockReward *common.BigInt `json:"blockreward"` } `json:"uncles"` UncleInclusionReward *common.BigInt `json:"uncleInclusionReward"` }
type ContractSource ¶
type ContractSource struct { SourceCode string `json:"SourceCode"` ABI string `json:"ABI"` ContractName string `json:"ContractName"` CompilerVersion string `json:"CompilerVersion"` OptimizationUsed int `json:"OptimizationUsed,string"` Runs int `json:"Runs,string"` ConstructorArguments string `json:"ConstructorArguments"` EVMVersion string `json:"EVMVersion"` Library string `json:"Library"` LicenseType string `json:"LicenseType"` Proxy string `json:"Proxy"` Implementation string `json:"Implementation"` SwarmSource string `json:"SwarmSource"` }
type CustomizationClient ¶
type CustomizationClient struct { Timeout time.Duration Key string BaseURL string Verbose bool Client *http.Client BeforeRequest func(name, module, action string, param map[string]interface{}) error AfterRequest func(name, module, action string, param map[string]interface{}, outcome interface{}, requestErr error) }
type ERC1155Transfer ¶
type ERC1155Transfer struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` Nonce int `json:"nonce,string"` BlockHash string `json:"blockHash"` From string `json:"from"` ContractAddress string `json:"contractAddress"` To string `json:"to"` TokenID *common.BigInt `json:"tokenID"` TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TokenDecimal uint8 `json:"tokenDecimal,string"` TokenValue uint8 `json:"tokenValue,string"` TransactionIndex int `json:"transactionIndex,string"` Gas int `json:"gas,string"` GasPrice *common.BigInt `json:"gasPrice"` GasUsed int `json:"gasUsed,string"` CumulativeGasUsed int `json:"cumulativeGasUsed,string"` Input string `json:"input"` Confirmations int `json:"confirmations,string"` }
type ERC20Transfer ¶
type ERC20Transfer struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` Nonce int `json:"nonce,string"` BlockHash string `json:"blockHash"` From string `json:"from"` ContractAddress string `json:"contractAddress"` To string `json:"to"` Value *common.BigInt `json:"value"` TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TokenDecimal uint8 `json:"tokenDecimal,string"` TransactionIndex int `json:"transactionIndex,string"` Gas int `json:"gas,string"` GasPrice *common.BigInt `json:"gasPrice"` GasUsed int `json:"gasUsed,string"` CumulativeGasUsed int `json:"cumulativeGasUsed,string"` Input string `json:"input"` Confirmations int `json:"confirmations,string"` }
type ERC721Transfer ¶
type ERC721Transfer struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` Nonce int `json:"nonce,string"` BlockHash string `json:"blockHash"` From string `json:"from"` ContractAddress string `json:"contractAddress"` To string `json:"to"` TokenID *common.BigInt `json:"tokenID"` TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TokenDecimal uint8 `json:"tokenDecimal,string"` TransactionIndex int `json:"transactionIndex,string"` Gas int `json:"gas,string"` GasPrice *common.BigInt `json:"gasPrice"` GasUsed int `json:"gasUsed,string"` CumulativeGasUsed int `json:"cumulativeGasUsed,string"` Input string `json:"input"` Confirmations int `json:"confirmations,string"` }
type EtherscanEnvelope ¶
type EtherscanEnvelope struct { Status int `json:"status,string"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
type ExecutionStatus ¶
type GasPrices ¶
type GasPrices struct { LastBlock int SafeGasPrice float64 ProposeGasPrice float64 FastGasPrice float64 SuggestBaseFeeInGwei float64 `json:"suggestBaseFee"` GasUsedRatio []float64 `json:"gasUsedRatio"` }
func (*GasPrices) UnmarshalJSON ¶
type InternalTx ¶
type InternalTx struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` From string `json:"from"` To string `json:"to"` Value *common.BigInt `json:"value"` ContractAddress string `json:"contractAddress"` Input string `json:"input"` Type string `json:"type"` Gas int `json:"gas,string"` GasUsed int `json:"gasUsed,string"` TraceID string `json:"traceId"` IsError int `json:"isError,string"` ErrCode string `json:"errCode"` }
type LatestPrice ¶
type MinedBlock ¶
type NormalTx ¶
type NormalTx struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` Nonce int `json:"nonce,string"` BlockHash string `json:"blockHash"` TransactionIndex int `json:"transactionIndex,string"` From string `json:"from"` To string `json:"to"` Value *common.BigInt `json:"value"` Gas int `json:"gas,string"` GasPrice *common.BigInt `json:"gasPrice"` IsError int `json:"isError,string"` TxReceiptStatus string `json:"txreceipt_status"` Input string `json:"input"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed int `json:"cumulativeGasUsed,string"` GasUsed int `json:"gasUsed,string"` Confirmations int `json:"confirmations,string"` FunctionName string `json:"functionName"` MethodId string `json:"methodId"` }
type OklinkEnvelope ¶
type OklinkEnvelope struct { Code string `json:"code"` Msg string `json:"msg"` Data json.RawMessage `json:"data"` }
type SolScanEnvelope ¶
type SolScanEnvelope struct { Success bool `json:"success"` Data json.RawMessage `json:"data"` Errors struct { Code int `json:"code"` Message string `json:"message"` } `json:"errors"` }
type SwapTransaction ¶
type SwapTransaction struct { BlockNumber int `json:"blockNumber,string"` TimeStamp common.Time `json:"timeStamp"` Hash string `json:"hash"` Nonce int `json:"nonce,string"` BlockHash string `json:"blockHash"` From string `json:"from"` ContractAddress string `json:"contractAddress"` To string `json:"to"` TokenID *common.BigInt `json:"tokenID"` TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TokenDecimal uint8 `json:"tokenDecimal,string"` TokenValue uint8 `json:"tokenValue,string"` TransactionIndex int `json:"transactionIndex,string"` Gas int `json:"gas,string"` GasPrice *common.BigInt `json:"gasPrice"` GasUsed int `json:"gasUsed,string"` CumulativeGasUsed int `json:"cumulativeGasUsed,string"` Input string `json:"input"` MethodId string `json:"methodId"` FunctionName string `json:"functionName"` Confirmations int `json:"confirmations,string"` }
Click to show internal directories.
Click to hide internal directories.