forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CLI fee payer arg into clap-utils
- Loading branch information
Showing
5 changed files
with
39 additions
and
29 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::{input_validators, ArgConstant}; | ||
use clap::Arg; | ||
|
||
pub const FEE_PAYER_ARG: ArgConstant<'static> = ArgConstant { | ||
name: "fee_payer", | ||
long: "fee-payer", | ||
help: "Specify the fee-payer account. This may be a keypair file, the ASK keyword \n\ | ||
or the pubkey of an offline signer, provided an appropriate --signer argument \n\ | ||
is also passed. Defaults to the client keypair.", | ||
}; | ||
|
||
pub fn fee_payer_arg<'a, 'b>() -> Arg<'a, 'b> { | ||
Arg::with_name(FEE_PAYER_ARG.name) | ||
.long(FEE_PAYER_ARG.long) | ||
.takes_value(true) | ||
.value_name("KEYPAIR") | ||
.validator(input_validators::is_valid_signer) | ||
.help(FEE_PAYER_ARG.help) | ||
} |
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
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
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
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