forked from cerc-io/ipld-eth-server
Update module path for v4
This commit is contained in:
parent
8b8f644b2a
commit
ace12fbc35
@ -33,9 +33,9 @@ External dependency
|
|||||||
## Install
|
## Install
|
||||||
Start by downloading ipld-eth-server and moving into the repo:
|
Start by downloading ipld-eth-server and moving into the repo:
|
||||||
|
|
||||||
`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v3`
|
`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v4`
|
||||||
|
|
||||||
`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v3@v3.x.x`
|
`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v4@v4.x.x`
|
||||||
|
|
||||||
Then, build the binary:
|
Then, build the binary:
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/prom"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/prom"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
12
cmd/serve.go
12
cmd/serve.go
@ -32,12 +32,12 @@ import (
|
|||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"github.com/vulcanize/gap-filler/pkg/mux"
|
"github.com/vulcanize/gap-filler/pkg/mux"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
fill "github.com/vulcanize/ipld-eth-server/v3/pkg/fill"
|
fill "github.com/vulcanize/ipld-eth-server/v4/pkg/fill"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/graphql"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/graphql"
|
||||||
srpc "github.com/vulcanize/ipld-eth-server/v3/pkg/rpc"
|
srpc "github.com/vulcanize/ipld-eth-server/v4/pkg/rpc"
|
||||||
s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
v "github.com/vulcanize/ipld-eth-server/v3/version"
|
v "github.com/vulcanize/ipld-eth-server/v4/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ErrNoRpcEndpoints = errors.New("no rpc endpoints is available")
|
var ErrNoRpcEndpoints = errors.New("no rpc endpoints is available")
|
||||||
|
@ -27,9 +27,9 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
w "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
w "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
)
|
)
|
||||||
|
|
||||||
// subscribeCmd represents the subscribe command
|
// subscribeCmd represents the subscribe command
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg"
|
validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg"
|
||||||
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
|
ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres"
|
||||||
|
|
||||||
s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
)
|
)
|
||||||
|
|
||||||
const GroupName = "statedb-validate"
|
const GroupName = "statedb-validate"
|
||||||
|
@ -19,7 +19,7 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
v "github.com/vulcanize/ipld-eth-server/v3/version"
|
v "github.com/vulcanize/ipld-eth-server/v4/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
// versionCmd represents the version command
|
// versionCmd represents the version command
|
||||||
|
@ -40,9 +40,9 @@ An example of how to subscribe to a real-time Ethereum data feed from ipld-eth-s
|
|||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/watch"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/watch"
|
||||||
)
|
)
|
||||||
|
|
||||||
config, _ := eth.NewEthSubscriptionConfig()
|
config, _ := eth.NewEthSubscriptionConfig()
|
||||||
@ -160,9 +160,9 @@ An example of how to subscribe to a real-time Bitcoin data feed from ipld-eth-se
|
|||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/btc"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/btc"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/client"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/client"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/watch"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/watch"
|
||||||
)
|
)
|
||||||
|
|
||||||
config, _ := btc.NewBtcSubscriptionConfig()
|
config, _ := btc.NewBtcSubscriptionConfig()
|
||||||
|
3
go.mod
3
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/vulcanize/ipld-eth-server/v3
|
module github.com/vulcanize/ipld-eth-server/v4
|
||||||
|
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
@ -9,7 +9,6 @@ require (
|
|||||||
github.com/ipfs/go-cid v0.0.7
|
github.com/ipfs/go-cid v0.0.7
|
||||||
github.com/ipfs/go-ipfs-blockstore v1.0.1
|
github.com/ipfs/go-ipfs-blockstore v1.0.1
|
||||||
github.com/ipfs/go-ipfs-ds-help v1.0.0
|
github.com/ipfs/go-ipfs-ds-help v1.0.0
|
||||||
github.com/ipfs/go-ipld-format v0.2.0
|
|
||||||
github.com/jmoiron/sqlx v1.3.5
|
github.com/jmoiron/sqlx v1.3.5
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/lib/pq v1.10.5
|
github.com/lib/pq v1.10.5
|
||||||
|
2
main.go
2
main.go
@ -18,7 +18,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/cmd"
|
"github.com/vulcanize/ipld-eth-server/v4/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -22,8 +22,8 @@ import (
|
|||||||
|
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client is used to subscribe to the ipld-eth-server ipld data stream
|
// Client is used to subscribe to the ipld-eth-server ipld data stream
|
||||||
|
@ -42,7 +42,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/statediff"
|
"github.com/ethereum/go-ethereum/statediff"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
// APIName is the namespace for the watcher's eth api
|
// APIName is the namespace for the watcher's eth api
|
||||||
|
@ -36,10 +36,10 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -48,7 +48,7 @@ import (
|
|||||||
|
|
||||||
ethServerShared "github.com/ethereum/go-ethereum/statediff/indexer/shared"
|
ethServerShared "github.com/ethereum/go-ethereum/statediff/indexer/shared"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Retriever interface for substituting mocks in tests
|
// Retriever interface for substituting mocks in tests
|
||||||
|
@ -29,9 +29,9 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -37,10 +37,10 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -25,9 +25,9 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/statediff/indexer/models"
|
"github.com/ethereum/go-ethereum/statediff/indexer/models"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Fetcher interface for substituting mocks in tests
|
// Fetcher interface for substituting mocks in tests
|
||||||
|
@ -23,9 +23,9 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("IPLDFetcher", func() {
|
var _ = Describe("IPLDFetcher", func() {
|
||||||
|
@ -38,7 +38,7 @@ import (
|
|||||||
"github.com/multiformats/go-multihash"
|
"github.com/multiformats/go-multihash"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test variables
|
// Test variables
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WatchedAddress type is used to process currently watched addresses
|
// WatchedAddress type is used to process currently watched addresses
|
||||||
|
@ -28,10 +28,10 @@ import (
|
|||||||
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
fill "github.com/vulcanize/ipld-eth-server/v3/pkg/fill"
|
fill "github.com/vulcanize/ipld-eth-server/v4/pkg/fill"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/serve"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/serve"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Service", func() {
|
var _ = Describe("Service", func() {
|
||||||
|
@ -33,7 +33,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/rlp"
|
"github.com/ethereum/go-ethereum/rlp"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -35,11 +35,11 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/graphql"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/graphql"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("GraphQL", func() {
|
var _ = Describe("GraphQL", func() {
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
"github.com/graph-gophers/graphql-go/relay"
|
"github.com/graph-gophers/graphql-go/relay"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Service encapsulates a GraphQL service.
|
// Service encapsulates a GraphQL service.
|
||||||
|
@ -20,7 +20,7 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/net"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("API", func() {
|
var _ = Describe("API", func() {
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/p2p/netutil"
|
"github.com/ethereum/go-ethereum/p2p/netutil"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/prom"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/prom"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/node"
|
"github.com/ethereum/go-ethereum/node"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/prom"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/prom"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StartWSEndpoint starts a websocket endpoint.
|
// StartWSEndpoint starts a websocket endpoint.
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/statediff/types"
|
"github.com/ethereum/go-ethereum/statediff/types"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// APIName is the namespace used for the state diffing service API
|
// APIName is the namespace used for the state diffing service API
|
||||||
|
@ -32,8 +32,8 @@ import (
|
|||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/prom"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/prom"
|
||||||
ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared"
|
ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Env variables
|
// Env variables
|
||||||
|
@ -31,8 +31,8 @@ import (
|
|||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/net"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -13,8 +13,8 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
integration "github.com/vulcanize/ipld-eth-server/v3/test"
|
integration "github.com/vulcanize/ipld-eth-server/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Integration test", func() {
|
var _ = Describe("Integration test", func() {
|
||||||
|
@ -16,8 +16,8 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
"github.com/vulcanize/ipld-eth-server/v3/pkg/eth"
|
"github.com/vulcanize/ipld-eth-server/v4/pkg/eth"
|
||||||
integration "github.com/vulcanize/ipld-eth-server/v3/test"
|
integration "github.com/vulcanize/ipld-eth-server/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
const nonExistingBlockHash = "0x111111111111111111111111111111111111111111111111111111111111111"
|
const nonExistingBlockHash = "0x111111111111111111111111111111111111111111111111111111111111111"
|
||||||
|
@ -10,11 +10,10 @@ import (
|
|||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/ethclient"
|
"github.com/ethereum/go-ethereum/ethclient"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
"github.com/ethereum/go-ethereum/statediff/types"
|
|
||||||
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
integration "github.com/vulcanize/ipld-eth-server/v3/test"
|
integration "github.com/vulcanize/ipld-eth-server/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -229,8 +228,8 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
|
|
||||||
Context("one contract being watched", func() {
|
Context("one contract being watched", func() {
|
||||||
It("indexes state only for the watched contract", func() {
|
It("indexes state only for the watched contract", func() {
|
||||||
operation := types.Add
|
operation := sdtypes.Add
|
||||||
args := []types.WatchAddressArg{
|
args := []sdtypes.WatchAddressArg{
|
||||||
{
|
{
|
||||||
Address: contract1.Address,
|
Address: contract1.Address,
|
||||||
CreatedAt: uint64(contract1.BlockNumber),
|
CreatedAt: uint64(contract1.BlockNumber),
|
||||||
@ -311,8 +310,8 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
|
|
||||||
Context("contract added to a non-empty watch-list", func() {
|
Context("contract added to a non-empty watch-list", func() {
|
||||||
It("indexes state only for the watched contracts", func() {
|
It("indexes state only for the watched contracts", func() {
|
||||||
operation := types.Add
|
operation := sdtypes.Add
|
||||||
args := []types.WatchAddressArg{
|
args := []sdtypes.WatchAddressArg{
|
||||||
{
|
{
|
||||||
Address: contract2.Address,
|
Address: contract2.Address,
|
||||||
CreatedAt: uint64(contract2.BlockNumber),
|
CreatedAt: uint64(contract2.BlockNumber),
|
||||||
@ -395,8 +394,8 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
|
|
||||||
Context("contract removed from the watch-list", func() {
|
Context("contract removed from the watch-list", func() {
|
||||||
It("indexes state only for the watched contract", func() {
|
It("indexes state only for the watched contract", func() {
|
||||||
operation := types.Remove
|
operation := sdtypes.Remove
|
||||||
args := []types.WatchAddressArg{
|
args := []sdtypes.WatchAddressArg{
|
||||||
{
|
{
|
||||||
Address: contract1.Address,
|
Address: contract1.Address,
|
||||||
CreatedAt: uint64(contract1.BlockNumber),
|
CreatedAt: uint64(contract1.BlockNumber),
|
||||||
@ -477,8 +476,8 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
|
|
||||||
Context("list of watched addresses set", func() {
|
Context("list of watched addresses set", func() {
|
||||||
It("indexes state only for the watched contracts", func() {
|
It("indexes state only for the watched contracts", func() {
|
||||||
operation := types.Set
|
operation := sdtypes.Set
|
||||||
args := []types.WatchAddressArg{
|
args := []sdtypes.WatchAddressArg{
|
||||||
{
|
{
|
||||||
Address: contract1.Address,
|
Address: contract1.Address,
|
||||||
CreatedAt: uint64(contract1.BlockNumber),
|
CreatedAt: uint64(contract1.BlockNumber),
|
||||||
@ -565,8 +564,8 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
|
|
||||||
Context("list of watched addresses cleared", func() {
|
Context("list of watched addresses cleared", func() {
|
||||||
It("indexes state for all the contracts", func() {
|
It("indexes state for all the contracts", func() {
|
||||||
operation := types.Clear
|
operation := sdtypes.Clear
|
||||||
args := []types.WatchAddressArg{}
|
args := []sdtypes.WatchAddressArg{}
|
||||||
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
||||||
Expect(ipldErr).ToNot(HaveOccurred())
|
Expect(ipldErr).ToNot(HaveOccurred())
|
||||||
|
|
||||||
@ -659,7 +658,7 @@ var _ = Describe("WatchAddress integration test", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("returns an error on args of invalid type", func() {
|
It("returns an error on args of invalid type", func() {
|
||||||
operation := types.Add
|
operation := sdtypes.Add
|
||||||
args := []string{"WrongArg"}
|
args := []string{"WrongArg"}
|
||||||
|
|
||||||
gethErr := gethRPCClient.Call(nil, gethMethod, operation, args)
|
gethErr := gethRPCClient.Call(nil, gethMethod, operation, args)
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
||||||
integration "github.com/vulcanize/ipld-eth-server/v3/test"
|
integration "github.com/vulcanize/ipld-eth-server/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("Watched address gap filling service integration test", func() {
|
var _ = Describe("Watched address gap filling service integration test", func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user