ipld-eth-server/pkg/repositories/repository.go
Matt K 4fabe3e917 Add receipts (#119)
* Conversion between Geth Receipt and core.Receipt

* Add receipt to DB

* Insert receipts with transactions

* Update Travis CI to use dep for dependencies
2018-01-03 11:23:43 -06:00

23 lines
692 B
Go

package repositories
import "github.com/8thlight/vulcanizedb/pkg/core"
const (
blocksFromHeadBeforeFinal = 20
)
type Repository interface {
CreateOrUpdateBlock(block core.Block) error
BlockCount() int
FindBlockByNumber(blockNumber int64) (core.Block, error)
MaxBlockNumber() int64
MissingBlockNumbers(startingBlockNumber int64, endingBlockNumber int64) []int64
FindReceipt(txHash string) (core.Receipt, error)
CreateContract(contract core.Contract) error
ContractExists(contractHash string) bool
FindContract(contractHash string) (core.Contract, error)
CreateLogs(log []core.Log) error
FindLogs(address string, blockNumber int64) []core.Log
SetBlocksStatus(chainHead int64)
}