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

Parameter bucketOwner in function SetBucketFlowRateLimit does not take effect #254

Open
Pekuee opened this issue Dec 20, 2024 · 3 comments

Comments

@Pekuee
Copy link

Pekuee commented Dec 20, 2024

Two account, accountA has tbnb while accountB doesn't
I use SetBucketFlowRateLimit, the paymentAddr was created by accountA, and bucketOwner is accountB.
But, when i call CreateBucket by accountB, error response code: 5, codespace:sdk.
And, when i call CreateBucket by accountA, the bucketOwner will become accountA, this is contrary to my purpose.
What's wrong?

go1.21.7
[email protected]

@STdevK
Copy link

STdevK commented Dec 26, 2024

please explain what you wish to achieve

@Pekuee
Copy link
Author

Pekuee commented Dec 26, 2024

Two account, accountA has tbnb while accountB doesn't I use SetBucketFlowRateLimit, the paymentAddr was created by accountA, and bucketOwner is accountB. But, when i call CreateBucket by accountB, error response code: 5, codespace:sdk. And, when i call CreateBucket by accountA, the bucketOwner will become accountA, this is contrary to my purpose. What's wrong?

go1.21.7 [email protected]

Same as above, I wish accountA to cover all the gas of accountB from creating bucket to upload objects.

@clydemeng
Copy link
Contributor

can you post your code ?

If you want to use another payment account for your existing bucket, you should

  1. update bucket (MsgUpdateBucketInfo) to set the by specifying the payment address
  2. Using the other payment account to s the flow rate limit for your bucket

see: bnb-chain/BEPs#362

For your case, your account B should be the owner of your bucket.

Then using account B to update bucket's payment account to account A.
ANd using account A to set the flow rate limit for your bucket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants