Skip to content

Commit

Permalink
fix: added deprecated proposal, compatible history (#622)
Browse files Browse the repository at this point in the history
Co-authored-by: nulnut <151493716+nulnut@users.noreply.github.com>
  • Loading branch information
zakir-code and nulnut authored Aug 5, 2024
1 parent 662a7cb commit 909b01b
Show file tree
Hide file tree
Showing 7 changed files with 1,256 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## [v7.4.0-rc5]

* Fixed added deprecated proposal, compatible history

---

## [v7.4.0-rc4]

* Bump cosmos-sdk to v0.47.13
Expand Down
2 changes: 1 addition & 1 deletion app/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestMakeEncodingConfig_RegisterInterfaces(t *testing.T) {
for implInterfaces.Next() {
count2++
}
assert.Equal(t, 298, count2)
assert.Equal(t, 299, count2)

typeURLMap := interfaceRegistry.FieldByName("typeURLMap").MapRange()
for typeURLMap.Next() {
Expand Down
3 changes: 3 additions & 0 deletions app/interface_registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
"/fx.gov.v1.MsgUpdateEGFParamsResponse",
"/fx.gov.v1.MsgUpdateFXParams",
"/fx.gov.v1.MsgUpdateFXParamsResponse",
"/fx.gov.v1.MsgUpdateParams",
"/fx.gov.v1.MsgUpdateStore",
"/fx.gov.v1.MsgUpdateStoreResponse",
"/fx.gov.v1.MsgUpdateSwitchParams",
Expand Down Expand Up @@ -411,6 +412,7 @@
"/fx.evm.v1.MsgCallContract",
"/fx.gov.v1.MsgUpdateEGFParams",
"/fx.gov.v1.MsgUpdateFXParams",
"/fx.gov.v1.MsgUpdateParams",
"/fx.gov.v1.MsgUpdateStore",
"/fx.gov.v1.MsgUpdateSwitchParams",
"/fx.gravity.crosschain.v1.MsgAddDelegate",
Expand Down Expand Up @@ -498,6 +500,7 @@
"/fx.evm.v1.MsgCallContract",
"/fx.gov.v1.MsgUpdateEGFParams",
"/fx.gov.v1.MsgUpdateFXParams",
"/fx.gov.v1.MsgUpdateParams",
"/fx.gov.v1.MsgUpdateStore",
"/fx.gov.v1.MsgUpdateSwitchParams",
"/fx.gravity.crosschain.v1.MsgUpdateChainOracles",
Expand Down
67 changes: 67 additions & 0 deletions proto/fx/gov/v1/legacy.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
syntax = "proto3";
package fx.gov.v1;

import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";

option go_package = "github.com/functionx/fx-core/x/gov/legacy";

// Deprecated: Do not use.
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
LegacyParams params = 2 [(gogoproto.nullable) = false];
}

// Deprecated: Do not use.
message LegacyParams {
string msg_type = 1;

repeated cosmos.base.v1beta1.Coin min_deposit = 2 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "min_deposit,omitempty"
];

cosmos.base.v1beta1.Coin min_initial_deposit = 3 [
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "min_initial_deposit,omitempty"
];

google.protobuf.Duration voting_period = 4 [(gogoproto.stdduration) = true];

string quorum = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.jsontag) = "quorum,omitempty"
];

google.protobuf.Duration max_deposit_period = 6 [
(gogoproto.stdduration) = true,
(gogoproto.jsontag) = "max_deposit_period,omitempty"
];

string threshold = 7 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.jsontag) = "threshold,omitempty"
];

string veto_threshold = 8 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.jsontag) = "veto_threshold,omitempty"
];

// The ratio representing the proportion of the deposit value that must be
// paid at proposal submission.
string min_initial_deposit_ratio = 9 [(cosmos_proto.scalar) = "cosmos.Dec"];

// burn deposits if a proposal does not meet quorum
bool burn_vote_quorum = 10;

// burn deposits if the proposal does not enter voting period
bool burn_proposal_deposit_prevote = 11;

// burn deposits if quorum with vote type no_veto is met
bool burn_vote_veto = 12;
}
Loading

0 comments on commit 909b01b

Please sign in to comment.