-
Notifications
You must be signed in to change notification settings - Fork 7
CLI helpers: PDA utils #40
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
Conversation
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.
Just a couple of nits, looks great to me otherwise!
clients/cli/src/cli.rs
Outdated
pub enum Command { | ||
/// Create a wrapped mint for a given SPL Token | ||
CreateMint(CreateMintArgs), | ||
Pdas(PdasArgs), |
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.
nit: I lean towards being explicit here, and calling it find-program-derived-addresses
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.
Agreed, but I am also okay with find-pdas
.
writeln_name_value( | ||
f, | ||
"Wrapped mint authority:", | ||
&self.wrapped_mint_authority.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.
nit: maybe we should make it clear that this is also the holder of unwrapped tokens? ie "Wrapped mint authority / unwrapped token holder"
? Or is that too verbose?
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.
I'd say the escrow account would fulfill the role of "unwrapped token holder"
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.
I meant it as "address that owns the unwrapped token accounts". But I guess this shows why we never came up with a better name than "token account" 😅 we can just leave it as is
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.
Lgtm! Nice idea!!
Will stamp after the command name change.
clients/cli/src/cli.rs
Outdated
pub enum Command { | ||
/// Create a wrapped mint for a given SPL Token | ||
CreateMint(CreateMintArgs), | ||
Pdas(PdasArgs), |
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.
Agreed, but I am also okay with find-pdas
.
A CLI command to help derive the PDAs for the program. Example: