-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 solana-tokens #10011
Add solana-tokens #10011
Conversation
* Add ThinClient methods to implement --no-wait * Plumb --no-wait through No tests yet * Check transaction status on startup * Easier to test * Wait until transaction is finalized before checking if it failed with an error It's possible that a minority fork thinks it failed. * Add unit tests * Remove dead code and rustfmt * Don't flush database to file if doing a dry-run
If those transactions are dropped, the next run will execute them.
Delete the copy-pasted top-level test. Fixes solana-labs#19
* Move resolve_distribute_stake_args into its own function * Add stake args to token args * Unify option names * Move Command::DistributeStake into DistributeTokens * Remove process_distribute_stake * Only unique signers * Use sender keypair to fund new fee-payer accounts * Unify distribute_tokens and distribute_stake
* Send all transactions as quickly as possible, then wait * Exit when finalized or blockhashes have expired * Don't need blockhash in the CSV output * Better types CSV library was choking on Pubkey as a type. PickleDb doesn't have that problem. * Resend if blockhash has not expired * Attempt to fix CI
* Add constructor, tuck away client * Fix unwrap() caught by CI
* Remove untested --no-wait feature * Make --transactions-db an option, not an arg So that in the future, we can make it optional * Remove more untested features Too many false positives in that santity check. Use --dry-run instead. * Add dry-run mode to ThinClient * Cleaner dry-run * Make key parameters required Just don't use them in --dry-run * Add option to write the transaction log --dry-run doesn't write to the database. Use this option if you want a copy of the transaction log before the final run. * Revert --transaction-log addition Implement solana-labs#27 first * Fix CI * Update readme * Fix CI in copypasta
* Move db functionality into its own module * Rename tokens module to commands * Version bump * Upgrade Solana
}; | ||
use solana_transaction_status::TransactionStatus; | ||
|
||
pub trait Client { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this is merged, first course of action will be looking for ways to get rid of trait.
impl Client for RpcClient { | ||
fn send_transaction1(&self, transaction: Transaction) -> Result<Signature> { | ||
self.send_transaction(&transaction) | ||
.map_err(|e| TransportError::Custom(e.to_string())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super ugly - will make it go away post-merge.
Codecov Report
@@ Coverage Diff @@
## master #10011 +/- ##
=======================================
Coverage 80.4% 80.4%
=======================================
Files 292 292
Lines 67293 67293
=======================================
Hits 54140 54140
Misses 13153 13153 |
Do we want to ship |
Problem
I've been developing the CLI tool
solana-tokens
in a separate repo, which was great for its initial development, but now it's more important that it doesn't bitrot at we change solana APIs.Summary of Changes