add stake program functionality
Replacement for:
https://github.com/michaelhly/solana-py/pull/129
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).
:exclamation: 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 can you fix the linter issues and write a few integration tests that cover the new code?
yeap, already on it. didn't find the time yet
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?
Looking at the tests, it seems like comparing my tx with
cli_wire_msgwould not work. (And it does not indeed.)Where does
js_wire_msgcome from. Was that generated bysolana-web3.js?
Yes
@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
Are you refering to stake_pubkey parameter?
Just generate a keypair and pass in the public part and you should be fine! :)
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.
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 :)