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
This commit is contained in:
@@ -10,4 +10,5 @@ type Blockchain interface {
|
||||
StopListening()
|
||||
GetAttributes(contract Contract) (ContractAttributes, error)
|
||||
GetAttribute(contract Contract, attributeName string, blockNumber *big.Int) (interface{}, error)
|
||||
GetLogs(contract Contract, blockNumber *big.Int) ([]Log, error)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package core
|
||||
|
||||
type Log struct {
|
||||
BlockNumber int64
|
||||
TxHash string
|
||||
Address string
|
||||
Topics []string
|
||||
Data string
|
||||
}
|
||||
Reference in New Issue
Block a user