-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Switch from stdlib json encoding to proto encoding in vote exten…
…sion handler (#516) * fix: Create vote extension with no exchange rates if price feeder oracle is not set * debug log * fix debug statement * handle empty ve * fix: Switch from stdlib jsosn encoding to proto encoding in vote extension handler * lint * commit info error * move txs len check to correct place * err in endblocker
- Loading branch information
1 parent
960e5e1
commit 65e8943
Showing
9 changed files
with
685 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
syntax = "proto3"; | ||
package ojo.oracle.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "ojo/oracle/v1/oracle.proto"; | ||
|
||
option go_package = "github.com/ojo-network/ojo/x/oracle/types"; | ||
|
||
option (gogoproto.goproto_getters_all) = false; | ||
|
||
// OracleVoteExtension defines the vote extension structure used by the oracle | ||
// module. | ||
message OracleVoteExtension { | ||
int64 height = 1; | ||
repeated cosmos.base.v1beta1.DecCoin exchange_rates = 2 [ | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", | ||
(gogoproto.nullable) = false | ||
]; | ||
} | ||
|
||
// InjectedVoteExtensionTx defines the vote extension tx injected by the prepare | ||
// proposal handler. | ||
message InjectedVoteExtensionTx { | ||
repeated AggregateExchangeRateVote exchange_rate_votes = 1[ | ||
(gogoproto.nullable) = false | ||
]; | ||
bytes extended_commit_info = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.