ipld-eth-server/pkg/core/blockchain.go
Matt K 24bc83a448 Block categorization (#110)
* Add block categorization (is_final=)

* Add godo task for vulcanizeDB (Example of how everything could work together)

* Add unique constraint on block_number and node

* Add index on block_id for transactions_table

* Add node_id index on blocks table

* Sort transactions returned from FindBlock by tx_hash

* lowercase tx_to, tx_from like etherscan
2017-12-20 14:06:22 -06:00

16 lines
439 B
Go

package core
import "math/big"
type Blockchain interface {
GetBlockByNumber(blockNumber int64) Block
LastBlock() *big.Int
Node() Node
SubscribeToBlocks(blocks chan Block)
StartListening()
StopListening()
GetAttributes(contract Contract) (ContractAttributes, error)
GetAttribute(contract Contract, attributeName string, blockNumber *big.Int) (interface{}, error)
GetLogs(contract Contract, blockNumber *big.Int) ([]Log, error)
}