Skip to content

Commit

Permalink
refine the code
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnss committed Jun 19, 2023
1 parent 84950b4 commit bb4e6b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
4 changes: 2 additions & 2 deletions proto/greenfield/storage/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,12 @@ message MsgCompleteMigrateBucket {

uint32 global_virtual_group_family_id =2;

message DstGVGDetail {
message DstGVGInfo {
uint32 local_virtual_group_id = 1;
uint32 global_virtual_group_id = 2;
repeated bytes secondary_sp_signature = 3;
}
repeated DstGVGDetail dstGVGDetails = 3;
repeated DstGVGInfo dstGVGInfos = 3;

string bucket_name = 4;
}
Expand Down
17 changes: 0 additions & 17 deletions proto/greenfield/virtualgroup/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ message MsgUpdateParams {

// authority is the address that controls the module (defaults to x/gov unless overwritten).
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// params defines the x/virtualgroup parameters to update.

// NOTE: All parameters must be supplied.
Params params = 2 [(gogoproto.nullable) = false];
}
Expand All @@ -54,13 +52,10 @@ message MsgCreateGlobalVirtualGroup {

// primary_sp_address defines the account address of the primary storage provider who creates the global virtual group.
string primary_sp_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// family_id is the identifier for the virtual group's family.
uint32 family_id = 2;

// secondary_sp_id is a list of secondary storage provider IDs associated with the virtual group.
repeated uint32 secondary_sp_ids = 3;

// total_deposit is the total deposit amount required for the virtual group.
// The tokens needs deposited and the size of storage are correlated.
cosmos.base.v1beta1.Coin deposit = 4 [(gogoproto.nullable) = false];
Expand All @@ -73,7 +68,6 @@ message MsgDeleteGlobalVirtualGroup {

// primary_sp_address defines the account address of the primary storage provider who creates the global virtual group.
string primary_sp_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// global_virtual_group_id is the identifier of the global virtual group.
uint32 global_virtual_group_id = 2;
}
Expand All @@ -86,10 +80,8 @@ message MsgDeposit {
// funding_address is the account address from which the deposit is made.
// The funding address must correspond to the funding address of the primary storage provider of the global virtual group.
string funding_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// global_virtual_group_id is the identifier of the global virtual group.
uint32 global_virtual_group_id = 2;

// deposit is the amount of tokens being deposited for the global virtual group.
cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false];
}
Expand All @@ -102,10 +94,8 @@ message MsgWithdraw {

// funding_address is the account address for withdrawing funds.
string funding_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// global_virtual_group_id is the identifier of the global virtual group.
uint32 global_virtual_group_id = 2;

// withdraw is the amount of coins to be withdrawn.
// The amount needs to be smaller than stored_size * storage_staking_price
cosmos.base.v1beta1.Coin withdraw = 3 [(gogoproto.nullable) = false];
Expand All @@ -118,16 +108,12 @@ message MsgSwapOut {

// sp_address is the account address of the storage provider initiating the swap out.
string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// virtual_group_family_id is the identifier of the virtual group family.
uint32 virtual_group_family_id = 2;

// global_virtual_group_ids is a list of global virtual group IDs associated with the swap out.
repeated uint32 global_virtual_group_ids = 3;

// successor_sp_id is the account address of the successor storage provider.
uint32 successor_sp_id = 4;

// approval includes an expiration time and a signature.
// The fields to be signed with contains the necessary information of the successor.
common.Approval successor_sp_approval = 6;
Expand Down Expand Up @@ -158,7 +144,6 @@ message MsgWithdrawFromGVGFamily {

// funding_address is the account address for withdrawing funds.
string funding_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// global_virtual_group_id is the identifier of the global virtual group.
uint32 global_virtual_group_family_id = 2;
}
Expand All @@ -168,10 +153,8 @@ message MsgWithdrawFromGVGFamilyResponse {}
message MsgWithdrawFromGVG {
// option (cosmos.msg.v1.signer) specifies the signer of the message.
option (cosmos.msg.v1.signer) = "funding_address";

// funding_address is the account address for withdrawing funds.
string funding_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// global_virtual_group_id is the identifier of the global virtual group.
uint32 global_virtual_group_id = 2;
}
Expand Down

0 comments on commit bb4e6b5

Please sign in to comment.