solana_clap_utils/
fee_payer.rs

1use {
2    crate::{input_validators, ArgConstant},
3    clap::Arg,
4};
5
6pub const FEE_PAYER_ARG: ArgConstant<'static> = ArgConstant {
7    name: "fee_payer",
8    long: "fee-payer",
9    help: "Specify the fee-payer account. This may be a keypair file, the ASK keyword \n\
10           or the pubkey of an offline signer, provided an appropriate --signer argument \n\
11           is also passed. Defaults to the client keypair.",
12};
13
14pub fn fee_payer_arg<'a, 'b>() -> Arg<'a, 'b> {
15    Arg::with_name(FEE_PAYER_ARG.name)
16        .long(FEE_PAYER_ARG.long)
17        .takes_value(true)
18        .value_name("KEYPAIR")
19        .validator(input_validators::is_valid_signer)
20        .help(FEE_PAYER_ARG.help)
21}