Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions bin/katana/src/cli/init/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ pub struct SlotArgs {
/// Specify the number of paymaster accounts to create.
///
/// This argument accepts a list of values, where each value is a pair of public key and salt
/// separated by a comma. If more than one pair is provided, the double quotes are required to
/// prevent the shell from prematurely splitting the argument.
/// separated by a comma.
///
/// For example:
///
/// ```
/// --slot.paymasters 0x1,0x2
/// ```
/// 0x1,0x2
///
/// ```
/// --slot.paymasters "0x1,0x2 0x3,0x4 0x5,0x6"
/// ```
/// multiple values can be provided by separating them with spaces:
///
/// 0x1,0x2 0x3,0x4 0x5,0x6
///
/// where the total number of pairs determine how many paymaster accounts will be created.
#[arg(requires_all = ["id", "slot"])]
#[arg(long = "slot.paymasters", value_delimiter = ' ')]
#[arg(long = "slot.paymasters", num_args = 1..)]
pub paymaster_accounts: Option<Vec<PaymasterAccountArgs>>,
}

Expand Down Expand Up @@ -188,8 +185,9 @@ mod tests {
"--id",
"--slot",
"--slot.paymasters",
// Must be in one argument because the shell splits the argument otherwise.
"0x1,0x2 0x1,0x3 0x1,0x4",
"0x1,0x2",
"0x1,0x3",
"0x1,0x4",
]);

let paymasters = slot.paymaster_accounts.unwrap();
Expand Down
Loading