Skip to content

Commit

Permalink
0.47 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Sep 22, 2023
1 parent c90c47c commit c8ef523
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 223 deletions.
147 changes: 80 additions & 67 deletions go.mod

Large diffs are not rendered by default.

314 changes: 173 additions & 141 deletions go.sum

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions oracle/client/chain_height.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import (
"fmt"
"sync"

tmrpcclient "github.com/cometbft/cometbft/rpc/client"
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
tmctypes "github.com/cometbft/cometbft/rpc/core/types"
tmtypes "github.com/cometbft/cometbft/types"
"github.com/rs/zerolog"
tmrpcclient "github.com/tendermint/tendermint/rpc/client"
tmctypes "github.com/tendermint/tendermint/rpc/core/types"
tmtypes "github.com/tendermint/tendermint/types"

"github.com/cosmos/cosmos-sdk/client"
)

var (
Expand All @@ -33,14 +36,16 @@ type ChainHeight struct {
// starts a new goroutine subscribed to EventNewBlockHeader.
func NewChainHeight(
ctx context.Context,
rpcClient tmrpcclient.Client,
client client.TendermintRPC,
logger zerolog.Logger,
initialHeight int64,
) (*ChainHeight, error) {
if initialHeight < 1 {
return nil, fmt.Errorf("expected positive initial block height")
}

rpcClient := client.(*rpchttp.HTTP)

if !rpcClient.IsRunning() {
if err := rpcClient.Start(); err != nil {
return nil, err
Expand Down
13 changes: 7 additions & 6 deletions oracle/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ import (
"os"
"time"

rpchttp "github.com/cometbft/cometbft/rpc/client/http"
tmjsonclient "github.com/cometbft/cometbft/rpc/jsonrpc/client"
"github.com/rs/zerolog"
umeeapp "github.com/umee-network/umee/v6/app"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/rs/zerolog"
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
tmjsonclient "github.com/tendermint/tendermint/rpc/jsonrpc/client"
umeeapp "github.com/umee-network/umee/v4/app"
umeeparams "github.com/umee-network/umee/v4/app/params"
)

type (
Expand All @@ -39,7 +40,7 @@ type (
OracleAddrString string
ValidatorAddr sdk.ValAddress
ValidatorAddrString string
Encoding umeeparams.EncodingConfig
Encoding testutil.TestEncodingConfig
GasPrices string
GasAdjustment float64
GRPCEndpoint string
Expand Down
2 changes: 1 addition & 1 deletion oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/rs/zerolog"
oracletypes "github.com/umee-network/umee/v4/x/oracle/types"
oracletypes "github.com/umee-network/umee/v6/x/oracle/types"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand Down
2 changes: 1 addition & 1 deletion oracle/param.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package oracle

import oracletypes "github.com/umee-network/umee/v4/x/oracle/types"
import oracletypes "github.com/umee-network/umee/v6/x/oracle/types"

const (
// paramsCacheInterval represents the amount of blocks
Expand Down
2 changes: 1 addition & 1 deletion oracle/param_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
oracletypes "github.com/umee-network/umee/v4/x/oracle/types"
oracletypes "github.com/umee-network/umee/v6/x/oracle/types"
)

func TestParamCacheIsOutdated(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion oracle/provider/uniswap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hasura/go-graphql-client"
"github.com/rs/zerolog"
"github.com/stretchr/testify/suite"
"github.com/tendermint/tendermint/libs/rand"
"github.com/cometbft/cometbft/libs/rand"

"github.com/ojo-network/price-feeder/oracle/types"
)
Expand Down
2 changes: 1 addition & 1 deletion price-feeder.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ provider_timeout = "1000000s"
[server]
listen_addr = "0.0.0.0:7171"
read_timeout = "20s"
verbose_cors = true
verbose_cors = false
write_timeout = "20s"

[account]
Expand Down

0 comments on commit c8ef523

Please sign in to comment.