-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[toekn-cli] Replace is_valid_pubkey
validator with signer source parser
#7447
Open
samkim-crypto
wants to merge
7
commits into
solana-labs:master
Choose a base branch
from
samkim-crypto:token-cli/is-valid-signer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[toekn-cli] Replace is_valid_pubkey
validator with signer source parser
#7447
samkim-crypto
wants to merge
7
commits into
solana-labs:master
from
samkim-crypto:token-cli/is-valid-signer
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
stale
[bot only] Added to stale content; will be closed soon
label
Nov 18, 2024
samkim-crypto
removed
the
stale
[bot only] Added to stale content; will be closed soon
label
Nov 19, 2024
samkim-crypto
force-pushed
the
token-cli/is-valid-signer
branch
2 times, most recently
from
November 20, 2024 00:54
b6508ff
to
a696806
Compare
samkim-crypto
changed the title
[toekn-cli] Replace
[toekn-cli] Replace Nov 20, 2024
is_valid_signer
validator with signer source parseris_valid_pubkey
validator with signer source parser
samkim-crypto
force-pushed
the
token-cli/is-valid-signer
branch
from
November 20, 2024 00:59
a696806
to
126335b
Compare
samkim-crypto
force-pushed
the
token-cli/is-valid-signer
branch
3 times, most recently
from
November 22, 2024 01:42
6b17f63
to
76f5da8
Compare
samkim-crypto
force-pushed
the
token-cli/is-valid-signer
branch
from
November 22, 2024 03:27
64bd4c9
to
ae6082d
Compare
github-actions
bot
added
the
stale
[bot only] Added to stale content; will be closed soon
label
Dec 9, 2024
samkim-crypto
added
do-not-close
Add this tag to exempt a PR / issue from being closed automatically
and removed
stale
[bot only] Added to stale content; will be closed soon
labels
Dec 12, 2024
oops sorry i didnt see this in my inbox until this notif, will do it this week! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In token-cli, there are still some deprecated functions from clap-v2 that should be removed. In particular, we still use input validators, which should be replaced with input parsers.
Summary of Changes
This is a follow-up to #7448. In this PR, I removed all occurrences of the
is_valid_pubkey
validation function.Replacing
is_valid_pubkey
requires two steps.is_valid_pubkey
with eitherSignerSource::default().allow_all().build()
orSignerSource::default().allow_pubkey().build()
depending on whether we are only parsing pubkey or any signer source.SignerSource::try_get_pubkey(...)
to parse the pubkey.The main commit that applies the steps above is 8d27503. In the previous commits 76f5da8, 58e0441 (I made a mistake in this PR, which I fixed in ae6082d), dc311a7, I did some ground work to update the
Config
associated functions to use theSignerSource::try_get_pubkey(...)
.After this PR, there are still occurrences of
is_valid_signer
validation function. This will be removed in another follow-up.