Skip to content

Commit

Permalink
update price-feeder to v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Feb 21, 2025
1 parent 9f51483 commit 2d86f92
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
7 changes: 4 additions & 3 deletions cmd/imuad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import (

evmoskr "github.com/evmos/evmos/v16/crypto/keyring"
cmdcfg "github.com/imua-xyz/imuachain/cmd/config"

pricefeeder "github.com/imua-xyz/price-feeder/external"
feedertypes "github.com/imua-xyz/price-feeder/types"
)
Expand Down Expand Up @@ -146,7 +145,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
preRunE := startCmd.PreRunE
// add preRun to run price-feeder first before starting the node
startCmd.PreRunE = func(cmd *cobra.Command, args []string) error {
// TODO: Temporarily disable the price feeder to fix the issue caused by two different versions of the EVMOS dependency.
// This needs to be re-enabled after the price feeder updates the EVMOS dependency to v16 and updates the Imuachain dependency
// to the version that includes this fix.
if enableFeeder, _ := cmd.Flags().GetBool(flagOracle); enableFeeder {
Expand All @@ -161,7 +159,10 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
}
}()
mnemonic, _ := cmd.Flags().GetString(flagMnemonic)
pricefeeder.StartPriceFeeder(path.Join(clientCtx.HomeDir, confPath, confOracle), mnemonic, path.Join(clientCtx.HomeDir, confPath))
_ = mnemonic
_ = clientCtx
serverCtx := sdkserver.GetServerContextFromCmd(cmd)
pricefeeder.StartPriceFeeder(path.Join(clientCtx.HomeDir, confPath, confOracle), mnemonic, path.Join(clientCtx.HomeDir, confPath), serverCtx.Logger.With("module", "price-feeder"))
}()
}
return preRunE(cmd, args)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
github.com/imua-xyz/price-feeder v0.1.16-0.20250219142917-5ea492552d53
github.com/imua-xyz/price-feeder v0.2.4
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.1
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -58,7 +58,7 @@ require (
github.com/jinzhu/now v1.1.5 // indirect
github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 // indirect
github.com/mattn/go-sqlite3 v1.14.22 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/zap v1.27.0 // indirect
)

require (
Expand Down
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,8 @@ github.com/imroc/biu v0.0.0-20170329141542-0376ce6761c0 h1:pkyNAS9IQiZgseFrdhZC4
github.com/imroc/biu v0.0.0-20170329141542-0376ce6761c0/go.mod h1:wscexmyH+oDXfQr1q8PAZUXfKnxCUcNm62D/M5Ec8Lw=
github.com/imua-xyz/evmos/v16 v16.0.3-0.20240828081344-d5cfcd34a812 h1:9LcKMUeHSmwbSmMiCkSOiPg0+DCR0dPpzgzZWc83HBg=
github.com/imua-xyz/evmos/v16 v16.0.3-0.20240828081344-d5cfcd34a812/go.mod h1:w0vtRYI4I0/O8eihq6ZuDvlca4ZiYCKN6vpakG9zHcc=
github.com/imua-xyz/price-feeder v0.1.16-0.20250219142917-5ea492552d53 h1:Ba5gUPR0l/O5NZLdg8cULlKbl/T1qgzx6KHfNJFe8Bs=
github.com/imua-xyz/price-feeder v0.1.16-0.20250219142917-5ea492552d53/go.mod h1:vy1Cx1lmuWWgYUx5ZKJq6qReHTYvn2juHI5NCCaBoZM=
github.com/imua-xyz/price-feeder v0.2.4 h1:iu6eu4eqbVIWMDCbuYp6Q3Flu0mPrK+//Ay0gwlkZZY=
github.com/imua-xyz/price-feeder v0.2.4/go.mod h1:3/nqmvTHMCoP0IttoFMyhRZ1zdkSR+Uz+4CZnCxuR1g=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
Expand Down Expand Up @@ -1640,9 +1640,9 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
Expand All @@ -1654,6 +1654,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
Expand Down
22 changes: 13 additions & 9 deletions local_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,23 @@ EOF
# generate oracle_feeder.yaml file
oracle_feeder_content=$(
cat <<EOF
sources:
- chainlink
tokens:
- ETHUSDT
- WSTETHUSDT
- token: ETHUSDT
sources: chainlink
- token: NSTETH
sources: beaconchain
- token: WSTETH
sources: chainlink
sender:
mnemonic: ""
path: $HOMEDIR/config
imua:
chainid: $CHAINID
appName: imua
rpc: 127.0.0.1:9090
ws:
addr: !!str ws://127.0.0.1:26657
endpoint: /websocket
grpc: 127.0.0.1:9090
ws: !!str ws://127.0.0.1:26657/websocket
rpc: !!str http://127.0.0.1:26657
debugger:
grpc: !!str :50051
EOF
)

Expand All @@ -255,6 +257,8 @@ EOF
cat <<EOF
url:
!!str https://ethereum-holesky-rpc.publicnode.com
nstid:
!!str 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_0x65
EOF
)

Expand Down

0 comments on commit 2d86f92

Please sign in to comment.