forked from cerc-io/ipld-eth-server
Add graphql server (#27)
* Add graphql server * Update Makefile * Update log_filters constraint * Add GetLogFilter to repo * Update travis (use Makefile, go fmt, go vet) * Add logFilter schema and resolvers * Add GetWatchedEvent to watched_events_repo * Add watchedEventLog schema and resolvers
This commit is contained in:
@@ -5,17 +5,17 @@ import (
|
||||
|
||||
"errors"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
)
|
||||
|
||||
type LogFilters []LogFilter
|
||||
|
||||
type LogFilter struct {
|
||||
Name string `json:"name"`
|
||||
FromBlock int64 `json:"fromBlock"`
|
||||
ToBlock int64 `json:"toBlock"`
|
||||
FromBlock int64 `json:"fromBlock" db:"from_block"`
|
||||
ToBlock int64 `json:"toBlock" db:"to_block"`
|
||||
Address string `json:"address"`
|
||||
core.Topics `json:"topics"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package filters_test
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/filters"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/filters"
|
||||
)
|
||||
|
||||
var _ = Describe("Log filters", func() {
|
||||
|
||||
Reference in New Issue
Block a user