-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add extra field to group #258
feat: add extra field to group #258
Conversation
e00b3b4
to
c5cf23e
Compare
@@ -855,6 +855,7 @@ func NewMsgCreateGroup(creator sdk.AccAddress, groupName string, membersAcc []sd | |||
Creator: creator.String(), | |||
GroupName: groupName, | |||
Members: members, | |||
Extra: extra, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should limit the length of the extra
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added limit
e2e/tests/permission_test.go
Outdated
//s.SendTxBlock(owner, msgDeleteGroup) | ||
// | ||
//// policy is GC | ||
//_, err = s.Client.QueryPolicyById(ctx, &storagetypes.QueryPolicyByIdRequest{PolicyId: policyID.String()}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why comments these code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was for testing, removed,
x/storage/client/cli/tx.go
Outdated
@@ -516,12 +516,13 @@ func CmdDiscontinueObject() *cobra.Command { | |||
|
|||
func CmdCreateGroup() *cobra.Command { | |||
cmd := &cobra.Command{ | |||
Use: "create-group [group-name] [member-list]", | |||
Use: "create-group [group-name] [member-list [extra]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra is optional, so I suggest you use a flag for it.
f8a54a4
to
fd48f31
Compare
x/storage/types/message.go
Outdated
TypeMsgMirrorGroup = "mirror_group" | ||
|
||
MaxGroupExtraInfoLimit = 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems a bit short, please try 512.
Description
this pr adds a extra field when creating a group. user can define the content of any format but type of string for it.
Rationale
This enriches the GROUP Usage scenario
Example
NA
Changes
Notable changes: