Documentation
¶
Index ¶
- Constants
- type BatchElem
- type BlockChain
- type Contract
- type ContractDataFetcher
- type EthClient
- type EventLog
- type Header
- type Node
- type NodeType
- type POAHeader
- type ParityNodeInfo
- type ParityVersion
- type Receipt
- type ReceiptLog
- type RpcClient
- type RpcTransaction
- type Subscription
- type Topics
- type TransactionModel
- type WatchedEvent
Constants ¶
View Source
const (
KOVAN_NETWORK_ID = 42
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockChain ¶
type BlockChain interface {
ContractDataFetcher
GetEthLogsWithCustomQuery(query ethereum.FilterQuery) ([]types.Log, error)
GetHeaderByNumber(blockNumber int64) (Header, error)
GetHeadersByNumbers(blockNumbers []int64) ([]Header, error)
GetTransactions(transactionHashes []common.Hash) ([]TransactionModel, error)
LastBlock() (*big.Int, error)
BatchGetStorageAt(account common.Address, keys []common.Hash, blockNumber *big.Int) (map[common.Hash][]byte, error)
Node() Node
}
type Contract ¶
type Contract struct {
Abi string
Hash string
Transactions []TransactionModel
}
type ContractDataFetcher ¶
type EthClient ¶
type EthClient interface {
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
SubscribeNewStateChanges(ctx context.Context, q ethereum.FilterQuery, ch chan<- filters.Payload) (ethereum.Subscription, error)
TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error)
TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
}
type POAHeader ¶
type POAHeader struct {
ParentHash common.Hash `json:"parentHash" gencodec:"required"`
UncleHash common.Hash `json:"sha3Uncles" gencodec:"required"`
Coinbase common.Address `json:"miner" gencodec:"required"`
Root common.Hash `json:"stateRoot" gencodec:"required"`
TxHash common.Hash `json:"transactionsRoot" gencodec:"required"`
ReceiptHash common.Hash `json:"receiptsRoot" gencodec:"required"`
Bloom types.Bloom `json:"logsBloom" gencodec:"required"`
Difficulty *hexutil.Big `json:"difficulty" gencodec:"required"`
Number *hexutil.Big `json:"number" gencodec:"required"`
GasLimit hexutil.Uint64 `json:"gasLimit" gencodec:"required"`
GasUsed hexutil.Uint64 `json:"gasUsed" gencodec:"required"`
Time hexutil.Uint64 `json:"timestamp" gencodec:"required"`
Extra hexutil.Bytes `json:"extraData" gencodec:"required"`
Hash common.Hash `json:"hash"`
}
type ParityNodeInfo ¶
type ParityNodeInfo struct {
Track string
ParityVersion `json:"version"`
Hash string
}
func (ParityNodeInfo) String ¶
func (pn ParityNodeInfo) String() string
type ParityVersion ¶
type ReceiptLog ¶ added in v0.1.0
type RpcTransaction ¶
type RpcTransaction struct {
Nonce string `json:"nonce"`
GasPrice string `json:"gasPrice"`
GasLimit string `json:"gas"`
Recipient string `json:"to"`
Amount string `json:"value"`
Payload string `json:"input"`
V string `json:"v"`
R string `json:"r"`
S string `json:"s"`
Hash string
From string
TransactionIndex string `json:"transactionIndex"`
}
type Subscription ¶ added in v0.1.0
type Subscription interface {
Err() <-chan error
Unsubscribe()
}
type TransactionModel ¶
type WatchedEvent ¶
type WatchedEvent struct {
LogID int64 `json:"log_id" db:"id"`
Name string `json:"name"`
BlockNumber int64 `json:"block_number" db:"block_number"`
Address string `json:"address"`
TxHash string `json:"tx_hash" db:"tx_hash"`
Index int64 `json:"index"`
Topic0 string `json:"topic0"`
Topic1 string `json:"topic1"`
Topic2 string `json:"topic2"`
Topic3 string `json:"topic3"`
Data string `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.