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:
Matt K
2017-12-11 15:08:00 -06:00
committed by GitHub
parent 921bde1089
commit 5e64283a12
16 changed files with 420 additions and 119 deletions
+1
View File
@@ -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)
}
+9
View File
@@ -0,0 +1,9 @@
package core
type Log struct {
BlockNumber int64
TxHash string
Address string
Topics []string
Data string
}