Documentation
¶
Index ¶
- type AbiStruct
- type BlockscanErc20Txs
- type BlockscanEvents
- type BlockscanGasPriceReq
- type BlockscanGetBalanceReq
- type BlockscanGetBalancesReq
- type BlockscanGetErc20TxsReq
- type BlockscanGetEventsReq
- type BlockscanGetInternalTxsReq
- type BlockscanGetNormalTxsReq
- type BlockscanInternalTxs
- type BlockscanNormalTxs
- type BlockscanResultStringReq
- type BlockscanSourceCode
- type BlockscanSourceCodeReq
- type Scanner
- func (s *Scanner) GetBalance(address any) (int64, error)
- func (s *Scanner) GetBalances(addresses []string) (map[string]int64, error)
- func (s *Scanner) GetBlockNumberByTimestamp(timestamp string) (int64, error)
- func (s *Scanner) GetContractAbi(address any) (AbiStruct, error)
- func (s *Scanner) GetContractName(address any) (string, error)
- func (s *Scanner) GetErc20Transactions(address any, startBlock int, endBlock any) ([]BlockscanErc20Txs, error)
- func (s *Scanner) GetErc20TransactionsAll(address any) ([]BlockscanErc20Txs, error)
- func (s *Scanner) GetEvents(topic0 string, address any, startBlock int, endBlock any) ([]BlockscanEvents, error)
- func (s *Scanner) GetEventsAll(topic0 string, address string) ([]BlockscanEvents, error)
- func (s *Scanner) GetGasPrice() (int64, error)
- func (s *Scanner) GetInternalTransactions(address any, startBlock int, endBlock any) ([]BlockscanInternalTxs, error)
- func (s *Scanner) GetInternalTransactionsAll(address any) ([]BlockscanInternalTxs, error)
- func (s *Scanner) GetNormalTransactions(address any, startBlock int, endBlock any) ([]BlockscanNormalTxs, error)
- func (s *Scanner) GetNormalTransactionsAll(address any) ([]BlockscanNormalTxs, error)
- func (s *Scanner) GetSourceCode(address any) (BlockscanSourceCode, error)
- func (s *Scanner) IsVerifiedContract(address any) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbiStruct ¶
type AbiStruct []struct {
Inputs []struct {
InternalType string `json:"internalType"`
Name string `json:"name"`
Type string `json:"type"`
} `json:"inputs"`
StateMutability string `json:"stateMutability"`
Type string `json:"type"`
Anonymous bool `json:"anonymous"`
Name string `json:"name"`
Outputs []struct {
InternalType string `json:"internalType"`
Name string `json:"name"`
Type string `json:"type"`
} `json:"outputs"`
}
type BlockscanErc20Txs ¶
type BlockscanErc20Txs struct {
BlockNumber string `json:"blockNumber"`
TimeStamp string `json:"timeStamp"`
Hash string `json:"hash"`
Nonce string `json:"nonce"`
BlockHash string `json:"blockHash"`
From string `json:"from"`
ContractAddress string `json:"contractAddress"`
To string `json:"to"`
Value string `json:"value"`
TokenName string `json:"tokenName"`
TokenSymbol string `json:"tokenSymbol"`
TokenDecimal string `json:"tokenDecimal"`
TransactionIndex string `json:"transactionIndex"`
Gas string `json:"gas"`
GasPrice string `json:"gasPrice"`
GasUsed string `json:"gasUsed"`
CumulativeGasUsed string `json:"cumulativeGasUsed"`
Input string `json:"input"`
Confirmations string `json:"confirmations"`
}
type BlockscanEvents ¶
type BlockscanEvents struct {
Address string `json:"address"`
Topics []string `json:"topics"`
Data string `json:"data"`
BlockNumber string `json:"blockNumber"`
TimeStamp string `json:"timeStamp"`
GasPrice string `json:"gasPrice"`
GasUsed string `json:"gasUsed"`
LogIndex string `json:"logIndex"`
TransactionHash string `json:"transactionHash"`
TransactionIndex string `json:"transactionIndex"`
}
type BlockscanGasPriceReq ¶
type BlockscanGetBalanceReq ¶
type BlockscanGetBalancesReq ¶
type BlockscanGetErc20TxsReq ¶
type BlockscanGetErc20TxsReq struct {
Status string `json:"status"`
Message string `json:"message"`
Result []BlockscanErc20Txs `json:"result"`
}
type BlockscanGetEventsReq ¶
type BlockscanGetEventsReq struct {
Status string `json:"status"`
Message string `json:"message"`
Result []BlockscanEvents `json:"result"`
}
type BlockscanGetInternalTxsReq ¶
type BlockscanGetInternalTxsReq struct {
Status string `json:"status"`
Message string `json:"message"`
Result []BlockscanInternalTxs `json:"result"`
}
type BlockscanGetNormalTxsReq ¶
type BlockscanGetNormalTxsReq struct {
Status string `json:"status"`
Message string `json:"message"`
Result []BlockscanNormalTxs `json:"result"`
}
type BlockscanInternalTxs ¶
type BlockscanInternalTxs struct {
BlockNumber string `json:"blockNumber"`
TimeStamp string `json:"timeStamp"`
Hash string `json:"hash"`
From string `json:"from"`
To string `json:"to"`
Value string `json:"value"`
ContractAddress string `json:"contractAddress"`
Input string `json:"input"`
Type string `json:"type"`
Gas string `json:"gas"`
GasUsed string `json:"gasUsed"`
TraceID string `json:"traceId"`
IsError string `json:"isError"`
ErrCode string `json:"errCode"`
}
type BlockscanNormalTxs ¶
type BlockscanNormalTxs struct {
BlockNumber string `json:"blockNumber"`
TimeStamp string `json:"timeStamp"`
Hash string `json:"hash"`
Nonce string `json:"nonce"`
BlockHash string `json:"blockHash"`
TransactionIndex string `json:"transactionIndex"`
From string `json:"from"`
To string `json:"to"`
Value string `json:"value"`
Gas string `json:"gas"`
GasPrice string `json:"gasPrice"`
IsError string `json:"isError"`
TxreceiptStatus string `json:"txreceipt_status"`
Input string `json:"input"`
ContractAddress string `json:"contractAddress"`
CumulativeGasUsed string `json:"cumulativeGasUsed"`
GasUsed string `json:"gasUsed"`
Confirmations string `json:"confirmations"`
}
type BlockscanSourceCode ¶ added in v0.3.0
type BlockscanSourceCode struct {
SourceCode string `json:"SourceCode"`
Abi string `json:"ABI"`
ContractName string `json:"ContractName"`
CompilerVersion string `json:"CompilerVersion"`
OptimizationUsed string `json:"OptimizationUsed"`
Runs string `json:"Runs"`
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 BlockscanSourceCodeReq ¶
type BlockscanSourceCodeReq struct {
Status string `json:"status"`
Message string `json:"message"`
Result []BlockscanSourceCode `json:"result"`
}
type Scanner ¶ added in v0.2.0
func (*Scanner) GetBalance ¶ added in v0.2.0
Return the balance of a single address.
func (*Scanner) GetBalances ¶ added in v0.2.0
map[address] = balance. Return balances of up to 20 addresses.
func (*Scanner) GetBlockNumberByTimestamp ¶ added in v0.2.0
Return the block number.
func (*Scanner) GetContractAbi ¶ added in v0.2.0
Return the contract's abi.
func (*Scanner) GetContractName ¶ added in v0.2.0
Return the contract's name.
func (*Scanner) GetErc20Transactions ¶ added in v0.2.0
func (s *Scanner) GetErc20Transactions(address any, startBlock int, endBlock any) ([]BlockscanErc20Txs, error)
Return up to 10000 erc20 txs of an address.
func (*Scanner) GetErc20TransactionsAll ¶ added in v0.2.0
func (s *Scanner) GetErc20TransactionsAll(address any) ([]BlockscanErc20Txs, error)
Return all the erc20 txs of an address.
func (*Scanner) GetEvents ¶ added in v0.2.0
func (s *Scanner) GetEvents(topic0 string, address any, startBlock int, endBlock any) ([]BlockscanEvents, error)
Return up to 1000 events of an address.
func (*Scanner) GetEventsAll ¶ added in v0.2.0
func (s *Scanner) GetEventsAll(topic0 string, address string) ([]BlockscanEvents, error)
Return all the events of an address.
func (*Scanner) GetGasPrice ¶ added in v0.2.0
Return gas price.
func (*Scanner) GetInternalTransactions ¶ added in v0.2.0
func (s *Scanner) GetInternalTransactions(address any, startBlock int, endBlock any) ([]BlockscanInternalTxs, error)
Return up to 10000 internal txs of an address.
func (*Scanner) GetInternalTransactionsAll ¶ added in v0.2.0
func (s *Scanner) GetInternalTransactionsAll(address any) ([]BlockscanInternalTxs, error)
Return all the internal txs of an address.
func (*Scanner) GetNormalTransactions ¶ added in v0.2.0
func (s *Scanner) GetNormalTransactions(address any, startBlock int, endBlock any) ([]BlockscanNormalTxs, error)
Return up to 10000 txs of an address.
func (*Scanner) GetNormalTransactionsAll ¶ added in v0.2.0
func (s *Scanner) GetNormalTransactionsAll(address any) ([]BlockscanNormalTxs, error)
Return all the txs of an address.
func (*Scanner) GetSourceCode ¶ added in v0.2.0
func (s *Scanner) GetSourceCode(address any) (BlockscanSourceCode, error)
Return the source code of a contract.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.