ipld-eth-server/pkg/core/blockchain.go
Matt K 5e64283a12 Get logs for a contract (#99)
* Add ability to fetch logs for a contract and a block

* Test contract related code against Infura, so can run on Travis

* Add godo task for getLogs
2017-12-11 15:08:00 -06:00

15 lines
417 B
Go

package core
import "math/big"
type Blockchain interface {
GetBlockByNumber(blockNumber int64) Block
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)
}