2017-11-06 16:52:07 +00:00
|
|
|
package repositories
|
|
|
|
|
2017-11-06 18:53:43 +00:00
|
|
|
import "github.com/8thlight/vulcanizedb/pkg/core"
|
2017-11-06 16:52:07 +00:00
|
|
|
|
|
|
|
type Repository interface {
|
2017-11-07 17:56:49 +00:00
|
|
|
CreateBlock(block core.Block) error
|
2017-11-06 20:15:02 +00:00
|
|
|
BlockCount() int
|
|
|
|
FindBlockByNumber(blockNumber int64) *core.Block
|
2017-11-06 20:36:12 +00:00
|
|
|
MaxBlockNumber() int64
|
|
|
|
MissingBlockNumbers(startingBlockNumber int64, endingBlockNumber int64) []int64
|
2017-12-04 21:31:39 +00:00
|
|
|
CreateWatchedContract(contract core.WatchedContract) error
|
2017-11-09 19:59:12 +00:00
|
|
|
IsWatchedContract(contractHash string) bool
|
2017-12-04 21:31:39 +00:00
|
|
|
FindWatchedContract(contractHash string) *core.WatchedContract
|
2017-11-06 16:52:07 +00:00
|
|
|
}
|