Skip to content

Commit

Permalink
introduce unbondong/redelegation/cancel unbonding filed to genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed Dec 21, 2023
1 parent a290f32 commit b6281a5
Show file tree
Hide file tree
Showing 4 changed files with 1,167 additions and 82 deletions.
3 changes: 3 additions & 0 deletions proto/centauri/stakingmiddleware/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ message GenesisState {

// delegations defines the delegations active at genesis.
repeated Delegation delegations = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated BeginRedelegate begindelegations = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated Undelegate undelegates = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
repeated CancelUnbondingDelegation cancelunbondingdelegations = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
47 changes: 46 additions & 1 deletion proto/centauri/stakingmiddleware/v1beta1/stakingmiddleware.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,49 @@ message Delegation {
string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
}

// BeginRedelegate defines a SDK message for performing a begin redelegation of coins
// from a delegator to a validator.
message BeginRedelegate{
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "cosmos-sdk/MsgBeginRedelegate";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgDelegate defines a SDK message for performing a delegation of coins
// from a delegator to a validator.
message Undelegate {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "cosmos-sdk/MsgUndelegate";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// MsgDelegate defines a SDK message for performing a delegation of coins
// from a delegator to a validator.
message CancelUnbondingDelegation {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "cosmos-sdk/MsgCancelUnbondingDelegation";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
int64 creation_height = 4;
}

233 changes: 212 additions & 21 deletions x/stakingmiddleware/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b6281a5

Please sign in to comment.