Skip to content
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

Merged
merged 4 commits into from
May 25, 2023

Conversation

alexgao001
Copy link
Collaborator

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:

  • NA

@alexgao001 alexgao001 added the wip label May 23, 2023
@@ -855,6 +855,7 @@ func NewMsgCreateGroup(creator sdk.AccAddress, groupName string, membersAcc []sd
Creator: creator.String(),
GroupName: groupName,
Members: members,
Extra: extra,
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added limit

//s.SendTxBlock(owner, msgDeleteGroup)
//
//// policy is GC
//_, err = s.Client.QueryPolicyById(ctx, &storagetypes.QueryPolicyByIdRequest{PolicyId: policyID.String()})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comments these code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was for testing, removed,

@@ -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]",
Copy link
Contributor

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.

@alexgao001 alexgao001 removed the wip label May 25, 2023
TypeMsgMirrorGroup = "mirror_group"

MaxGroupExtraInfoLimit = 256
Copy link
Collaborator

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.

@unclezoro unclezoro added the r4r label May 25, 2023
@unclezoro unclezoro merged commit 391a25d into bnb-chain:develop May 25, 2023
forcodedancing pushed a commit that referenced this pull request May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants