Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: price feeder imports umee/v2.0.0 #766

Merged
merged 13 commits into from
Apr 6, 2022
10 changes: 5 additions & 5 deletions price-feeder/cmd/price-feeder.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle"
"github.com/umee-network/umee/price-feeder/oracle/client"
v1 "github.com/umee-network/umee/price-feeder/router/v1"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle"
"github.com/umee-network/umee/v2/price-feeder/oracle/client"
v1 "github.com/umee-network/umee/v2/price-feeder/router/v1"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/config"
)

func TestValidate(t *testing.T) {
Expand Down
12 changes: 5 additions & 7 deletions price-feeder/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/umee-network/umee/price-feeder
module github.com/umee-network/umee/v2/price-feeder
Copy link
Member

@toteki toteki Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change - is it correct?

edit: to test this, try importing price feeder into a fresh go.mod based project. If it errors "why does 0.2 have a v2 url?" then I will revert this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v2 is for the umee part, the price-feeder is in its own version like 0.20

Maybe it wouldn't be better for the price-feeder to have its own repository?
@toteki @adamewozniak

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term, separate repo could simplify things.

As for the price-feeder/go.mod import path, this PR might work without (since only the umee go.mod, not the whole umee repository, has changed import paths).


go 1.17

Expand All @@ -18,22 +18,18 @@ require (
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.1
github.com/tendermint/tendermint v0.34.16
github.com/umee-network/umee v0.8.1-0.20220330155329-d9903f72d511
github.com/umee-network/umee/v2 v2.0.0-20220406102959-e44f8afc8d11
toteki marked this conversation as resolved.
Show resolved Hide resolved
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.44.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/gin-gonic/gin v1.7.0 // indirect
github.com/umee-network/Gravity-Bridge/module v1.4.2-0.20220217130213-b3cdbcaa3b93 // indirect
)

require (
filippo.io/edwards25519 v1.0.0-beta.2 // indirect
github.com/99designs/keyring v1.1.6 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20220317234142-1c674cbc83ff // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
Expand Down Expand Up @@ -98,6 +94,8 @@ require (
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/osmosis-labs/bech32-ibc v0.2.0-rc2 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand Down
37 changes: 32 additions & 5 deletions price-feeder/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion price-feeder/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/umee-network/umee/price-feeder/cmd"
"github.com/umee-network/umee/v2/price-feeder/cmd"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
tmjsonclient "github.com/tendermint/tendermint/rpc/jsonrpc/client"

umeeapp "github.com/umee-network/umee/app"
umeeparams "github.com/umee-network/umee/app/params"
"github.com/umee-network/umee/price-feeder/telemetry"
umeeapp "github.com/umee-network/umee/v2/app"
umeeparams "github.com/umee-network/umee/v2/app/params"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

type (
Expand Down
14 changes: 7 additions & 7 deletions price-feeder/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import (
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/client"
"github.com/umee-network/umee/price-feeder/oracle/provider"
"github.com/umee-network/umee/price-feeder/oracle/types"
pfsync "github.com/umee-network/umee/price-feeder/pkg/sync"
"github.com/umee-network/umee/price-feeder/telemetry"
oracletypes "github.com/umee-network/umee/x/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/client"
"github.com/umee-network/umee/v2/price-feeder/oracle/provider"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
pfsync "github.com/umee-network/umee/v2/price-feeder/pkg/sync"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
oracletypes "github.com/umee-network/umee/v2/x/oracle/types"
)

// We define tickerSleep as the minimum timeout between each oracle loop. We
Expand Down
10 changes: 5 additions & 5 deletions price-feeder/oracle/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/client"
"github.com/umee-network/umee/price-feeder/oracle/provider"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/client"
"github.com/umee-network/umee/v2/price-feeder/oracle/provider"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"

oracletypes "github.com/umee-network/umee/x/oracle/types"
oracletypes "github.com/umee-network/umee/v2/x/oracle/types"
)

type mockProvider struct {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/binance.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

"github.com/gorilla/websocket"
"github.com/rs/zerolog"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/binance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestBinanceProvider_GetTickerPrices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/coinbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/rs/zerolog"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/coinbase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestCoinbaseProvider_GetTickerPrices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/gate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

"github.com/gorilla/websocket"
"github.com/rs/zerolog"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/telemetry"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/gate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestGateProvider_GetTickerPrices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/huobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (

"github.com/gorilla/websocket"
"github.com/rs/zerolog"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/huobi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestHuobiProvider_GetTickerPrices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/kraken.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

"github.com/gorilla/websocket"
"github.com/rs/zerolog"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/kraken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestKrakenProvider_GetTickerPrices(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestMockProvider_GetTickerPrices(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/provider/okx.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

"github.com/gorilla/websocket"
"github.com/rs/zerolog"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/telemetry"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/okx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestOkxProvider_GetTickerPrices(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/osmosis.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/osmosis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

func TestOsmosisProvider_GetTickerPrices(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/umee-network/umee/price-feeder/oracle/types"
"github.com/umee-network/umee/v2/price-feeder/oracle/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/oracle/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/umee-network/umee/price-feeder/oracle/provider"
"github.com/umee-network/umee/v2/price-feeder/oracle/provider"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/oracle/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/oracle"
"github.com/umee-network/umee/price-feeder/oracle/provider"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/oracle"
"github.com/umee-network/umee/v2/price-feeder/oracle/provider"
)

func TestComputeVWAP(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/router/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/hlog"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/config"
)

func Build(logger zerolog.Logger, cfg config.Config) alice.Chain {
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/router/v1/metrics.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package v1

import "github.com/umee-network/umee/price-feeder/telemetry"
import "github.com/umee-network/umee/v2/price-feeder/telemetry"

type Metrics interface {
Gather(format string) (telemetry.GatherResponse, error)
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/router/v1/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/gorilla/mux"
"github.com/rs/zerolog"

"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/price-feeder/pkg/httputil"
"github.com/umee-network/umee/price-feeder/router/middleware"
"github.com/umee-network/umee/v2/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/pkg/httputil"
"github.com/umee-network/umee/v2/price-feeder/router/middleware"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions price-feeder/router/v1/router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/rs/zerolog"
"github.com/stretchr/testify/suite"

"github.com/umee-network/umee/price-feeder/config"
v1 "github.com/umee-network/umee/price-feeder/router/v1"
"github.com/umee-network/umee/price-feeder/telemetry"
"github.com/umee-network/umee/v2/price-feeder/config"
v1 "github.com/umee-network/umee/v2/price-feeder/router/v1"
"github.com/umee-network/umee/v2/price-feeder/telemetry"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/telemetry/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
metricsprom "github.com/armon/go-metrics/prometheus"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/expfmt"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/config"
)

// globalLabels defines the set of global labels that will be applied to all
Expand Down
2 changes: 1 addition & 1 deletion price-feeder/telemetry/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/armon/go-metrics"
"github.com/prometheus/common/expfmt"
"github.com/stretchr/testify/require"
"github.com/umee-network/umee/price-feeder/config"
"github.com/umee-network/umee/v2/price-feeder/config"
)

func TestMetrics_Disabled(t *testing.T) {
Expand Down