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:
72
Cargo.lock
generated
72
Cargo.lock
generated
@ -3168,6 +3168,42 @@ dependencies = [
|
|||||||
"cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "solana-cli"
|
||||||
|
version = "0.18.0-pre2"
|
||||||
|
dependencies = [
|
||||||
|
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"bs58 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"criterion-stats 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pretty-hex 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"solana-budget-api 0.18.0-pre2",
|
||||||
|
"solana-budget-program 0.18.0-pre2",
|
||||||
|
"solana-client 0.18.0-pre2",
|
||||||
|
"solana-core 0.18.0-pre2",
|
||||||
|
"solana-drone 0.18.0-pre2",
|
||||||
|
"solana-logger 0.18.0-pre2",
|
||||||
|
"solana-netutil 0.18.0-pre2",
|
||||||
|
"solana-runtime 0.18.0-pre2",
|
||||||
|
"solana-sdk 0.18.0-pre2",
|
||||||
|
"solana-stake-api 0.18.0-pre2",
|
||||||
|
"solana-storage-api 0.18.0-pre2",
|
||||||
|
"solana-vote-api 0.18.0-pre2",
|
||||||
|
"solana-vote-signer 0.18.0-pre2",
|
||||||
|
"url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-client"
|
name = "solana-client"
|
||||||
version = "0.18.0-pre2"
|
version = "0.18.0-pre2"
|
||||||
@ -3898,42 +3934,6 @@ dependencies = [
|
|||||||
"solana-sdk 0.18.0-pre2",
|
"solana-sdk 0.18.0-pre2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "solana-wallet"
|
|
||||||
version = "0.18.0-pre2"
|
|
||||||
dependencies = [
|
|
||||||
"bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"bs58 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"criterion-stats 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"pretty-hex 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"solana-budget-api 0.18.0-pre2",
|
|
||||||
"solana-budget-program 0.18.0-pre2",
|
|
||||||
"solana-client 0.18.0-pre2",
|
|
||||||
"solana-core 0.18.0-pre2",
|
|
||||||
"solana-drone 0.18.0-pre2",
|
|
||||||
"solana-logger 0.18.0-pre2",
|
|
||||||
"solana-netutil 0.18.0-pre2",
|
|
||||||
"solana-runtime 0.18.0-pre2",
|
|
||||||
"solana-sdk 0.18.0-pre2",
|
|
||||||
"solana-stake-api 0.18.0-pre2",
|
|
||||||
"solana-storage-api 0.18.0-pre2",
|
|
||||||
"solana-vote-api 0.18.0-pre2",
|
|
||||||
"solana-vote-signer 0.18.0-pre2",
|
|
||||||
"url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana_libra_bytecode_verifier"
|
name = "solana_libra_bytecode_verifier"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
@ -53,7 +53,7 @@ members = [
|
|||||||
"utils/netutil",
|
"utils/netutil",
|
||||||
"utils/fixed_buf",
|
"utils/fixed_buf",
|
||||||
"vote-signer",
|
"vote-signer",
|
||||||
"wallet",
|
"cli",
|
||||||
]
|
]
|
||||||
|
|
||||||
exclude = [
|
exclude = [
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
- [Blockstreamer](blockstreamer.md)
|
- [Blockstreamer](blockstreamer.md)
|
||||||
- [JSON RPC API](jsonrpc-api.md)
|
- [JSON RPC API](jsonrpc-api.md)
|
||||||
- [JavaScript API](javascript-api.md)
|
- [JavaScript API](javascript-api.md)
|
||||||
- [solana-wallet CLI](wallet.md)
|
- [solana CLI](cli.md)
|
||||||
|
|
||||||
- [Accepted Design Proposals](proposals.md)
|
- [Accepted Design Proposals](proposals.md)
|
||||||
- [Ledger Replication](ledger-replication-to-implement.md)
|
- [Ledger Replication](ledger-replication-to-implement.md)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## solana-wallet CLI
|
## solana CLI
|
||||||
|
|
||||||
The [solana crate](https://crates.io/crates/solana) is distributed with a command-line interface tool
|
The [solana-cli crate](https://crates.io/crates/solana-cli) provides a command-line interface tool for Solana
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ The [solana crate](https://crates.io/crates/solana) is distributed with a comman
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet address
|
$ solana address
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<PUBKEY>
|
<PUBKEY>
|
||||||
@ -18,7 +18,7 @@ $ solana-wallet address
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet airdrop 123
|
$ solana airdrop 123
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
"Your balance is: 123"
|
"Your balance is: 123"
|
||||||
@ -28,7 +28,7 @@ $ solana-wallet airdrop 123
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet balance
|
$ solana balance
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
"Your balance is: 123"
|
"Your balance is: 123"
|
||||||
@ -38,7 +38,7 @@ $ solana-wallet balance
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet confirm <TX_SIGNATURE>
|
$ solana confirm <TX_SIGNATURE>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
|
"Confirmed" / "Not found" / "Transaction failed with error <ERR>"
|
||||||
@ -48,7 +48,7 @@ $ solana-wallet confirm <TX_SIGNATURE>
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet deploy <PATH>
|
$ solana deploy <PATH>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<PROGRAM_ID>
|
<PROGRAM_ID>
|
||||||
@ -58,7 +58,7 @@ $ solana-wallet deploy <PATH>
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123
|
$ solana pay <PUBKEY> 123
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<TX_SIGNATURE>
|
<TX_SIGNATURE>
|
||||||
@ -68,7 +68,7 @@ $ solana-wallet pay <PUBKEY> 123
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana pay <PUBKEY> 123 \
|
||||||
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
|
--after 2018-12-24T23:59:00 --require-timestamp-from <PUBKEY>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
@ -81,7 +81,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
|||||||
A third party must send a signature to unlock the lamports.
|
A third party must send a signature to unlock the lamports.
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana pay <PUBKEY> 123 \
|
||||||
--require-signature-from <PUBKEY>
|
--require-signature-from <PUBKEY>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
@ -92,7 +92,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana pay <PUBKEY> 123 \
|
||||||
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
|
--after 2018-12-24T23:59 --require-timestamp-from <PUBKEY> \
|
||||||
--require-signature-from <PUBKEY>
|
--require-signature-from <PUBKEY>
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana pay <PUBKEY> 123 \
|
||||||
--require-signature-from <PUBKEY> \
|
--require-signature-from <PUBKEY> \
|
||||||
--require-signature-from <PUBKEY>
|
--require-signature-from <PUBKEY>
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet pay <PUBKEY> 123 \
|
$ solana pay <PUBKEY> 123 \
|
||||||
--require-signature-from <PUBKEY> \
|
--require-signature-from <PUBKEY> \
|
||||||
--cancelable
|
--cancelable
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ $ solana-wallet pay <PUBKEY> 123 \
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet cancel <PROCESS_ID>
|
$ solana cancel <PROCESS_ID>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<TX_SIGNATURE>
|
<TX_SIGNATURE>
|
||||||
@ -138,7 +138,7 @@ $ solana-wallet cancel <PROCESS_ID>
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
$ solana send-signature <PUBKEY> <PROCESS_ID>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<TX_SIGNATURE>
|
<TX_SIGNATURE>
|
||||||
@ -149,7 +149,7 @@ $ solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
|||||||
Use the current system time:
|
Use the current system time:
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID>
|
$ solana send-timestamp <PUBKEY> <PROCESS_ID>
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<TX_SIGNATURE>
|
<TX_SIGNATURE>
|
||||||
@ -159,7 +159,7 @@ Or specify some other arbitrary timestamp:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
// Command
|
// Command
|
||||||
$ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
$ solana send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
<TX_SIGNATURE>
|
<TX_SIGNATURE>
|
||||||
@ -168,10 +168,10 @@ $ solana-wallet send-timestamp <PUBKEY> <PROCESS_ID> --date 2018-12-24T23:59:00
|
|||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet 0.12.0
|
solana 0.12.0
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet [FLAGS] [OPTIONS] [SUBCOMMAND]
|
solana [FLAGS] [OPTIONS] [SUBCOMMAND]
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -201,11 +201,11 @@ SUBCOMMANDS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-address
|
solana-address
|
||||||
Get your public key
|
Get your public key
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet address
|
solana address
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -213,11 +213,11 @@ FLAGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-airdrop
|
solana-airdrop
|
||||||
Request a batch of lamports
|
Request a batch of lamports
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet airdrop <NUM>
|
solana airdrop <NUM>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -228,11 +228,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-balance
|
solana-balance
|
||||||
Get your balance
|
Get your balance
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet balance
|
solana balance
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -240,11 +240,11 @@ FLAGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-cancel
|
solana-cancel
|
||||||
Cancel a transfer
|
Cancel a transfer
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet cancel <PROCESS_ID>
|
solana cancel <PROCESS_ID>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -255,11 +255,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-confirm
|
solana-confirm
|
||||||
Confirm transaction by signature
|
Confirm transaction by signature
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet confirm <SIGNATURE>
|
solana confirm <SIGNATURE>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -270,11 +270,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-deploy
|
solana-deploy
|
||||||
Deploy a program
|
Deploy a program
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet deploy <PATH>
|
solana deploy <PATH>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -285,11 +285,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-fees
|
solana-fees
|
||||||
Display current cluster fees
|
Display current cluster fees
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet fees
|
solana fees
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -297,11 +297,11 @@ FLAGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-get-transaction-count
|
solana-get-transaction-count
|
||||||
Get current transaction count
|
Get current transaction count
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet get-transaction-count
|
solana get-transaction-count
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -309,11 +309,11 @@ FLAGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-pay
|
solana-pay
|
||||||
Send a payment
|
Send a payment
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
|
solana pay [FLAGS] [OPTIONS] <PUBKEY> <NUM>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
--cancelable
|
--cancelable
|
||||||
@ -331,11 +331,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-send-signature
|
solana-send-signature
|
||||||
Send a signature to authorize a transfer
|
Send a signature to authorize a transfer
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet send-signature <PUBKEY> <PROCESS_ID>
|
solana send-signature <PUBKEY> <PROCESS_ID>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
||||||
@ -347,11 +347,11 @@ ARGS:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```manpage
|
```manpage
|
||||||
solana-wallet-send-timestamp
|
solana-send-timestamp
|
||||||
Send a timestamp to unlock a transfer
|
Send a timestamp to unlock a transfer
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
solana-wallet send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
|
solana send-timestamp [OPTIONS] <PUBKEY> <PROCESS_ID>
|
||||||
|
|
||||||
FLAGS:
|
FLAGS:
|
||||||
-h, --help Prints help information
|
-h, --help Prints help information
|
@ -129,10 +129,10 @@ $ export STORAGE_IDENTITY=$(solana-keygen pubkey storage-keypair.json)
|
|||||||
```
|
```
|
||||||
Then set up the storage accounts for your replicator by running:
|
Then set up the storage accounts for your replicator by running:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet --keypair replicator-keypair.json airdrop 100000
|
$ solana --keypair replicator-keypair.json airdrop 100000
|
||||||
$ solana-wallet --keypair replicator-keypair.json create-replicator-storage-account $REPLICATOR_IDENTITY $STORAGE_IDENTITY
|
$ solana --keypair replicator-keypair.json create-replicator-storage-account $REPLICATOR_IDENTITY $STORAGE_IDENTITY
|
||||||
```
|
```
|
||||||
Note: Every time the testnet restarts, run the wallet steps to setup the replicator accounts again.
|
Note: Every time the testnet restarts, run the steps to setup the replicator accounts again.
|
||||||
|
|
||||||
To start the replicator:
|
To start the replicator:
|
||||||
```bash
|
```bash
|
||||||
@ -146,8 +146,8 @@ gossip network by running:
|
|||||||
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
$ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
||||||
```
|
```
|
||||||
|
|
||||||
Provide the **storage account pubkey** to the `solana-wallet show-storage-account` command to view
|
Provide the **storage account pubkey** to the `solana show-storage-account` command to view
|
||||||
the recent mining activity from your replicator:
|
the recent mining activity from your replicator:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
$ solana --keypair storage-keypair.json show-storage-account $STORAGE_IDENTITY
|
||||||
```
|
```
|
||||||
|
@ -28,30 +28,30 @@ The vote pubkey for the validator can be found by running:
|
|||||||
$ solana-keygen pubkey ~/validator-vote-keypair.json
|
$ solana-keygen pubkey ~/validator-vote-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Provide the **vote pubkey** to the `solana-wallet show-vote-account` command to view
|
Provide the **vote pubkey** to the `solana show-vote-account` command to view
|
||||||
the recent voting activity from your validator:
|
the recent voting activity from your validator:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
$ solana show-vote-account 2ozWvfaXQd1X6uKh8jERoRGApDqSqcEy6fF1oN13LL2G
|
||||||
```
|
```
|
||||||
|
|
||||||
## Check Your Balance
|
## Check Your Balance
|
||||||
Your lamport balance should decrease by the transaction fee amount as your
|
Your lamport balance should decrease by the transaction fee amount as your
|
||||||
validator submits votes, and increase after serving as the leader:
|
validator submits votes, and increase after serving as the leader:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet balance
|
$ solana balance
|
||||||
```
|
```
|
||||||
|
|
||||||
## Check Slot Number
|
## Check Slot Number
|
||||||
After your validator boots, it may take some time to catch up with the cluster.
|
After your validator boots, it may take some time to catch up with the cluster.
|
||||||
Use the `get-slot` wallet command to view the current slot that the cluster is
|
Use the `get-slot` command to view the current slot that the cluster is
|
||||||
processing:
|
processing:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet get-slot
|
$ solana get-slot
|
||||||
```
|
```
|
||||||
|
|
||||||
The current slot that your validator is processing can then been seen with:
|
The current slot that your validator is processing can then been seen with:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet --url http://127.0.0.1:8899 get-slot
|
$ solana --url http://127.0.0.1:8899 get-slot
|
||||||
```
|
```
|
||||||
|
|
||||||
Until your validator has caught up, it will not be able to vote successfully and
|
Until your validator has caught up, it will not be able to vote successfully and
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
When your validator starts, it will have no stake, which means it will be
|
When your validator starts, it will have no stake, which means it will be
|
||||||
ineligible to become leader.
|
ineligible to become leader.
|
||||||
|
|
||||||
Adding stake can be accomplished by using the `solana-wallet` CLI
|
Adding stake can be accomplished by using the `solana` CLI
|
||||||
|
|
||||||
First create a stake account keypair with `solana-keygen`:
|
First create a stake account keypair with `solana-keygen`:
|
||||||
```bash
|
```bash
|
||||||
$ solana-keygen new -o ~/validator-config/stake-keypair.json
|
$ solana-keygen new -o ~/validator-config/stake-keypair.json
|
||||||
```
|
```
|
||||||
and use the wallet's `delegate-stake` command to stake your validator with 42 lamports:
|
and use the cli's `delegate-stake` command to stake your validator with 42 lamports:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json 42
|
$ solana delegate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json 42
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour
|
Note that stakes need to warm up, and warmup increments are applied at Epoch boundaries, so it can take an hour
|
||||||
@ -28,14 +28,14 @@ commission rate set in the vote account.
|
|||||||
|
|
||||||
Stake can be deactivated by running:
|
Stake can be deactivated by running:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet deactivate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
$ solana deactivate-stake ~/validator-config/stake-keypair.json ~/validator-vote-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
The stake will cool down, deactivate over time. While cooling down, your stake will continue to earn
|
The stake will cool down, deactivate over time. While cooling down, your stake will continue to earn
|
||||||
rewards.
|
rewards.
|
||||||
|
|
||||||
Note that a stake account may only be used once, so after deactivation, use the
|
Note that a stake account may only be used once, so after deactivation, use the
|
||||||
wallet's `withdraw-stake` command to recover the previously staked lamports.
|
cli's `withdraw-stake` command to recover the previously staked lamports.
|
||||||
|
|
||||||
Be sure and redeem your credits before withdrawing all your lamports.
|
Be sure and redeem your credits before withdrawing all your lamports.
|
||||||
Once the account is fully withdrawn, the account is destroyed.
|
Once the account is fully withdrawn, the account is destroyed.
|
||||||
|
@ -22,10 +22,10 @@ for more detail on cluster activity.
|
|||||||
Sanity check that you are able to interact with the cluster by receiving a small
|
Sanity check that you are able to interact with the cluster by receiving a small
|
||||||
airdrop of lamports from the testnet drone:
|
airdrop of lamports from the testnet drone:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet set --url http://testnet.solana.com:8899
|
$ solana set --url http://testnet.solana.com:8899
|
||||||
$ solana-wallet get
|
$ solana get
|
||||||
$ solana-wallet airdrop 123
|
$ solana airdrop 123
|
||||||
$ solana-wallet balance
|
$ solana balance
|
||||||
```
|
```
|
||||||
|
|
||||||
Also try running following command to join the gossip network and view all the
|
Also try running following command to join the gossip network and view all the
|
||||||
@ -42,17 +42,17 @@ $ solana-keygen new -o ~/validator-keypair.json
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Wallet Configuration
|
### Wallet Configuration
|
||||||
You can set solana-wallet configuration to use your validator keypair for all
|
You can set solana configuration to use your validator keypair for all
|
||||||
following commands:
|
following commands:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet set --keypair ~/validator-keypair.json
|
$ solana set --keypair ~/validator-keypair.json
|
||||||
```
|
```
|
||||||
|
|
||||||
**All following solana-wallet commands assume you have set `--keypair` config to
|
**All following solana commands assume you have set `--keypair` config to
|
||||||
**your validator identity keypair.**
|
**your validator identity keypair.**
|
||||||
If you haven't, you will need to add the `--keypair` argument to each command, like:
|
If you haven't, you will need to add the `--keypair` argument to each command, like:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet --keypair ~/validator-keypair.json airdrop 1000
|
$ solana --keypair ~/validator-keypair.json airdrop 1000
|
||||||
```
|
```
|
||||||
(You can always override the set configuration by explicitly passing the
|
(You can always override the set configuration by explicitly passing the
|
||||||
`--keypair` argument with a command.)
|
`--keypair` argument with a command.)
|
||||||
@ -60,14 +60,14 @@ $ solana-wallet --keypair ~/validator-keypair.json airdrop 1000
|
|||||||
### Validator Start
|
### Validator Start
|
||||||
Airdrop yourself some lamports to get started:
|
Airdrop yourself some lamports to get started:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet airdrop 1000
|
$ solana airdrop 1000
|
||||||
```
|
```
|
||||||
|
|
||||||
Your validator will need a vote account. Create it now with the following
|
Your validator will need a vote account. Create it now with the following
|
||||||
commands:
|
commands:
|
||||||
```bash
|
```bash
|
||||||
$ solana-keygen new -o ~/validator-vote-keypair.json
|
$ solana-keygen new -o ~/validator-vote-keypair.json
|
||||||
$ solana-wallet create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1
|
$ solana create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Then use one of the following commands, depending on your installation
|
Then use one of the following commands, depending on your installation
|
||||||
|
@ -42,19 +42,19 @@ $ solana-install init 0.18.0
|
|||||||
If you are downloading pre-compiled binaries or building from source, simply choose the release matching your desired testnet.
|
If you are downloading pre-compiled binaries or building from source, simply choose the release matching your desired testnet.
|
||||||
|
|
||||||
### Validator Commands
|
### Validator Commands
|
||||||
Solana CLI tools like solana-wallet and solana-validator-info point at
|
Solana CLI tools like solana and solana-validator-info point at
|
||||||
testnet.solana.com by default. Include a `--url` argument to point at a
|
testnet.solana.com by default. Include a `--url` argument to point at a
|
||||||
different testnet. For instance:
|
different testnet. For instance:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet --url http://beta.testnet.solana.com:8899 balance
|
$ solana --url http://beta.testnet.solana.com:8899 balance
|
||||||
```
|
```
|
||||||
|
|
||||||
Solana-wallet includes `get` and `set` configuration commands to automatically
|
The solana cli includes `get` and `set` configuration commands to automatically
|
||||||
set the `--url` argument for future wallet commands.
|
set the `--url` argument for future wallet commands.
|
||||||
For example:
|
For example:
|
||||||
```bash
|
```bash
|
||||||
$ solana-wallet set --url http://beta.testnet.solana.com:8899
|
$ solana set --url http://beta.testnet.solana.com:8899
|
||||||
$ solana-wallet balance # Same result as command above
|
$ solana balance # Same result as command above
|
||||||
```
|
```
|
||||||
(You can always override the set configuration by explicitly passing the `--url`
|
(You can always override the set configuration by explicitly passing the `--url`
|
||||||
argument with a command.)
|
argument with a command.)
|
||||||
|
0
wallet/.gitignore → cli/.gitignore
vendored
0
wallet/.gitignore → cli/.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
authors = ["Solana Maintainers <maintainers@solana.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "solana-wallet"
|
name = "solana-cli"
|
||||||
description = "Blockchain, Rebuilt for Scale"
|
description = "Blockchain, Rebuilt for Scale"
|
||||||
version = "0.18.0-pre2"
|
version = "0.18.0-pre2"
|
||||||
repository = "https://github.com/solana-labs/solana"
|
repository = "https://github.com/solana-labs/solana"
|
||||||
@ -44,3 +44,7 @@ solana-budget-program = { path = "../programs/budget_program", version = "0.18.0
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
cuda = []
|
cuda = []
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "solana"
|
||||||
|
path = "src/main.rs"
|
@ -3,11 +3,11 @@ set -e
|
|||||||
|
|
||||||
cd "$(dirname "$0")"/..
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
cargo build --package solana-wallet
|
cargo build --package solana-cli
|
||||||
export PATH=$PWD/target/debug:$PATH
|
export PATH=$PWD/target/debug:$PATH
|
||||||
|
|
||||||
echo "\`\`\`manpage"
|
echo "\`\`\`manpage"
|
||||||
solana-wallet --help
|
solana --help
|
||||||
echo "\`\`\`"
|
echo "\`\`\`"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ commands=(address airdrop balance cancel confirm deploy fees get-transaction-cou
|
|||||||
|
|
||||||
for x in "${commands[@]}"; do
|
for x in "${commands[@]}"; do
|
||||||
echo "\`\`\`manpage"
|
echo "\`\`\`manpage"
|
||||||
solana-wallet "${x}" --help
|
solana "${x}" --help
|
||||||
echo "\`\`\`"
|
echo "\`\`\`"
|
||||||
echo ""
|
echo ""
|
||||||
done
|
done
|
@ -1,9 +1,9 @@
|
|||||||
use clap::{crate_description, crate_name, crate_version, Arg, ArgGroup, ArgMatches, SubCommand};
|
use clap::{crate_description, crate_name, crate_version, Arg, ArgGroup, ArgMatches, SubCommand};
|
||||||
use console::style;
|
use console::style;
|
||||||
|
use solana_cli::config::{self, Config};
|
||||||
|
use solana_cli::display::println_name_value;
|
||||||
|
use solana_cli::wallet::{app, parse_command, process_command, WalletConfig, WalletError};
|
||||||
use solana_sdk::signature::{gen_keypair_file, read_keypair, KeypairUtil};
|
use solana_sdk::signature::{gen_keypair_file, read_keypair, KeypairUtil};
|
||||||
use solana_wallet::config::{self, Config};
|
|
||||||
use solana_wallet::display::println_name_value;
|
|
||||||
use solana_wallet::wallet::{app, parse_command, process_command, WalletConfig, WalletError};
|
|
||||||
use std::error;
|
use std::error;
|
||||||
|
|
||||||
fn parse_settings(matches: &ArgMatches<'_>) -> Result<bool, Box<dyn error::Error>> {
|
fn parse_settings(matches: &ArgMatches<'_>) -> Result<bool, Box<dyn error::Error>> {
|
@ -1,10 +1,10 @@
|
|||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
use solana_cli::wallet::{process_command, WalletCommand, WalletConfig};
|
||||||
use solana_client::rpc_client::RpcClient;
|
use solana_client::rpc_client::RpcClient;
|
||||||
use solana_client::rpc_request::RpcRequest;
|
use solana_client::rpc_request::RpcRequest;
|
||||||
use solana_core::validator::new_validator_for_tests;
|
use solana_core::validator::new_validator_for_tests;
|
||||||
use solana_drone::drone::run_local_drone;
|
use solana_drone::drone::run_local_drone;
|
||||||
use solana_sdk::bpf_loader;
|
use solana_sdk::bpf_loader;
|
||||||
use solana_wallet::wallet::{process_command, WalletCommand, WalletConfig};
|
|
||||||
use std::fs::{remove_dir_all, File};
|
use std::fs::{remove_dir_all, File};
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
@ -1,12 +1,12 @@
|
|||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
use solana_cli::wallet::{
|
||||||
|
process_command, request_and_confirm_airdrop, WalletCommand, WalletConfig,
|
||||||
|
};
|
||||||
use solana_client::rpc_client::RpcClient;
|
use solana_client::rpc_client::RpcClient;
|
||||||
use solana_drone::drone::run_local_drone;
|
use solana_drone::drone::run_local_drone;
|
||||||
use solana_sdk::pubkey::Pubkey;
|
use solana_sdk::pubkey::Pubkey;
|
||||||
use solana_sdk::signature::KeypairUtil;
|
use solana_sdk::signature::KeypairUtil;
|
||||||
use solana_wallet::wallet::{
|
|
||||||
process_command, request_and_confirm_airdrop, WalletCommand, WalletConfig,
|
|
||||||
};
|
|
||||||
use std::fs::remove_dir_all;
|
use std::fs::remove_dir_all;
|
||||||
use std::sync::mpsc::channel;
|
use std::sync::mpsc::channel;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
|
use solana_cli::wallet::{process_command, WalletCommand, WalletConfig};
|
||||||
use solana_client::rpc_client::RpcClient;
|
use solana_client::rpc_client::RpcClient;
|
||||||
use solana_core::validator::new_validator_for_tests;
|
use solana_core::validator::new_validator_for_tests;
|
||||||
use solana_drone::drone::run_local_drone;
|
use solana_drone::drone::run_local_drone;
|
||||||
use solana_sdk::signature::KeypairUtil;
|
use solana_sdk::signature::KeypairUtil;
|
||||||
use solana_wallet::wallet::{process_command, WalletCommand, WalletConfig};
|
|
||||||
use std::fs::remove_dir_all;
|
use std::fs::remove_dir_all;
|
||||||
use std::sync::mpsc::channel;
|
use std::sync::mpsc::channel;
|
||||||
|
|
@ -26,7 +26,11 @@ fi
|
|||||||
if [[ -n $USE_INSTALL || ! -f "$SOLANA_ROOT"/Cargo.toml ]]; then
|
if [[ -n $USE_INSTALL || ! -f "$SOLANA_ROOT"/Cargo.toml ]]; then
|
||||||
solana_program() {
|
solana_program() {
|
||||||
declare program="$1"
|
declare program="$1"
|
||||||
printf "solana-%s" "$program"
|
if [[ -z $program ]]; then
|
||||||
|
printf "solana"
|
||||||
|
else
|
||||||
|
printf "solana-%s" "$program"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
solana_program() {
|
solana_program() {
|
||||||
@ -36,14 +40,23 @@ else
|
|||||||
program=${BASH_REMATCH[1]}
|
program=${BASH_REMATCH[1]}
|
||||||
features+="cuda"
|
features+="cuda"
|
||||||
fi
|
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
|
fi
|
||||||
if [[ -n $NDEBUG ]]; then
|
if [[ -n $NDEBUG ]]; then
|
||||||
maybe_release=--release
|
maybe_release=--release
|
||||||
fi
|
fi
|
||||||
declare manifest_path="--manifest-path=$SOLANA_ROOT/$program/Cargo.toml"
|
declare manifest_path="--manifest-path=$SOLANA_ROOT/$crate/Cargo.toml"
|
||||||
printf "cargo run $manifest_path $maybe_release $maybe_package --bin solana-%s %s -- " "$program" "$features"
|
printf "cargo run $manifest_path $maybe_release $maybe_package --bin %s %s -- " "$program" "$features"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -55,7 +68,7 @@ solana_genesis=$(solana_program genesis)
|
|||||||
solana_gossip=$(solana_program gossip)
|
solana_gossip=$(solana_program gossip)
|
||||||
solana_keygen=$(solana_program keygen)
|
solana_keygen=$(solana_program keygen)
|
||||||
solana_ledger_tool=$(solana_program ledger-tool)
|
solana_ledger_tool=$(solana_program ledger-tool)
|
||||||
solana_wallet=$(solana_program wallet)
|
solana_cli=$(solana_program)
|
||||||
solana_replicator=$(solana_program replicator)
|
solana_replicator=$(solana_program replicator)
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
@ -95,15 +95,15 @@ fi
|
|||||||
|
|
||||||
if ((airdrops_enabled)); then
|
if ((airdrops_enabled)); then
|
||||||
declare fees=100 # TODO: No hardcoded transaction fees, fetch the current cluster fees
|
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
|
fi
|
||||||
|
|
||||||
$solana_keygen new -o "$stake_keypair_path"
|
$solana_keygen new -o "$stake_keypair_path"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
$solana_wallet "${common_args[@]}" \
|
$solana_cli "${common_args[@]}" \
|
||||||
show-vote-account "$vote_keypair_path"
|
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"
|
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"
|
$solana_keygen new -o "$identity_keypair"
|
||||||
|
|
||||||
# TODO: https://github.com/solana-labs/solminer/blob/9cd2289/src/replicator.js#L17-L18
|
# 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
|
airdrop 100000
|
||||||
fi
|
fi
|
||||||
identity_pubkey=$($solana_keygen pubkey "$identity_keypair")
|
identity_pubkey=$($solana_keygen pubkey "$identity_keypair")
|
||||||
@ -71,7 +71,7 @@ if [[ ! -r $storage_keypair ]]; then
|
|||||||
$solana_keygen new -o "$storage_keypair"
|
$solana_keygen new -o "$storage_keypair"
|
||||||
storage_pubkey=$($solana_keygen pubkey "$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"
|
create-replicator-storage-account "$identity_pubkey" "$storage_pubkey"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ trap 'kill_node_and_exit' INT TERM ERR
|
|||||||
wallet() {
|
wallet() {
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
$solana_wallet --keypair "$identity_keypair_path" --url "$rpc_url" "$@"
|
$solana_cli --keypair "$identity_keypair_path" --url "$rpc_url" "$@"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ BIN_CRATES=(
|
|||||||
replicator
|
replicator
|
||||||
validator
|
validator
|
||||||
validator-info
|
validator-info
|
||||||
wallet
|
cli
|
||||||
bench-exchange
|
bench-exchange
|
||||||
bench-tps
|
bench-tps
|
||||||
)
|
)
|
||||||
|
@ -72,10 +72,10 @@ PATH="$SOLANA_ROOT"/target/debug:$PATH
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
balance=$(solana-wallet $maybeKeypair --url "$URL" balance)
|
balance=$(solana $maybeKeypair --url "$URL" balance)
|
||||||
if [[ $balance = "0 lamports" ]]; then
|
if [[ $balance = "0 lamports" ]]; then
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
solana-wallet $maybeKeypair --url "$URL" airdrop 42
|
solana $maybeKeypair --url "$URL" airdrop 42
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
# shellcheck disable=SC2086 # Don't want to double quote $maybeKeypair
|
||||||
|
@ -23,7 +23,7 @@ check_balance_output() {
|
|||||||
exec 42>&1
|
exec 42>&1
|
||||||
attempts=3
|
attempts=3
|
||||||
while [[ $attempts -gt 0 ]]; do
|
while [[ $attempts -gt 0 ]]; do
|
||||||
output=$($solana_wallet "${entrypoint[@]}" balance | tee >(cat - >&42))
|
output=$($solana_cli "${entrypoint[@]}" balance | tee >(cat - >&42))
|
||||||
if [[ "$output" =~ $expected_output ]]; then
|
if [[ "$output" =~ $expected_output ]]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@ -39,8 +39,8 @@ check_balance_output() {
|
|||||||
|
|
||||||
pay_and_confirm() {
|
pay_and_confirm() {
|
||||||
exec 42>&1
|
exec 42>&1
|
||||||
signature=$($solana_wallet "${entrypoint[@]}" pay "$@" | tail -c 88 | tee >(cat - >&42))
|
signature=$($solana_cli "${entrypoint[@]}" pay "$@" | tail -c 88 | tee >(cat - >&42))
|
||||||
$solana_wallet "${entrypoint[@]}" confirm "$signature"
|
$solana_cli "${entrypoint[@]}" confirm "$signature"
|
||||||
}
|
}
|
||||||
|
|
||||||
$solana_keygen new -f
|
$solana_keygen new -f
|
||||||
@ -48,7 +48,7 @@ $solana_keygen new -f
|
|||||||
node_readiness=false
|
node_readiness=false
|
||||||
timeout=60
|
timeout=60
|
||||||
while [[ $timeout -gt 0 ]]; do
|
while [[ $timeout -gt 0 ]]; do
|
||||||
output=$($solana_wallet "${entrypoint[@]}" get-transaction-count)
|
output=$($solana_cli "${entrypoint[@]}" get-transaction-count)
|
||||||
if [[ -n $output ]]; then
|
if [[ -n $output ]]; then
|
||||||
node_readiness=true
|
node_readiness=true
|
||||||
break
|
break
|
||||||
@ -61,11 +61,11 @@ if ! "$node_readiness"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$solana_wallet "${entrypoint[@]}" address
|
$solana_cli "${entrypoint[@]}" address
|
||||||
check_balance_output "0 lamports"
|
check_balance_output "0 lamports"
|
||||||
$solana_wallet "${entrypoint[@]}" airdrop 600
|
$solana_cli "${entrypoint[@]}" airdrop 600
|
||||||
check_balance_output "600 lamports"
|
check_balance_output "600 lamports"
|
||||||
$solana_wallet "${entrypoint[@]}" airdrop 400
|
$solana_cli "${entrypoint[@]}" airdrop 400
|
||||||
check_balance_output "1000 lamports"
|
check_balance_output "1000 lamports"
|
||||||
pay_and_confirm $garbage_address 50
|
pay_and_confirm $garbage_address 50
|
||||||
check_balance_output "lamports" # <-- exact number of lamports here depends on the current cluster fees
|
check_balance_output "lamports" # <-- exact number of lamports here depends on the current cluster fees
|
||||||
|
Reference in New Issue
Block a user