Rename solana-wallet program to just solana (#5604)
* Rename wallet/ to cli/ * Rename the solana-wallet crate to solana-cli * Rename solana-wallet program to solana * cargo fmt
This commit is contained in:
@ -26,7 +26,11 @@ fi
|
||||
if [[ -n $USE_INSTALL || ! -f "$SOLANA_ROOT"/Cargo.toml ]]; then
|
||||
solana_program() {
|
||||
declare program="$1"
|
||||
printf "solana-%s" "$program"
|
||||
if [[ -z $program ]]; then
|
||||
printf "solana"
|
||||
else
|
||||
printf "solana-%s" "$program"
|
||||
fi
|
||||
}
|
||||
else
|
||||
solana_program() {
|
||||
@ -36,14 +40,23 @@ else
|
||||
program=${BASH_REMATCH[1]}
|
||||
features+="cuda"
|
||||
fi
|
||||
if [[ -r "$SOLANA_ROOT/$program"/Cargo.toml ]]; then
|
||||
maybe_package="--package solana-$program"
|
||||
|
||||
declare crate="$program"
|
||||
if [[ -z $program ]]; then
|
||||
crate="cli"
|
||||
program="solana"
|
||||
else
|
||||
program="solana-$program"
|
||||
fi
|
||||
|
||||
if [[ -r "$SOLANA_ROOT/$crate"/Cargo.toml ]]; then
|
||||
maybe_package="--package solana-$crate"
|
||||
fi
|
||||
if [[ -n $NDEBUG ]]; then
|
||||
maybe_release=--release
|
||||
fi
|
||||
declare manifest_path="--manifest-path=$SOLANA_ROOT/$program/Cargo.toml"
|
||||
printf "cargo run $manifest_path $maybe_release $maybe_package --bin solana-%s %s -- " "$program" "$features"
|
||||
declare manifest_path="--manifest-path=$SOLANA_ROOT/$crate/Cargo.toml"
|
||||
printf "cargo run $manifest_path $maybe_release $maybe_package --bin %s %s -- " "$program" "$features"
|
||||
}
|
||||
fi
|
||||
|
||||
@ -55,7 +68,7 @@ solana_genesis=$(solana_program genesis)
|
||||
solana_gossip=$(solana_program gossip)
|
||||
solana_keygen=$(solana_program keygen)
|
||||
solana_ledger_tool=$(solana_program ledger-tool)
|
||||
solana_wallet=$(solana_program wallet)
|
||||
solana_cli=$(solana_program)
|
||||
solana_replicator=$(solana_program replicator)
|
||||
|
||||
export RUST_BACKTRACE=1
|
||||
|
@ -95,15 +95,15 @@ fi
|
||||
|
||||
if ((airdrops_enabled)); then
|
||||
declare fees=100 # TODO: No hardcoded transaction fees, fetch the current cluster fees
|
||||
$solana_wallet "${common_args[@]}" airdrop $((stake_lamports+fees))
|
||||
$solana_cli "${common_args[@]}" airdrop $((stake_lamports+fees))
|
||||
fi
|
||||
|
||||
$solana_keygen new -o "$stake_keypair_path"
|
||||
|
||||
set -x
|
||||
$solana_wallet "${common_args[@]}" \
|
||||
$solana_cli "${common_args[@]}" \
|
||||
show-vote-account "$vote_keypair_path"
|
||||
$solana_wallet "${common_args[@]}" \
|
||||
$solana_cli "${common_args[@]}" \
|
||||
delegate-stake $maybe_force "$stake_keypair_path" "$vote_keypair_path" "$stake_lamports"
|
||||
$solana_wallet "${common_args[@]}" show-stake-account "$stake_keypair_path"
|
||||
$solana_cli "${common_args[@]}" show-stake-account "$stake_keypair_path"
|
||||
|
||||
|
@ -62,7 +62,7 @@ if [[ ! -r $identity_keypair ]]; then
|
||||
$solana_keygen new -o "$identity_keypair"
|
||||
|
||||
# TODO: https://github.com/solana-labs/solminer/blob/9cd2289/src/replicator.js#L17-L18
|
||||
$solana_wallet --keypair "$identity_keypair" --url "$rpc_url" \
|
||||
$solana_cli --keypair "$identity_keypair" --url "$rpc_url" \
|
||||
airdrop 100000
|
||||
fi
|
||||
identity_pubkey=$($solana_keygen pubkey "$identity_keypair")
|
||||
@ -71,7 +71,7 @@ if [[ ! -r $storage_keypair ]]; then
|
||||
$solana_keygen new -o "$storage_keypair"
|
||||
storage_pubkey=$($solana_keygen pubkey "$storage_keypair")
|
||||
|
||||
$solana_wallet --keypair "$identity_keypair" --url "$rpc_url" \
|
||||
$solana_cli --keypair "$identity_keypair" --url "$rpc_url" \
|
||||
create-replicator-storage-account "$identity_pubkey" "$storage_pubkey"
|
||||
fi
|
||||
|
||||
|
@ -237,7 +237,7 @@ trap 'kill_node_and_exit' INT TERM ERR
|
||||
wallet() {
|
||||
(
|
||||
set -x
|
||||
$solana_wallet --keypair "$identity_keypair_path" --url "$rpc_url" "$@"
|
||||
$solana_cli --keypair "$identity_keypair_path" --url "$rpc_url" "$@"
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user