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: SNS Realloc Name Account #3955

Merged
merged 18 commits into from
Jan 27, 2023

Conversation

stegaBOB
Copy link
Contributor

@stegaBOB stegaBOB commented Jan 3, 2023

Pretty straightforward PR. This PR adds the ability to realloc the SNS name account.

Todo:

  • JS bindings
  • JS Tests

@mergify mergify bot added the community Community contribution label Jan 3, 2023
@stegaBOB stegaBOB marked this pull request as ready for review January 18, 2023 04:50
@stegaBOB
Copy link
Contributor Author

The lack of JS tests here is a bit concerning. I think I'll spend some time at some point before this is ready to go to just write a few to make sure my changes function as they should.

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Really great work! I only have some tiny nits, the implementation is solid

name-service/program/src/instruction.rs Outdated Show resolved Hide resolved
name-service/program/src/instruction.rs Outdated Show resolved Hide resolved
name-service/program/src/instruction.rs Outdated Show resolved Hide resolved
name-service/program/src/processor.rs Outdated Show resolved Hide resolved
name-service/program/src/processor.rs Show resolved Hide resolved
name-service/program/tests/functional.rs Outdated Show resolved Hide resolved
name-service/program/tests/functional.rs Outdated Show resolved Hide resolved
name-service/program/tests/functional.rs Outdated Show resolved Hide resolved
name-service/js/src/bindings.ts Outdated Show resolved Hide resolved
@joncinque
Copy link
Contributor

do you intend to add the JS tests in this PR or with later work? Also, it looks like the hashed_name -> hashedName change wasn't applied everywhere, since my suggestion only changed the line where it's declared, and not where it's used.

@stegaBOB
Copy link
Contributor Author

Whoops! I'll fix that. As for the TS tests, I'd prefer not to write them at all haha. If you think it's fine to merge in as it is now without tests, then by all means I guess? I don't have the bandwidth right now to write TS tests from scratch so it might take little while if the tests were to be in this PR.

@joncinque
Copy link
Contributor

That's fine, I'll merge this as is. Do you mind adding an issue for the JS tests?

@joncinque joncinque merged commit c6c8398 into solana-labs:master Jan 27, 2023
@stegaBOB stegaBOB deleted the stegaBOB/feat/sns-realloc branch January 28, 2023 03:11
@stegaBOB
Copy link
Contributor Author

Awesome! And yep, heres the issue: #4004

HaoranYi pushed a commit to HaoranYi/solana-program-library that referenced this pull request Jul 19, 2023
* add new realloc ix

* add tests

* update param order to be consistent with other builders

* add realloc ix to instructions.ts

* ts bindings for realloc

* ts linting

* fix logs and clippy arithmetic

* satisfy clippy

* Update name-service/program/src/instruction.rs

Co-authored-by: Jon Cinque <joncinque@pm.me>

* Update name-service/program/src/instruction.rs

Co-authored-by: Jon Cinque <joncinque@pm.me>

* docs nits

* fix import ordering

* Update name-service/program/tests/functional.rs

Co-authored-by: Jon Cinque <joncinque@pm.me>

* blockhash nits

* Update name-service/js/src/bindings.ts

Co-authored-by: Jon Cinque <joncinque@pm.me>

* fix hashed_name naming

Co-authored-by: Jon Cinque <joncinque@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants