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

add stake program functionality #345

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mindrunner
Copy link

Replacement for:

#129

@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Attention: Patch coverage is 84.11215% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 89.67%. Comparing base (ff9af68) to head (60a7bae).

Current head 60a7bae differs from pull request most recent head 6b48d94

Please upload reports for the commit 6b48d94 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
- Coverage   89.69%   89.67%   -0.03%     
==========================================
  Files          27       31       +4     
  Lines        2193     2324     +131     
==========================================
+ Hits         1967     2084     +117     
- Misses        226      240      +14     

@mindrunner mindrunner marked this pull request as draft March 10, 2023 09:12
@mindrunner mindrunner marked this pull request as ready for review March 10, 2023 09:52
@michaelhly
Copy link
Owner

@mindrunner can you fix the linter issues and write a few integration tests that cover the new code?

@mindrunner
Copy link
Author

yeap, already on it. didn't find the time yet

@mindrunner
Copy link
Author

Looking at the tests, it seems like comparing my tx with cli_wire_msg would not work. (And it does not indeed.)

Where does js_wire_msg come from. Was that generated by solana-web3.js?

@michaelhly
Copy link
Owner

Looking at the tests, it seems like comparing my tx with cli_wire_msg would not work. (And it does not indeed.)

Where does js_wire_msg come from. Was that generated by solana-web3.js?

Yes

@Morgandri1
Copy link

@mindrunner i'm trying to incorporate your code, but am having an issue when trying to use create_account_and_delegate_stake. It seems i need to provide a stake account, even though the function is supposed to create one.
Thanks

@mindrunner
Copy link
Author

Are you refering to stake_pubkey parameter?

Just generate a keypair and pass in the public part and you should be fine! :)

@Morgandri1
Copy link

Does it not require an owner? When you create a token account it has to be attached to an owner, so I would assume this would be the same or a similar system.

@mindrunner
Copy link
Author

As far as I know, those kind of accounts do not have an ownership of that kind. You provide an authorized keypair instead. This private key will be the one having the stake in custody.

I think the Solana Stackexchange would probably be the better place to ask such questions :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants