forked from cerc-io/ipld-eth-server
5e64283a12
* 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
15 lines
417 B
Go
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)
|
|
}
|