Skip to content

Commit

Permalink
fix(pricefeeder): adapt for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Nov 8, 2023
1 parent beb5fd3 commit 1bc94a6
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 108 deletions.
8 changes: 5 additions & 3 deletions config/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import (
"github.com/cosmos/go-bip39"
)

var (
_ keyring.Keyring = (*privKeyKeyring)(nil)
)
var _ keyring.Keyring = (*privKeyKeyring)(nil)

// privKeyKeyring partially implements the keyring.Keyring
// interface, the functionality which is implemented covers
Expand Down Expand Up @@ -156,6 +154,10 @@ func (i ImporterNull) ImportPrivKey(uid, armor, passphrase string) error {
panic("must never be called")
}

func (i ImporterNull) ImportPrivKeyHex(uid, privKey, algoStr string) error {
panic("must never be called")
}

func (i ImporterNull) ImportPubKey(uid string, armor string) error {
panic("must never be called")
}
Expand Down
2 changes: 1 addition & 1 deletion feeder/eventstream/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type IntegrationTestSuite struct {
func (s *IntegrationTestSuite) SetupSuite() {
app.SetPrefixes(app.AccountAddressPrefix)

s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfigAndRegister()))
s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfig()))
network, err := testutilcli.New(
s.T(),
s.T().TempDir(),
Expand Down
2 changes: 1 addition & 1 deletion feeder/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type IntegrationTestSuite struct {

func (s *IntegrationTestSuite) SetupSuite() {
app.SetPrefixes(app.AccountAddressPrefix)
s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfigAndRegister()))
s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfig()))
network, err := testutilcli.New(
s.T(),
s.T().TempDir(),
Expand Down
3 changes: 1 addition & 2 deletions feeder/priceposter/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func Dial(
panic(err)
}

encoding := app.MakeEncodingConfigAndRegister()
encoding := app.MakeEncodingConfig()
deps := deps{
oracleClient: oracletypes.NewQueryClient(conn),
authClient: authtypes.NewQueryClient(conn),
Expand Down Expand Up @@ -117,7 +117,6 @@ func (c *Client) SendPrices(vp types.VotingPeriod, prices []types.Price) {

c.previousPrevote = newPrevote
logger.Info().Str("tx-hash", resp.TxHash).Msg("successfully forwarded prices")

}

func (c *Client) Close() {
Expand Down
2 changes: 1 addition & 1 deletion feeder/priceposter/client_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type IntegrationTestSuite struct {
func (s *IntegrationTestSuite) SetupSuite() {
app.SetPrefixes(app.AccountAddressPrefix)

s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfigAndRegister()))
s.cfg = testutilcli.BuildNetworkConfig(genesis.NewTestGenesisState(app.MakeEncodingConfig()))
network, err := testutilcli.New(
s.T(),
s.T().TempDir(),
Expand Down
66 changes: 36 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,39 @@ module github.com/NibiruChain/pricefeeder
go 1.19

require (
github.com/NibiruChain/nibiru v0.21.9
github.com/NibiruChain/nibiru v1.0.0
github.com/cometbft/cometbft v0.37.2
github.com/cosmos/cosmos-sdk v0.47.4
github.com/cosmos/cosmos-sdk v0.47.5
github.com/cosmos/go-bip39 v1.0.0
github.com/golang/mock v1.6.0
github.com/gorilla/websocket v1.5.0
github.com/jarcoal/httpmock v1.2.0
github.com/joho/godotenv v1.4.0
github.com/rs/zerolog v1.29.1
github.com/rs/zerolog v1.30.0
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.58.3
)

require (
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute v1.21.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.4.0 // indirect
cosmossdk.io/core v0.6.1 // indirect
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/errors v1.0.0 // indirect
cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect
cosmossdk.io/math v1.0.1 // indirect
cosmossdk.io/log v1.2.1 // indirect
cosmossdk.io/math v1.1.2 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/CosmWasm/wasmd v0.40.2 // indirect
github.com/CosmWasm/wasmvm v1.3.0 // indirect
github.com/CosmWasm/wasmvm v1.4.1 // indirect
github.com/MakeNowJust/heredoc/v2 v2.0.1 // indirect
github.com/NibiruChain/collections v0.3.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aws/aws-sdk-go v1.44.203 // indirect
Expand All @@ -48,6 +49,9 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
github.com/cockroachdb/errors v1.10.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect
github.com/cometbft/cometbft-db v0.8.0 // indirect
github.com/confio/ics23/go v0.9.0 // indirect
Expand All @@ -56,9 +60,9 @@ require (
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/gogoproto v1.4.10 // indirect
github.com/cosmos/iavl v0.21.0-beta.1 // indirect
github.com/cosmos/ibc-go/v7 v7.2.0 // indirect
github.com/cosmos/ibc-go/v7 v7.3.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/taskgroup v0.4.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
Expand All @@ -73,10 +77,10 @@ require (
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
Expand Down Expand Up @@ -108,13 +112,14 @@ require (
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.8.0 // indirect
Expand All @@ -134,12 +139,13 @@ require (
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
Expand All @@ -153,23 +159,23 @@ require (
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.11.0 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 1bc94a6

Please sign in to comment.