2017-10-23 15:56:29 +00:00
|
|
|
package core
|
|
|
|
|
2017-12-04 18:54:33 +00:00
|
|
|
import "math/big"
|
|
|
|
|
2017-10-23 15:56:29 +00:00
|
|
|
type Blockchain interface {
|
2017-11-06 20:36:12 +00:00
|
|
|
GetBlockByNumber(blockNumber int64) Block
|
2017-12-20 20:06:22 +00:00
|
|
|
LastBlock() *big.Int
|
2017-12-07 19:32:16 +00:00
|
|
|
Node() Node
|
2017-11-02 11:41:24 +00:00
|
|
|
SubscribeToBlocks(blocks chan Block)
|
|
|
|
StartListening()
|
2017-11-03 13:54:32 +00:00
|
|
|
StopListening()
|
2017-12-04 22:54:35 +00:00
|
|
|
GetAttributes(contract Contract) (ContractAttributes, error)
|
|
|
|
GetAttribute(contract Contract, attributeName string, blockNumber *big.Int) (interface{}, error)
|
2017-12-22 17:42:35 +00:00
|
|
|
GetLogs(contract Contract, startingBlockNumber *big.Int, endingBlockNumber *big.Int) ([]Log, error)
|
2017-10-23 15:56:29 +00:00
|
|
|
}
|