Documentation ¶
Index ¶
- Constants
- Variables
- func GenURL(network string) string
- func ParseAbi(abiString string) (abi.ABI, error)
- func ParseAbiFile(abiFilePath string) (abi.ABI, error)
- func ReadAbiFile(abiFilePath string) (string, error)
- type BlockChain
- func (blockChain *BlockChain) FetchContractData(abiJSON string, address string, method string, methodArgs []interface{}, ...) error
- func (blockChain *BlockChain) GetAccountBalance(address common.Address, blockNumber *big.Int) (*big.Int, error)
- func (blockChain *BlockChain) GetBlockByNumber(blockNumber int64) (block core.Block, err error)
- func (blockChain *BlockChain) GetEthLogsWithCustomQuery(query ethereum.FilterQuery) ([]types.Log, error)
- func (blockChain *BlockChain) GetHeaderByNumber(blockNumber int64) (header core.Header, err error)
- func (blockChain *BlockChain) GetHeadersByNumbers(blockNumbers []int64) (header []core.Header, err error)
- func (blockChain *BlockChain) GetLogs(contract core.Contract, startingBlockNumber, endingBlockNumber *big.Int) ([]core.Log, error)
- func (blockChain *BlockChain) GetTransactions(transactionHashes []common.Hash) ([]core.TransactionModel, error)
- func (blockChain *BlockChain) LastBlock() (*big.Int, error)
- func (blockChain *BlockChain) Node() core.Node
- type EtherScanAPI
- type Response
Constants ¶
View Source
const MAX_BATCH_SIZE = 100
Variables ¶
View Source
var ( ErrInvalidAbiFile = errors.New("invalid abi") ErrMissingAbiFile = errors.New("missing abi") ErrApiRequestFailed = errors.New("etherscan api request failed") )
View Source
var ErrEmptyHeader = errors.New("empty header returned over RPC")
View Source
var (
ErrInvalidStateAttribute = errors.New("invalid state attribute")
)
Functions ¶
func ReadAbiFile ¶
Types ¶
type BlockChain ¶
type BlockChain struct {
// contains filtered or unexported fields
}
func NewBlockChain ¶
func NewBlockChain(ethClient core.EthClient, rpcClient core.RpcClient, node core.Node, converter vulcCommon.TransactionConverter) *BlockChain
func (*BlockChain) FetchContractData ¶
func (*BlockChain) GetAccountBalance ¶
func (*BlockChain) GetBlockByNumber ¶
func (blockChain *BlockChain) GetBlockByNumber(blockNumber int64) (block core.Block, err error)
func (*BlockChain) GetEthLogsWithCustomQuery ¶
func (blockChain *BlockChain) GetEthLogsWithCustomQuery(query ethereum.FilterQuery) ([]types.Log, error)
func (*BlockChain) GetHeaderByNumber ¶
func (blockChain *BlockChain) GetHeaderByNumber(blockNumber int64) (header core.Header, err error)
func (*BlockChain) GetHeadersByNumbers ¶ added in v0.0.3
func (blockChain *BlockChain) GetHeadersByNumbers(blockNumbers []int64) (header []core.Header, err error)
func (*BlockChain) GetTransactions ¶
func (blockChain *BlockChain) GetTransactions(transactionHashes []common.Hash) ([]core.TransactionModel, error)
func (*BlockChain) Node ¶
func (blockChain *BlockChain) Node() core.Node
type EtherScanAPI ¶
type EtherScanAPI struct {
// contains filtered or unexported fields
}
func NewEtherScanClient ¶
func NewEtherScanClient(url string) *EtherScanAPI
func (*EtherScanAPI) GetAbi ¶
func (e *EtherScanAPI) GetAbi(contractHash string) (string, error)
https://api.etherscan.io/api?module=contract&action=getabi&address=%s
Click to show internal directories.
Click to hide internal directories.