Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Add separate payer field to pay initialization fee when creating accounts #20

Merged
merged 2 commits into from
May 26, 2023

Conversation

broskicodes
Copy link
Contributor

This PR is to add a payer field to all Create_ structs (CreatePost, CreateUser etc.). The payer field will allow for and account other than the authority to pay for the creation of accounts (Posts, Users etc.).

The main reason for this change is to facilitate PDAs to be the authority on user accounts.

@abishekk92 abishekk92 self-requested a review May 25, 2023 13:23
Copy link
Member

@abishekk92 abishekk92 left a comment

Choose a reason for hiding this comment

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

Thanks so much for your contribution! The PR looks good, I am soft approving this for merge.

Here are couple of additions that would've been good, especially in test coverage.

  1. Explicitly testing scenarios where the payer and authority are different.
  2. Adding payer account in reaction/profile_metadata/user rn it is only post and connection.

Let me know, if you would like to add them, otherwise I am happy to merge this and then add the changes myself.

@broskicodes
Copy link
Contributor Author

I'm pretty sure the PR already adds the payer account in reaction, user etc. If I missed something lmk.
I'm happy to add the changes for the tests, I start on them now.

@broskicodes
Copy link
Contributor Author

Added the tests. Lmk when you are thinking of deploying the program with the changes and I can work on changes to the sdk packages as well :)

@abishekk92 abishekk92 merged commit a56a687 into gumhq:master May 26, 2023
@abishekk92
Copy link
Member

Thanks for making the changes, I've merged them 🎉 !

Our next deploy is going to be along side #18. It has a few breaking changes in terms of how user, profile and reaction
works.

The SDK might take a while to merge, if that's fine you can submit a PR. Otherwise, it is a small change @vjgpt or I would be happy to add them in as we make changes to the SDK for smart profile.

@abishekk92
Copy link
Member

Update: This PR has been merged into #18 as well. Fee delegation will make a lot of things smoother re gasless etc. Thanks once again for the patch.

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

Successfully merging this pull request may close these issues.

2 participants