diff --git a/.gitignore b/.gitignore index 578b28adf6..1d8ee2e41a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ test_snapshots local.sh .stellar .zed +node_modules/ +.DS_Store \ No newline at end of file diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index f7a362e020..6dba1c56c1 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -49,7 +49,7 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c - `keys` — Create and manage identities including keys and addresses - `network` — Configure connection to networks - `container` — Start local networks in containers -- `config` — Manage cli configuration +- `config` — Manage CLI configuration - `snapshot` — Download a snapshot of a ledger from an archive - `tx` — Sign, Simulate, and Send transactions - `xdr` — Decode and encode XDR @@ -59,7 +59,8 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c - `version` — Print version information - `plugin` — The subcommand for CLI plugins - `ledger` — Fetch ledger information -- `fee-stats` — Fetch network feestats +- `fee-stats` — ⚠️ Deprecated, use `fees stats` instead. Fetch network feestats +- `fees` — Fetch network feestats and configure CLI fee settings ###### **Options:** @@ -143,12 +144,15 @@ Deploy builtin Soroban Asset Contract ###### **Options:** - `--asset ` — ID of the Stellar classic asset to wrap, e.g. "USDC:G...5" -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `--alias ` — The alias that will be used to save the assets's id. Whenever used, `--alias` will always overwrite the existing contract id configuration without asking for confirmation +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -161,14 +165,10 @@ Deploy builtin Soroban Asset Contract - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract alias` @@ -428,11 +428,14 @@ If no keys are specified the contract itself is extended. - `persistent`: Persistent - `temporary`: Temporary -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -445,14 +448,10 @@ If no keys are specified the contract itself is extended. - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract deploy` @@ -468,16 +467,20 @@ Deploy a wasm contract - `--wasm ` — WASM file to deploy - `--wasm-hash ` — Hash of the already installed/deployed WASM file -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `--salt ` — Custom salt 32-byte salt for the token id +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `-i`, `--ignore-checks` — Whether to ignore safety checks when deploying contracts Default value: `false` - `--alias ` — The alias that will be used to save the contract's id. Whenever used, `--alias` will always overwrite the existing contract id configuration without asking for confirmation +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -486,19 +489,14 @@ Deploy a wasm contract ###### **Options (RPC):** -- `--salt ` — Custom salt 32-byte salt for the token id - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract fetch` @@ -566,11 +564,13 @@ Deploy normal Wasm Contract ###### **Options:** - `--salt ` — ID of the Soroban contract -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided ###### **Options (Global):** @@ -791,16 +791,20 @@ Install a WASM file to the ledger without creating a contract instance ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `--wasm ` — Path to wasm binary - `-i`, `--ignore-checks` — Whether to ignore safety checks when deploying contracts Default value: `false` +- `--build-only` — Build the transaction and only write the base64 xdr to stdout + ###### **Options (Global):** - `--global` — ⚠️ Deprecated: global config is always on @@ -812,14 +816,10 @@ Install a WASM file to the ledger without creating a contract instance - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract install` @@ -829,16 +829,20 @@ Install a WASM file to the ledger without creating a contract instance ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `--wasm ` — Path to wasm binary - `-i`, `--ignore-checks` — Whether to ignore safety checks when deploying contracts Default value: `false` +- `--build-only` — Build the transaction and only write the base64 xdr to stdout + ###### **Options (Global):** - `--global` — ⚠️ Deprecated: global config is always on @@ -850,14 +854,10 @@ Install a WASM file to the ledger without creating a contract instance - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract invoke` @@ -877,11 +877,13 @@ stellar contract invoke ... -- --help - `--id ` — Contract ID to invoke - `--is-view` — ⚠️ Deprecated, use `--send=no`. View the result simulating and do not sign and submit transaction -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `--send ` — Whether or not to send a transaction Default value: `default` @@ -891,6 +893,8 @@ stellar contract invoke ... -- --help - `no`: Do not send transaction, return simulation result - `yes`: Always send transaction +- `--build-only` — Build the transaction and only write the base64 xdr to stdout + ###### **Options (Global):** - `--global` — ⚠️ Deprecated: global config is always on @@ -902,14 +906,10 @@ stellar contract invoke ... -- --help - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar contract optimize` @@ -989,11 +989,14 @@ If no keys are specificed the contract itself is restored. - `--ledgers-to-extend ` — Number of ledgers to extend the entry - `--ttl-ledger-only` — Only print the new Time To Live ledger -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -1006,14 +1009,10 @@ If no keys are specificed the contract itself is restored. - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - +- `--resource-fee ` — Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee +- `--instructions ` — ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction +- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources with transaction simulation - `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout ## `stellar doctor` @@ -1574,7 +1573,7 @@ Stop a network container started with `stellar container start` ## `stellar config` -Manage cli configuration +Manage CLI configuration **Usage:** `stellar config ` @@ -1822,11 +1821,14 @@ Transfer XLM balance to another account and remove source account ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--account ` — Muxed Account to merge with, e.g. `GBX...`, 'MBX...' ###### **Options (Global):** @@ -1836,14 +1838,6 @@ Transfer XLM balance to another account and remove source account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -1857,11 +1851,14 @@ Begin sponsoring future reserves for another account ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--sponsored-id ` — Account that will be sponsored ###### **Options (Global):** @@ -1871,14 +1868,6 @@ Begin sponsoring future reserves for another account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -1892,11 +1881,14 @@ Bump sequence number to invalidate older transactions ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--bump-to ` — Sequence number to bump to ###### **Options (Global):** @@ -1906,14 +1898,6 @@ Bump sequence number to invalidate older transactions ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -1927,11 +1911,14 @@ Create, update, or delete a trustline ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--line ` - `--limit ` — Limit for the trust line, 0 to remove the trust line @@ -1944,14 +1931,6 @@ Create, update, or delete a trustline ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -1965,11 +1944,14 @@ Claim a claimable balance by its balance ID ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--balance-id ` — Balance ID of the claimable balance to claim (64-character hex string) ###### **Options (Global):** @@ -1979,14 +1961,6 @@ Claim a claimable balance by its balance ID ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2000,11 +1974,14 @@ Clawback an asset from an account ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--from ` — Account to clawback assets from, e.g. `GBX...` - `--asset ` — Asset to clawback - `--amount ` — Amount of the asset to clawback, in stroops. 1 stroop = 0.0000001 of the asset @@ -2016,14 +1993,6 @@ Clawback an asset from an account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2037,11 +2006,14 @@ Clawback a claimable balance by its balance ID ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--balance-id ` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA ###### **Options (Global):** @@ -2051,14 +2023,6 @@ Clawback a claimable balance by its balance ID ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2072,11 +2036,14 @@ Create and fund a new account ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--destination ` — Account Id to create, e.g. `GBX...` - `--starting-balance ` — Initial balance in stroops of the account, default 1 XLM @@ -2089,14 +2056,6 @@ Create and fund a new account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2110,11 +2069,14 @@ Create a claimable balance that can be claimed by specified accounts ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--asset ` — Asset to be held in the ClaimableBalanceEntry Default value: `native` @@ -2132,14 +2094,6 @@ Create a claimable balance that can be claimed by specified accounts ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2153,11 +2107,14 @@ Create a passive sell offer on the Stellar DEX ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of selling asset to offer, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) @@ -2170,14 +2127,6 @@ Create a passive sell offer on the Stellar DEX ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2191,11 +2140,14 @@ End sponsoring future reserves ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -2204,14 +2156,6 @@ End sponsoring future reserves ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2225,11 +2169,14 @@ Deposit assets into a liquidity pool ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--liquidity-pool-id ` — Liquidity pool ID to deposit to - `--max-amount-a ` — Maximum amount of the first asset to deposit, in stroops - `--max-amount-b ` — Maximum amount of the second asset to deposit, in stroops @@ -2248,14 +2195,6 @@ Deposit assets into a liquidity pool ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2269,11 +2208,14 @@ Withdraw assets from a liquidity pool ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--liquidity-pool-id ` — Liquidity pool ID to withdraw from - `--amount ` — Amount of pool shares to withdraw, in stroops - `--min-amount-a ` — Minimum amount of the first asset to receive, in stroops @@ -2286,14 +2228,6 @@ Withdraw assets from a liquidity pool ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2307,11 +2241,14 @@ Create, update, or delete a buy offer ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of buying asset to purchase, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops). Use `0` to remove the offer @@ -2327,14 +2264,6 @@ Create, update, or delete a buy offer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2348,11 +2277,14 @@ Set, modify, or delete account data entries ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--data-name ` — String up to 64 bytes long. If this is a new Name it will add the given name/value pair to the account. If this Name is already present then the associated value will be modified - `--data-value ` — Up to 64 bytes long hex string If not present then the existing Name will be deleted. If present then this value will be set in the `DataEntry` @@ -2363,14 +2295,6 @@ Set, modify, or delete account data entries ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2384,11 +2308,14 @@ Create, update, or delete a sell offer ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of selling asset to offer, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops). Use `0` to remove the offer @@ -2404,14 +2331,6 @@ Create, update, or delete a sell offer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2425,11 +2344,14 @@ Send a payment with a different asset using path finding, specifying the send am ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--send-asset ` — Asset to send (pay with) - `--send-amount ` — Amount of send asset to deduct from sender's account, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) - `--destination ` — Account that receives the payment @@ -2444,14 +2366,6 @@ Send a payment with a different asset using path finding, specifying the send am ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2465,11 +2379,14 @@ Send a payment with a different asset using path finding, specifying the receive ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--send-asset ` — Asset to send (pay with) - `--send-max ` — Maximum amount of send asset to deduct from sender's account, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) - `--destination ` — Account that receives the payment @@ -2484,14 +2401,6 @@ Send a payment with a different asset using path finding, specifying the receive ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2505,11 +2414,14 @@ Send asset to destination account ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--destination ` — Account to send to, e.g. `GBX...` - `--asset ` — Asset to send, default native, e.i. XLM @@ -2524,14 +2436,6 @@ Send asset to destination account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2545,11 +2449,14 @@ Revoke sponsorship of a ledger entry or signer ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--account-id ` — Account ID (required for all sponsorship types) - `--asset ` — Asset for trustline sponsorship (format: CODE:ISSUER) - `--data-name ` — Data name for data entry sponsorship @@ -2565,14 +2472,6 @@ Revoke sponsorship of a ledger entry or signer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2586,11 +2485,14 @@ Set account options like flags, signers, and home domain ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--inflation-dest ` — Account of the inflation destination - `--master-weight ` — A number from 0-255 (inclusive) representing the weight of the master key. If the weight of the master key is updated to 0, it is effectively disabled - `--low-threshold ` — A number from 0-255 (inclusive) representing the threshold this account sets on all operations it performs that have a low threshold. https://developers.stellar.org/docs/learn/encyclopedia/security/signatures-multisig#multisig @@ -2615,14 +2517,6 @@ Set account options like flags, signers, and home domain ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2636,11 +2530,14 @@ Configure authorization and trustline flags for an asset ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--trustor ` — Account to set trustline flags for, e.g. `GBX...`, or alias, or muxed account, `M123...`` - `--asset ` — Asset to set trustline flags for - `--set-authorize` — Signifies complete authorization allowing an account to transact freely with the asset to make and receive payments and place orders @@ -2657,14 +2554,6 @@ Configure authorization and trustline flags for an asset ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2726,11 +2615,14 @@ Transfer XLM balance to another account and remove source account ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--account ` — Muxed Account to merge with, e.g. `GBX...`, 'MBX...' ###### **Options (Global):** @@ -2740,14 +2632,6 @@ Transfer XLM balance to another account and remove source account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2766,11 +2650,14 @@ Begin sponsoring future reserves for another account ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--sponsored-id ` — Account that will be sponsored ###### **Options (Global):** @@ -2780,14 +2667,6 @@ Begin sponsoring future reserves for another account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2806,11 +2685,14 @@ Bump sequence number to invalidate older transactions ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--bump-to ` — Sequence number to bump to ###### **Options (Global):** @@ -2820,14 +2702,6 @@ Bump sequence number to invalidate older transactions ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2846,11 +2720,14 @@ Create, update, or delete a trustline ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--line ` - `--limit ` — Limit for the trust line, 0 to remove the trust line @@ -2863,14 +2740,6 @@ Create, update, or delete a trustline ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2889,11 +2758,14 @@ Claim a claimable balance by its balance ID ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--balance-id ` — Balance ID of the claimable balance to claim (64-character hex string) ###### **Options (Global):** @@ -2903,14 +2775,6 @@ Claim a claimable balance by its balance ID ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2929,11 +2793,14 @@ Clawback an asset from an account ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--from ` — Account to clawback assets from, e.g. `GBX...` - `--asset ` — Asset to clawback - `--amount ` — Amount of the asset to clawback, in stroops. 1 stroop = 0.0000001 of the asset @@ -2945,14 +2812,6 @@ Clawback an asset from an account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -2971,11 +2830,14 @@ Clawback a claimable balance by its balance ID ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--balance-id ` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA ###### **Options (Global):** @@ -2985,14 +2847,6 @@ Clawback a claimable balance by its balance ID ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3011,11 +2865,14 @@ Create and fund a new account ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--destination ` — Account Id to create, e.g. `GBX...` - `--starting-balance ` — Initial balance in stroops of the account, default 1 XLM @@ -3028,14 +2885,6 @@ Create and fund a new account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3054,11 +2903,14 @@ Create a claimable balance that can be claimed by specified accounts ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--asset ` — Asset to be held in the ClaimableBalanceEntry Default value: `native` @@ -3076,14 +2928,6 @@ Create a claimable balance that can be claimed by specified accounts ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3102,11 +2946,14 @@ Create a passive sell offer on the Stellar DEX ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of selling asset to offer, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) @@ -3119,14 +2966,6 @@ Create a passive sell offer on the Stellar DEX ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3145,11 +2984,14 @@ End sponsoring future reserves ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout ###### **Options (Global):** @@ -3158,14 +3000,6 @@ End sponsoring future reserves ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3184,11 +3018,14 @@ Deposit assets into a liquidity pool ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--liquidity-pool-id ` — Liquidity pool ID to deposit to - `--max-amount-a ` — Maximum amount of the first asset to deposit, in stroops - `--max-amount-b ` — Maximum amount of the second asset to deposit, in stroops @@ -3207,14 +3044,6 @@ Deposit assets into a liquidity pool ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3233,11 +3062,14 @@ Withdraw assets from a liquidity pool ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--liquidity-pool-id ` — Liquidity pool ID to withdraw from - `--amount ` — Amount of pool shares to withdraw, in stroops - `--min-amount-a ` — Minimum amount of the first asset to receive, in stroops @@ -3250,14 +3082,6 @@ Withdraw assets from a liquidity pool ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3276,11 +3100,14 @@ Create, update, or delete a buy offer ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of buying asset to purchase, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops). Use `0` to remove the offer @@ -3296,14 +3123,6 @@ Create, update, or delete a buy offer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3322,11 +3141,14 @@ Set, modify, or delete account data entries ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--data-name ` — String up to 64 bytes long. If this is a new Name it will add the given name/value pair to the account. If this Name is already present then the associated value will be modified - `--data-value ` — Up to 64 bytes long hex string If not present then the existing Name will be deleted. If present then this value will be set in the `DataEntry` @@ -3337,14 +3159,6 @@ Set, modify, or delete account data entries ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3363,11 +3177,14 @@ Create, update, or delete a sell offer ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--selling ` — Asset to sell - `--buying ` — Asset to buy - `--amount ` — Amount of selling asset to offer, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops). Use `0` to remove the offer @@ -3383,14 +3200,6 @@ Create, update, or delete a sell offer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3409,11 +3218,14 @@ Send a payment with a different asset using path finding, specifying the receive ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--send-asset ` — Asset to send (pay with) - `--send-max ` — Maximum amount of send asset to deduct from sender's account, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) - `--destination ` — Account that receives the payment @@ -3428,14 +3240,6 @@ Send a payment with a different asset using path finding, specifying the receive ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3454,11 +3258,14 @@ Send a payment with a different asset using path finding, specifying the send am ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--send-asset ` — Asset to send (pay with) - `--send-amount ` — Amount of send asset to deduct from sender's account, in stroops. 1 stroop = 0.0000001 of the asset (e.g. 1 XLM = `10_000_000` stroops) - `--destination ` — Account that receives the payment @@ -3473,14 +3280,6 @@ Send a payment with a different asset using path finding, specifying the send am ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3499,11 +3298,14 @@ Send asset to destination account ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--destination ` — Account to send to, e.g. `GBX...` - `--asset ` — Asset to send, default native, e.i. XLM @@ -3518,14 +3320,6 @@ Send asset to destination account ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3544,11 +3338,14 @@ Revoke sponsorship of a ledger entry or signer ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--account-id ` — Account ID (required for all sponsorship types) - `--asset ` — Asset for trustline sponsorship (format: CODE:ISSUER) - `--data-name ` — Data name for data entry sponsorship @@ -3564,14 +3361,6 @@ Revoke sponsorship of a ledger entry or signer ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3590,11 +3379,14 @@ Set account options like flags, signers, and home domain ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--inflation-dest ` — Account of the inflation destination - `--master-weight ` — A number from 0-255 (inclusive) representing the weight of the master key. If the weight of the master key is updated to 0, it is effectively disabled - `--low-threshold ` — A number from 0-255 (inclusive) representing the threshold this account sets on all operations it performs that have a low threshold. https://developers.stellar.org/docs/learn/encyclopedia/security/signatures-multisig#multisig @@ -3619,14 +3411,6 @@ Set account options like flags, signers, and home domain ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3645,11 +3429,14 @@ Configure authorization and trustline flags for an asset ###### **Options:** - `--operation-source-account ` [alias: `op-source`] — Source account used for the operation -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided +- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--trustor ` — Account to set trustline flags for, e.g. `GBX...`, or alias, or muxed account, `M123...`` - `--asset ` — Asset to set trustline flags for - `--set-authorize` — Signifies complete authorization allowing an account to transact freely with the asset to make and receive payments and place orders @@ -3666,14 +3453,6 @@ Configure authorization and trustline flags for an asset ###### **Options (RPC):** -- `--fee ` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - - Default value: `100` - -- `--cost` — Output the cost execution to stderr -- `--instructions ` — Number of instructions to simulate -- `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation -- `--build-only` — Build the transaction and only write the base64 xdr to stdout - `--rpc-url ` — RPC server endpoint - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server @@ -3742,11 +3521,13 @@ Simulate a transaction envelope from stdin ###### **Options:** -- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail +- `-s`, `--source-account ` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` was NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail - `--sign-with-key ` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path - `--hd-path ` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0` - `--sign-with-lab` — Sign with https://lab.stellar.org - `--sign-with-ledger` — Sign with a ledger wallet +- `--fee ` — ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm +- `--inclusion-fee ` — Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided - `--instruction-leeway ` — Allow this many extra instructions when budgeting resources during transaction simulation ###### **Options (Global):** @@ -4703,7 +4484,7 @@ Get the latest ledger sequence and information from the network ## `stellar fee-stats` -Fetch network feestats +⚠️ Deprecated, use `fees stats` instead. Fetch network feestats **Usage:** `stellar fee-stats [OPTIONS]` @@ -4724,3 +4505,75 @@ Fetch network feestats - `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times - `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server - `-n`, `--network ` — Name of network to use from config + +## `stellar fees` + +Fetch network feestats and configure CLI fee settings + +**Usage:** `stellar fees ` + +###### **Subcommands:** + +- `stats` — Fetch the feestats from the network +- `use` — Set the default inclusion fee settings for the CLI +- `unset` — Remove the default inclusion fee settings for the CLI + +## `stellar fees stats` + +Fetch the feestats from the network + +**Usage:** `stellar fees stats [OPTIONS]` + +###### **Options:** + +- `--output ` — Format of the output + + Default value: `text` + + Possible values: + - `text`: Text output of network info + - `json`: JSON result of the RPC request + - `json-formatted`: Formatted (multiline) JSON output of the RPC request + +###### **Options (RPC):** + +- `--rpc-url ` — RPC server endpoint +- `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times +- `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server +- `-n`, `--network ` — Name of network to use from config + +## `stellar fees use` + +Set the default inclusion fee settings for the CLI + +**Usage:** `stellar fees use [OPTIONS] <--amount |--fee-metric >` + +###### **Options:** + +- `--amount ` — Set the default inclusion fee amount, in stroops. 1 stroop = 0.0000001 xlm +- `--fee-metric ` — Set the default inclusion fee based on a metric from the network's fee stats + + Possible values: `max`, `min`, `mode`, `p10`, `p20`, `p30`, `p40`, `p50`, `p60`, `p70`, `p80`, `p90`, `p95`, `p99` + +###### **Options (Global):** + +- `--global` — ⚠️ Deprecated: global config is always on +- `--config-dir ` — Location of config directory. By default, it uses `$XDG_CONFIG_HOME/stellar` if set, falling back to `~/.config/stellar` otherwise. Contains configuration files, aliases, and other persistent settings + +###### **Options (RPC):** + +- `--rpc-url ` — RPC server endpoint +- `--rpc-header ` — RPC Header(s) to include in requests to the RPC provider, example: "X-API-Key: abc123". Multiple headers can be added by passing the option multiple times +- `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server +- `-n`, `--network ` — Name of network to use from config + +## `stellar fees unset` + +Remove the default inclusion fee settings for the CLI + +**Usage:** `stellar fees unset [OPTIONS]` + +###### **Options (Global):** + +- `--global` — ⚠️ Deprecated: global config is always on +- `--config-dir ` — Location of config directory. By default, it uses `$XDG_CONFIG_HOME/stellar` if set, falling back to `~/.config/stellar` otherwise. Contains configuration files, aliases, and other persistent settings diff --git a/cmd/crates/soroban-test/src/lib.rs b/cmd/crates/soroban-test/src/lib.rs index 2e10afc2da..78e16a14a6 100644 --- a/cmd/crates/soroban-test/src/lib.rs +++ b/cmd/crates/soroban-test/src/lib.rs @@ -281,6 +281,8 @@ impl TestEnv { sign_with_lab: false, sign_with_ledger: false, }, + fee: None, + inclusion_fee: None, } } diff --git a/cmd/crates/soroban-test/tests/it/config.rs b/cmd/crates/soroban-test/tests/it/config.rs index 97d30daa1b..67b1663f54 100644 --- a/cmd/crates/soroban-test/tests/it/config.rs +++ b/cmd/crates/soroban-test/tests/it/config.rs @@ -251,6 +251,47 @@ fn set_default_identity() { .success(); } +#[test] +fn warns_if_default_identity_will_be_ignored() { + let sandbox = TestEnv::default(); + + sandbox + .new_assert_cmd("keys") + .env( + "SOROBAN_SECRET_KEY", + "SC4ZPYELVR7S7EE7KZDZN3ETFTNQHHLTUL34NUAAWZG5OK2RGJ4V2U3Z", + ) + .arg("add") + .arg("alice") + .assert() + .success(); + + sandbox + .new_assert_cmd("keys") + .env( + "SOROBAN_SECRET_KEY", + "SDIY6AQQ75WMD4W46EYB7O6UYMHOCGQHLAQGQTKHDX4J2DYQCHVCQYFD", + ) + .arg("add") + .arg("bob") + .assert() + .success(); + + sandbox + .new_assert_cmd("keys") + .env("STELLAR_ACCOUNT", "bob") + .arg("use") + .arg("alice") + .assert() + .stderr(predicate::str::contains( + "Environment variable STELLAR_ACCOUNT is set, which will override this default source account.", + )) + .success(); + + let config_contents = fs::read_to_string(sandbox.config_dir().join("config.toml")).unwrap(); + assert!(config_contents.contains("identity = \"alice\"")); +} + #[test] fn set_default_network() { let sandbox = TestEnv::default(); @@ -272,6 +313,78 @@ fn set_default_network() { .success(); } +#[test] +fn warns_if_default_network_will_be_ignored() { + let sandbox = TestEnv::default(); + + sandbox + .new_assert_cmd("network") + .env("STELLAR_NETWORK", "custom_network") + .arg("use") + .arg("testnet") + .assert() + .stderr(predicate::str::contains( + "Environment variable STELLAR_NETWORK is set, which will override this default network.", + )) + .success(); + + let config_contents = fs::read_to_string(sandbox.config_dir().join("config.toml")).unwrap(); + assert!(config_contents.contains("network = \"testnet\"")); +} + +#[test] +fn set_default_inclusion_fee() { + let sandbox = TestEnv::default(); + + sandbox + .new_assert_cmd("fees") + .arg("use") + .args(["--amount", "150"]) + .assert() + .stderr(predicate::str::contains( + "The default inclusion fee is set to `150`", + )) + .success(); + + let config_contents = fs::read_to_string(sandbox.config_dir().join("config.toml")).unwrap(); + assert!(config_contents.contains("inclusion_fee = 150")); +} + +#[test] +fn warns_if_default_inclusion_fee_will_be_ignored() { + let sandbox = TestEnv::default(); + + sandbox + .new_assert_cmd("fees") + .env("STELLAR_INCLUSION_FEE", "200") + .arg("use") + .args(["--amount", "150"]) + .assert() + .stderr(predicate::str::contains( + "Environment variable STELLAR_INCLUSION_FEE is set, which will override this default inclusion fee.", + )) + .success(); + + let config_contents = fs::read_to_string(sandbox.config_dir().join("config.toml")).unwrap(); + assert!(config_contents.contains("inclusion_fee = 150")); +} + +#[test] +fn cannot_set_default_inclusion_fee_below_100() { + let sandbox = TestEnv::default(); + + sandbox + .new_assert_cmd("fees") + .arg("use") + .args(["--amount", "99"]) + .assert() + .stderr(predicate::str::contains( + "Fee amount must be at least 100 stroops, but got 99", + )) + .failure(); + assert!(fs::read_to_string(sandbox.config_dir().join("config.toml")).is_err()); +} + #[test] fn cannot_create_contract_with_test_name() { let sandbox = TestEnv::default(); diff --git a/cmd/crates/soroban-test/tests/it/integration.rs b/cmd/crates/soroban-test/tests/it/integration.rs index 8794046843..386eca2665 100644 --- a/cmd/crates/soroban-test/tests/it/integration.rs +++ b/cmd/crates/soroban-test/tests/it/integration.rs @@ -4,6 +4,7 @@ mod contract; mod cookbook; mod custom_types; mod dotenv; +mod fee_args; mod fee_stats; mod hello_world; mod init; diff --git a/cmd/crates/soroban-test/tests/it/integration/fee_args.rs b/cmd/crates/soroban-test/tests/it/integration/fee_args.rs new file mode 100644 index 0000000000..76d249b1d0 --- /dev/null +++ b/cmd/crates/soroban-test/tests/it/integration/fee_args.rs @@ -0,0 +1,140 @@ +use predicates::prelude::predicate; +use soroban_cli::xdr::{self, Limits, ReadXdr}; +use soroban_test::{AssertExt, TestEnv}; + +use super::util::deploy_hello; + +fn get_inclusion_fee_from_xdr(tx_xdr: &str) -> u32 { + let tx = xdr::TransactionEnvelope::from_xdr_base64(tx_xdr, Limits::none()).unwrap(); + match tx { + xdr::TransactionEnvelope::TxV0(te) => te.tx.fee, + xdr::TransactionEnvelope::Tx(te) => te.tx.fee, + xdr::TransactionEnvelope::TxFeeBump(te) => te.tx.fee.try_into().unwrap(), + } +} + +#[tokio::test] +async fn inclusion_fee_arg() { + let sandbox = &TestEnv::new(); + let id = deploy_hello(sandbox).await; + + // Defaults to 100 + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 100u32); + + // Update manually to 200 + sandbox + .new_assert_cmd("fees") + .arg("use") + .args(["--amount", "200"]) + .assert() + .stderr(predicate::str::contains( + "The default inclusion fee is set to `200`", + )) + .success(); + + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 200u32); + + // Arg overrides config + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .args(["--inclusion-fee", "300"]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 300u32); + + // Update from fee stats (going to be 100 since sandbox) + sandbox + .new_assert_cmd("fees") + .arg("use") + .args(["--fee-metric", "p50"]) + .assert() + .stderr(predicate::str::contains( + "The default inclusion fee is set to `100`", + )) + .success(); + + // Deprecated fee arg ignored if inclusion-fee config exists + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .args(["--fee", "300"]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 100u32); + + // Update manually to 200 + sandbox + .new_assert_cmd("fees") + .arg("use") + .args(["--amount", "200"]) + .assert() + .stderr(predicate::str::contains( + "The default inclusion fee is set to `200`", + )) + .success(); + + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 200u32); + + // Verify unset clears the config + sandbox + .new_assert_cmd("fees") + .arg("unset") + .assert() + .stderr(predicate::str::contains( + "The default inclusion fee has been cleared", + )) + .success(); + + let tx_xdr = sandbox + .new_assert_cmd("contract") + .arg("invoke") + .args(["--id", &id.to_string()]) + .arg("--build-only") + .arg("--") + .arg("inc") + .assert() + .success() + .stdout_as_str(); + assert_eq!(get_inclusion_fee_from_xdr(&tx_xdr), 100u32); +} diff --git a/cmd/crates/soroban-test/tests/it/integration/fee_stats.rs b/cmd/crates/soroban-test/tests/it/integration/fee_stats.rs index 1ff527ffa7..61d606703b 100644 --- a/cmd/crates/soroban-test/tests/it/integration/fee_stats.rs +++ b/cmd/crates/soroban-test/tests/it/integration/fee_stats.rs @@ -5,7 +5,8 @@ use soroban_test::{AssertExt, TestEnv}; async fn fee_stats_text_output() { let sandbox = &TestEnv::new(); sandbox - .new_assert_cmd("fee-stats") + .new_assert_cmd("fees") + .arg("stats") .arg("--output") .arg("text") .assert() @@ -19,7 +20,8 @@ async fn fee_stats_text_output() { async fn fee_stats_json_output() { let sandbox = &TestEnv::new(); let output = sandbox - .new_assert_cmd("fee-stats") + .new_assert_cmd("fees") + .arg("stats") .arg("--output") .arg("json") .assert() diff --git a/cmd/crates/soroban-test/tests/it/integration/tx/general.rs b/cmd/crates/soroban-test/tests/it/integration/tx/general.rs index 10d251a86d..3e73d2286f 100644 --- a/cmd/crates/soroban-test/tests/it/integration/tx/general.rs +++ b/cmd/crates/soroban-test/tests/it/integration/tx/general.rs @@ -30,7 +30,7 @@ async fn simulate() { .assert() .success() .stdout_as_str(); - let assembled = simulate_and_assemble_transaction(&sandbox.client(), &tx, None) + let assembled = simulate_and_assemble_transaction(&sandbox.client(), &tx, None, None) .await .unwrap(); let txn_env: TransactionEnvelope = assembled.transaction().clone().into(); diff --git a/cmd/soroban-cli/src/assembled.rs b/cmd/soroban-cli/src/assembled.rs index b5a5cb5219..06d4e48ff3 100644 --- a/cmd/soroban-cli/src/assembled.rs +++ b/cmd/soroban-cli/src/assembled.rs @@ -17,6 +17,7 @@ pub async fn simulate_and_assemble_transaction( client: &soroban_rpc::Client, tx: &Transaction, resource_config: Option, + resource_fee: Option, ) -> Result { let envelope = TransactionEnvelope::Tx(TransactionV1Envelope { tx: tx.clone(), @@ -37,7 +38,7 @@ pub async fn simulate_and_assemble_transaction( crate::log::event::all(&sim_res.events()?); Err(Error::TransactionSimulationFailed(e.clone())) } else { - Ok(Assembled::new(tx, sim_res)?) + Ok(Assembled::new(tx, sim_res, resource_fee)?) } } @@ -54,13 +55,18 @@ impl Assembled { /// # Arguments /// /// * `txn` - The original transaction. - /// * `client` - The client used for simulation and submission. + /// * `sim_res` - The simulation response. + /// * `resource_fee` - Optional resource fee for the transaction. Will override the simulated resource fee if provided. /// /// # Errors /// /// Returns an error if simulation fails or if assembling the transaction fails. - pub fn new(txn: &Transaction, sim_res: SimulateTransactionResponse) -> Result { - let txn = assemble(txn, &sim_res)?; + pub fn new( + txn: &Transaction, + sim_res: SimulateTransactionResponse, + resource_fee: Option, + ) -> Result { + let txn = assemble(txn, &sim_res, resource_fee)?; Ok(Self { txn, sim_res }) } @@ -173,6 +179,7 @@ impl Assembled { read_write.is_empty() } + // TODO: Remove once `--instructions` is fully removed #[must_use] pub fn set_max_instructions(mut self, instructions: u32) -> Self { if let TransactionExt::V1(SorobanTransactionData { @@ -198,6 +205,7 @@ impl Assembled { fn assemble( raw: &Transaction, simulation: &SimulateTransactionResponse, + resource_fee: Option, ) -> Result { let mut tx = raw.clone(); @@ -211,6 +219,15 @@ fn assemble( }); } + let min_resource_fee = if let Some(rf) = resource_fee { + tracing::trace!( + "setting resource fee to {rf} from {}", + simulation.min_resource_fee + ); + rf + } else { + simulation.min_resource_fee + }; let transaction_data = simulation.transaction_data()?; let mut op = tx.operations[0].clone(); @@ -241,12 +258,11 @@ fn assemble( } // Update transaction fees to meet the minimum resource fees. - let classic_tx_fee: u64 = DEFAULT_TRANSACTION_FEES.into(); - // Choose larger of existing fee or inclusion + resource fee. + let min_tx_fee: u64 = DEFAULT_TRANSACTION_FEES.into(); tx.fee = tx.fee.max( - u32::try_from(classic_tx_fee + simulation.min_resource_fee) - .map_err(|_| Error::LargeFee(simulation.min_resource_fee + classic_tx_fee))?, + u32::try_from(min_tx_fee + min_resource_fee) + .map_err(|_| Error::LargeFee(min_tx_fee + min_resource_fee))?, ); tx.operations = vec![op].try_into()?; @@ -391,7 +407,7 @@ mod tests { fn test_assemble_transaction_updates_tx_data_from_simulation_response() { let sim = simulation_response(); let txn = single_contract_fn_transaction(); - let Ok(result) = assemble(&txn, &sim) else { + let Ok(result) = assemble(&txn, &sim, None) else { panic!("assemble failed"); }; @@ -407,7 +423,7 @@ mod tests { fn test_assemble_transaction_adds_the_auth_to_the_host_function() { let sim = simulation_response(); let txn = single_contract_fn_transaction(); - let Ok(result) = assemble(&txn, &sim) else { + let Ok(result) = assemble(&txn, &sim, None) else { panic!("assemble failed"); }; @@ -471,6 +487,7 @@ mod tests { latest_ledger: 3, ..Default::default() }, + None, ); match result { @@ -491,6 +508,7 @@ mod tests { latest_ledger: 3, ..Default::default() }, + None, ); match result { @@ -520,7 +538,7 @@ mod tests { // 1: wiggle room math overflows but result fits response.min_resource_fee = (u32::MAX - 100).into(); - match assemble(&txn, &response) { + match assemble(&txn, &response, None) { Ok(asstxn) => { let expected = u32::MAX; assert_eq!(asstxn.fee, expected); @@ -531,7 +549,63 @@ mod tests { // 2: combo overflows, should throw response.min_resource_fee = (u32::MAX - 99).into(); - match assemble(&txn, &response) { + match assemble(&txn, &response, None) { + Err(Error::LargeFee(fee)) => { + let expected = u64::from(u32::MAX) + 1; + assert_eq!(expected, fee, "expected {expected} != {fee} actual"); + } + r => panic!("expected LargeFee error, got: {r:#?}"), + } + } + + #[test] + fn test_assemble_transaction_with_resource_fee() { + let sim = simulation_response(); + let txn = single_contract_fn_transaction(); + let resource_fee = 12345u64; + let Ok(result) = assemble(&txn, &sim, Some(resource_fee)) else { + panic!("assemble failed"); + }; + + // validate it auto updated the tx fees from sim response fees + // since it was greater than tx.fee + assert_eq!(12345 + 100, result.fee); + + // validate it updated sorobantransactiondata block in the tx ext + assert_eq!(TransactionExt::V1(transaction_data()), result.ext); + } + + #[test] + fn test_assemble_transaction_with_resource_fee_overflow_behavior() { + // + // Test two separate cases: + // + // 1. Given a near-max (u32::MAX - 100) resource fee make sure the tx + // fee does not overflow after adding the base inclusion fee (100). + // 2. Given a large resource fee that WILL exceed u32::MAX with the + // base inclusion fee, ensure the overflow is caught with an error + // rather than silently ignored. + let txn = single_contract_fn_transaction(); + let response = simulation_response(); + + // sanity check so these can be adjusted if the above helper changes + assert_eq!(txn.fee, 100, "modified txn.fee: update the math below"); + + // 1: wiggle room math overflows but result fits + let resource_fee: u64 = (u32::MAX - 100).into(); + + match assemble(&txn, &response, Some(resource_fee)) { + Ok(asstxn) => { + let expected = u32::MAX; + assert_eq!(asstxn.fee, expected); + } + r => panic!("expected success, got: {r:#?}"), + } + + // 2: combo overflows, should throw + let resource_fee: u64 = (u32::MAX - 99).into(); + + match assemble(&txn, &response, Some(resource_fee)) { Err(Error::LargeFee(fee)) => { let expected = u64::from(u32::MAX) + 1; assert_eq!(expected, fee, "expected {expected} != {fee} actual"); diff --git a/cmd/soroban-cli/src/cli.rs b/cmd/soroban-cli/src/cli.rs index 2a3b6f9a88..db8ea7630b 100644 --- a/cmd/soroban-cli/src/cli.rs +++ b/cmd/soroban-cli/src/cli.rs @@ -106,13 +106,14 @@ fn set_env_from_config() { if let Ok(config) = Config::new() { set_env_value_from_config("STELLAR_ACCOUNT", config.defaults.identity); set_env_value_from_config("STELLAR_NETWORK", config.defaults.network); + set_env_value_from_config("STELLAR_INCLUSION_FEE", config.defaults.inclusion_fee); } } // Set an env var from a config file if the env var is not already set. // Additionally, a `$NAME_SOURCE` variant will be set, which allows // `stellar env` to properly identity the source. -fn set_env_value_from_config(name: &str, value: Option) { +fn set_env_value_from_config(name: &str, value: Option) { let Some(value) = value else { return; }; @@ -120,7 +121,7 @@ fn set_env_value_from_config(name: &str, value: Option) { std::env::remove_var(format!("{name}_SOURCE")); if std::env::var(name).is_err() { - std::env::set_var(name, value); + std::env::set_var(name, value.to_string()); std::env::set_var(format!("{name}_SOURCE"), "use"); } } diff --git a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs index d6bbc4451e..4ac2427f47 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/asset.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/asset.rs @@ -82,13 +82,17 @@ pub struct Cmd { pub config: config::Args, #[command(flatten)] - pub fee: crate::fee::Args, + pub resources: crate::resources::Args, /// The alias that will be used to save the assets's id. /// Whenever used, `--alias` will always overwrite the existing contract id /// configuration without asking for confirmation. #[arg(long, value_parser = clap::builder::ValueParser::new(alias_validator))] pub alias: Option, + + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } impl Cmd { @@ -162,25 +166,29 @@ impl NetworkRunnable for Cmd { asset, &contract_id, sequence + 1, - self.fee.fee, + config.get_inclusion_fee()?, network_passphrase, source_account, )?; - if self.fee.build_only { + if self.build_only { return Ok(TxnResult::Txn(Box::new(tx))); } - let assembled = - simulate_and_assemble_transaction(&client, &tx, self.fee.resource_config()).await?; - let assembled = self.fee.apply_to_assembled_txn(assembled); - + let assembled = simulate_and_assemble_transaction( + &client, + &tx, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?; + let assembled = self.resources.apply_to_assembled_txn(assembled); let txn = assembled.transaction().clone(); let get_txn_resp = client .send_transaction_polling(&self.config.sign(txn, args.is_some_and(|g| g.quiet)).await?) .await?; - self.fee.print_cost_info(&get_txn_resp)?; + self.resources.print_cost_info(&get_txn_resp)?; if args.is_none_or(|a| !a.no_cache) { data::write(get_txn_resp.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs index 98282af2c2..4af8c74579 100644 --- a/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs +++ b/cmd/soroban-cli/src/commands/contract/deploy/wasm.rs @@ -1,4 +1,5 @@ use crate::commands::contract::deploy::utils::alias_validator; +use crate::resources; use std::array::TryFromSliceError; use std::ffi::OsString; use std::fmt::Debug; @@ -21,7 +22,7 @@ use crate::{ contract::{self, arg_parsing, id::wasm::get_contract_id, upload}, global, txn_result::{TxnEnvelopeResult, TxnResult}, - NetworkRunnable, HEADING_RPC, + NetworkRunnable, }, config::{self, data, locator, network}, print::Print, @@ -48,15 +49,10 @@ pub struct Cmd { #[arg(long = "wasm-hash", conflicts_with = "wasm", group = "wasm_src")] pub wasm_hash: Option, /// Custom salt 32-byte salt for the token id - #[arg( - long, - help_heading = HEADING_RPC, - )] + #[arg(long)] pub salt: Option, #[command(flatten)] pub config: config::Args, - #[command(flatten)] - pub fee: crate::fee::Args, #[arg(long, short = 'i', default_value = "false")] /// Whether to ignore safety checks when deploying contracts pub ignore_checks: bool, @@ -65,6 +61,11 @@ pub struct Cmd { /// configuration without asking for confirmation. #[arg(long, value_parser = clap::builder::ValueParser::new(alias_validator))] pub alias: Option, + #[command(flatten)] + pub resources: resources::Args, + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, /// If provided, will be passed to the contract's `__constructor` function with provided arguments for that function as `--arg-name value` #[arg(last = true, id = "CONTRACT_CONSTRUCTOR_ARGS")] pub slop: Vec, @@ -201,15 +202,16 @@ impl NetworkRunnable for Cmd { let print = Print::new(quiet); let config = config.unwrap_or(&self.config); let wasm_hash = if let Some(wasm) = &self.wasm { - let is_build = self.fee.build_only; + let is_build = self.build_only; let hash = if is_build { wasm::Args { wasm: wasm.clone() }.hash()? } else { upload::Cmd { wasm: wasm::Args { wasm: wasm.clone() }, config: config.clone(), - fee: self.fee.clone(), + resources: self.resources.clone(), ignore_checks: self.ignore_checks, + build_only: is_build, } .run_against_rpc_server(global_args, Some(config)) .await? @@ -258,7 +260,7 @@ impl NetworkRunnable for Cmd { let raw_wasm = if let Some(wasm) = self.wasm.as_ref() { wasm::Args { wasm: wasm.clone() }.read()? } else { - if self.fee.build_only { + if self.build_only { return Err(Error::WasmNotProvided); } get_remote_wasm_from_hash(&client, &wasm_hash).await? @@ -297,23 +299,27 @@ impl NetworkRunnable for Cmd { let txn = Box::new(build_create_contract_tx( wasm_hash, sequence + 1, - self.fee.fee, + config.get_inclusion_fee()?, source_account, contract_id_preimage, constructor_params.as_ref(), )?); - if self.fee.build_only { + if self.build_only { print.checkln("Transaction built!"); return Ok(TxnResult::Txn(txn)); } print.infoln("Simulating deploy transaction…"); - let assembled = - simulate_and_assemble_transaction(&client, &txn, self.fee.resource_config()).await?; - let assembled = self.fee.apply_to_assembled_txn(assembled); - + let assembled = simulate_and_assemble_transaction( + &client, + &txn, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?; + let assembled = self.resources.apply_to_assembled_txn(assembled); let txn = Box::new(assembled.transaction().clone()); print.log_transaction(&txn, &network, true)?; @@ -322,7 +328,7 @@ impl NetworkRunnable for Cmd { let get_txn_resp = client.send_transaction_polling(signed_txn).await?; - self.fee.print_cost_info(&get_txn_resp)?; + self.resources.print_cost_info(&get_txn_resp)?; if global_args.is_none_or(|a| !a.no_cache) { data::write(get_txn_resp.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/contract/extend.rs b/cmd/soroban-cli/src/commands/contract/extend.rs index c19d048d8c..37d22ed4a0 100644 --- a/cmd/soroban-cli/src/commands/contract/extend.rs +++ b/cmd/soroban-cli/src/commands/contract/extend.rs @@ -3,6 +3,7 @@ use std::{fmt::Debug, num::TryFromIntError, path::Path, str::FromStr}; use crate::{ log::extract_events, print::Print, + resources, xdr::{ ConfigSettingEntry, ConfigSettingId, Error as XdrError, ExtendFootprintTtlOp, ExtensionPoint, LedgerEntry, LedgerEntryChange, LedgerEntryData, LedgerFootprint, @@ -44,7 +45,11 @@ pub struct Cmd { pub config: config::Args, #[command(flatten)] - pub fee: crate::fee::Args, + pub resources: resources::Args, + + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } impl FromStr for Cmd { @@ -210,7 +215,7 @@ impl NetworkRunnable for Cmd { let tx = Box::new(Transaction { source_account, - fee: self.fee.fee, + fee: config.get_inclusion_fee()?, seq_num: SequenceNumber(sequence + 1), cond: Preconditions::None, memo: Memo::None, @@ -229,24 +234,29 @@ impl NetworkRunnable for Cmd { read_only: keys.clone().try_into()?, read_write: vec![].try_into()?, }, - instructions: self.fee.instructions.unwrap_or_default(), + instructions: self.resources.instructions.unwrap_or_default(), disk_read_bytes: 0, write_bytes: 0, }, resource_fee: 0, }), }); - if self.fee.build_only { + if self.build_only { return Ok(TxnResult::Txn(tx)); } - let assembled = - simulate_and_assemble_transaction(&client, &tx, self.fee.resource_config()).await?; + let assembled = simulate_and_assemble_transaction( + &client, + &tx, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?; let tx = assembled.transaction().clone(); let res = client .send_transaction_polling(&config.sign(tx, quiet).await?) .await?; - self.fee.print_cost_info(&res)?; + self.resources.print_cost_info(&res)?; if args.is_none_or(|a| !a.no_cache) { data::write(res.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/contract/invoke.rs b/cmd/soroban-cli/src/commands/contract/invoke.rs index c8bd977c35..2ad502b7da 100644 --- a/cmd/soroban-cli/src/commands/contract/invoke.rs +++ b/cmd/soroban-cli/src/commands/contract/invoke.rs @@ -63,11 +63,15 @@ pub struct Cmd { pub config: config::Args, #[command(flatten)] - pub fee: crate::fee::Args, + pub resources: crate::resources::Args, /// Whether or not to send a transaction #[arg(long, value_enum, default_value_t, env = "STELLAR_SEND")] pub send: Send, + + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } impl FromStr for Cmd { @@ -221,7 +225,8 @@ impl Cmd { }) } - // uses a default account to check if the tx should be sent after the simulation + /// Uses a default account to check if the tx should be sent after the simulation. The transaction + /// should be recreated with the real source account later. async fn simulate( &self, host_function_params: &InvokeContractArgs, @@ -232,13 +237,15 @@ impl Cmd { let AccountId(PublicKey::PublicKeyTypeEd25519(account_id)) = account_details.account_id.clone(); - let tx = build_invoke_contract_tx( - host_function_params.clone(), - sequence + 1, - self.fee.fee, - account_id, - )?; - Ok(simulate_and_assemble_transaction(rpc_client, &tx, self.fee.resource_config()).await?) + let tx = + build_invoke_contract_tx(host_function_params.clone(), sequence + 1, 100, account_id)?; + Ok(simulate_and_assemble_transaction( + rpc_client, + &tx, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?) } } @@ -287,9 +294,9 @@ impl NetworkRunnable for Cmd { let (function, spec, host_function_params, signers) = params; - // `self.fee.build_only` will be checked again below and the fn will return a TxnResult::Txn + // `self.build_only` will be checked again below and the fn will return a TxnResult::Txn // if the user passed the --build-only flag - let (should_send, cached_simulation) = if self.fee.build_only { + let (should_send, cached_simulation) = if self.build_only { (ShouldSend::Yes, None) } else { let assembled = self @@ -333,17 +340,22 @@ impl NetworkRunnable for Cmd { let tx = Box::new(build_invoke_contract_tx( host_function_params.clone(), sequence + 1, - self.fee.fee, + config.get_inclusion_fee()?, account_id, )?); - if self.fee.build_only { + if self.build_only { return Ok(TxnResult::Txn(tx)); } - let txn = - simulate_and_assemble_transaction(&client, &tx, self.fee.resource_config()).await?; - let assembled = self.fee.apply_to_assembled_txn(txn); + let txn = simulate_and_assemble_transaction( + &client, + &tx, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?; + let assembled = self.resources.apply_to_assembled_txn(txn); let mut txn = Box::new(assembled.transaction().clone()); let sim_res = assembled.sim_response(); @@ -362,7 +374,7 @@ impl NetworkRunnable for Cmd { .send_transaction_polling(&config.sign(*txn, quiet).await?) .await?; - self.fee.print_cost_info(&res)?; + self.resources.print_cost_info(&res)?; if !no_cache { data::write(res.clone().try_into()?, &network.rpc_uri()?)?; diff --git a/cmd/soroban-cli/src/commands/contract/restore.rs b/cmd/soroban-cli/src/commands/contract/restore.rs index 37845e6064..bf2e0fb147 100644 --- a/cmd/soroban-cli/src/commands/contract/restore.rs +++ b/cmd/soroban-cli/src/commands/contract/restore.rs @@ -44,7 +44,11 @@ pub struct Cmd { pub config: config::Args, #[command(flatten)] - pub fee: crate::fee::Args, + pub resources: crate::resources::Args, + + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } impl FromStr for Cmd { @@ -138,8 +142,9 @@ impl Cmd { key: self.key.clone(), ledgers_to_extend, config: self.config.clone(), - fee: self.fee.clone(), + resources: self.resources.clone(), ttl_ledger_only: false, + build_only: self.build_only, } .run(global_args) .await?; @@ -178,7 +183,7 @@ impl NetworkRunnable for Cmd { let tx = Box::new(Transaction { source_account, - fee: self.fee.fee, + fee: config.get_inclusion_fee()?, seq_num: SequenceNumber(sequence + 1), cond: Preconditions::None, memo: Memo::None, @@ -196,24 +201,29 @@ impl NetworkRunnable for Cmd { read_only: vec![].try_into()?, read_write: entry_keys.clone().try_into()?, }, - instructions: self.fee.instructions.unwrap_or_default(), + instructions: self.resources.instructions.unwrap_or_default(), disk_read_bytes: 0, write_bytes: 0, }, resource_fee: 0, }), }); - if self.fee.build_only { + if self.build_only { return Ok(TxnResult::Txn(tx)); } - let assembled = - simulate_and_assemble_transaction(&client, &tx, self.fee.resource_config()).await?; + let assembled = simulate_and_assemble_transaction( + &client, + &tx, + self.resources.resource_config(), + self.resources.resource_fee, + ) + .await?; let tx = assembled.transaction().clone(); let res = client .send_transaction_polling(&config.sign(tx, quiet).await?) .await?; - self.fee.print_cost_info(&res)?; + self.resources.print_cost_info(&res)?; if args.is_none_or(|a| !a.no_cache) { data::write(res.clone().try_into()?, &network.rpc_uri()?)?; } diff --git a/cmd/soroban-cli/src/commands/contract/upload.rs b/cmd/soroban-cli/src/commands/contract/upload.rs index 91ef33adfc..338b0a806f 100644 --- a/cmd/soroban-cli/src/commands/contract/upload.rs +++ b/cmd/soroban-cli/src/commands/contract/upload.rs @@ -36,7 +36,7 @@ pub struct Cmd { pub config: config::Args, #[command(flatten)] - pub fee: crate::fee::Args, + pub resources: crate::resources::Args, #[command(flatten)] pub wasm: wasm::Args, @@ -44,6 +44,10 @@ pub struct Cmd { #[arg(long, short = 'i', default_value = "false")] /// Whether to ignore safety checks when deploying contracts pub ignore_checks: bool, + + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } #[derive(thiserror::Error, Debug)] @@ -168,10 +172,14 @@ impl NetworkRunnable for Cmd { .await?; let sequence: i64 = account_details.seq_num.into(); - let (tx_without_preflight, hash) = - build_install_contract_code_tx(&contract, sequence + 1, self.fee.fee, &source_account)?; + let (tx_without_preflight, hash) = build_install_contract_code_tx( + &contract, + sequence + 1, + config.get_inclusion_fee()?, + &source_account, + )?; - if self.fee.build_only { + if self.build_only { return Ok(TxnResult::Txn(Box::new(tx_without_preflight))); } @@ -213,17 +221,17 @@ impl NetworkRunnable for Cmd { let assembled = simulate_and_assemble_transaction( &client, &tx_without_preflight, - self.fee.resource_config(), + self.resources.resource_config(), + self.resources.resource_fee, ) .await?; - let assembled = self.fee.apply_to_assembled_txn(assembled); - + let assembled = self.resources.apply_to_assembled_txn(assembled); let txn = Box::new(assembled.transaction().clone()); let signed_txn = &self.config.sign(*txn, quiet).await?; print.globeln("Submitting install transaction…"); let txn_resp = client.send_transaction_polling(signed_txn).await?; - self.fee.print_cost_info(&txn_resp)?; + self.resources.print_cost_info(&txn_resp)?; if args.is_none_or(|a| !a.no_cache) { data::write(txn_resp.clone().try_into().unwrap(), &network.rpc_uri()?)?; @@ -246,9 +254,10 @@ impl NetworkRunnable for Cmd { durability: super::Durability::Persistent, }, config: config.clone(), - fee: self.fee.clone(), + resources: self.resources.clone(), ledgers_to_extend: None, ttl_ledger_only: true, + build_only: self.build_only, } .run_against_rpc_server(args, None) .await?; diff --git a/cmd/soroban-cli/src/commands/fees/default.rs b/cmd/soroban-cli/src/commands/fees/default.rs new file mode 100644 index 0000000000..eaf0c753eb --- /dev/null +++ b/cmd/soroban-cli/src/commands/fees/default.rs @@ -0,0 +1,119 @@ +use clap::ValueEnum; + +use crate::{ + commands::global, + config::{locator, network}, + print::Print, + rpc, +}; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Config(#[from] locator::Error), + #[error(transparent)] + Serde(#[from] serde_json::Error), + #[error(transparent)] + Network(#[from] network::Error), + #[error(transparent)] + Rpc(#[from] rpc::Error), + #[error("Fee amount must be at least 100 stroops, but got {0}")] + FeeTooSmall(u32), + #[error("Invalid fee stats metric {0}: {1}")] + InvalidFeeStatsResult(String, String), +} + +// `clap` converts variants to kebab-case (e.g., `FeeMetric::Max` -> `max`). +#[derive(Clone, Copy, Debug, ValueEnum)] +pub enum FeeMetric { + Max, + Min, + Mode, + P10, + P20, + P30, + P40, + P50, + P60, + P70, + P80, + P90, + P95, + P99, +} + +#[derive(Debug, clap::Parser, Clone)] +#[command(group( + clap::ArgGroup::new("Fee Source") + .required(true) + .args(& ["amount", "fee_metric"]), +))] +pub struct Cmd { + /// Set the default inclusion fee amount, in stroops. 1 stroop = 0.0000001 xlm + #[arg(long)] + pub amount: Option, + + /// Set the default inclusion fee based on a metric from the network's fee stats + #[arg(long, value_enum)] + pub fee_metric: Option, + + #[command(flatten)] + pub network: network::Args, + + #[command(flatten)] + pub config_locator: locator::Args, +} + +impl Cmd { + pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> { + let printer = Print::new(global_args.quiet); + + if std::env::var("STELLAR_INCLUSION_FEE").is_ok() + && std::env::var("STELLAR_INCLUSION_FEE_SOURCE").is_err() + { + printer.warnln("Environment variable STELLAR_INCLUSION_FEE is set, which will override this default inclusion fee."); + } + + let mut inclusion_fee: u32 = 0; + if let Some(fee_metric) = self.fee_metric { + let network = self.network.get(&global_args.locator)?; + let client = network.rpc_client()?; + let fee_stats = client.get_fee_stats().await?; + + let as_string = match fee_metric { + FeeMetric::Max => fee_stats.soroban_inclusion_fee.max, + FeeMetric::Min => fee_stats.soroban_inclusion_fee.min, + FeeMetric::Mode => fee_stats.soroban_inclusion_fee.mode, + FeeMetric::P10 => fee_stats.soroban_inclusion_fee.p10, + FeeMetric::P20 => fee_stats.soroban_inclusion_fee.p20, + FeeMetric::P30 => fee_stats.soroban_inclusion_fee.p30, + FeeMetric::P40 => fee_stats.soroban_inclusion_fee.p40, + FeeMetric::P50 => fee_stats.soroban_inclusion_fee.p50, + FeeMetric::P60 => fee_stats.soroban_inclusion_fee.p60, + FeeMetric::P70 => fee_stats.soroban_inclusion_fee.p70, + FeeMetric::P80 => fee_stats.soroban_inclusion_fee.p80, + FeeMetric::P90 => fee_stats.soroban_inclusion_fee.p90, + FeeMetric::P95 => fee_stats.soroban_inclusion_fee.p95, + FeeMetric::P99 => fee_stats.soroban_inclusion_fee.p99, + }; + inclusion_fee = as_string.parse::().map_err(|_| { + Error::InvalidFeeStatsResult(format!("{fee_metric:?}"), as_string.clone()) + })?; + } else if let Some(amount) = self.amount { + inclusion_fee = amount; + } + + if inclusion_fee < 100 { + return Err(Error::FeeTooSmall(inclusion_fee)); + } + + self.config_locator + .write_default_inclusion_fee(inclusion_fee)?; + + printer.infoln(format!( + "The default inclusion fee is set to `{inclusion_fee}`" + )); + + Ok(()) + } +} diff --git a/cmd/soroban-cli/src/commands/fees/mod.rs b/cmd/soroban-cli/src/commands/fees/mod.rs new file mode 100644 index 0000000000..14beaf16c9 --- /dev/null +++ b/cmd/soroban-cli/src/commands/fees/mod.rs @@ -0,0 +1,39 @@ +use crate::commands::global; +use clap::Subcommand; + +mod default; +mod stats; +mod unset; + +#[derive(Debug, Subcommand)] +pub enum Cmd { + /// Fetch the feestats from the network + Stats(stats::Cmd), + /// Set the default inclusion fee settings for the CLI + #[command(name = "use")] + Default(default::Cmd), + /// Remove the default inclusion fee settings for the CLI + #[command(name = "unset")] + Unset(unset::Cmd), +} + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Stats(#[from] stats::Error), + #[error(transparent)] + Default(#[from] default::Error), + #[error(transparent)] + Unset(#[from] unset::Error), +} + +impl Cmd { + pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> { + match &self { + Cmd::Stats(cmd) => cmd.run(global_args).await?, + Cmd::Default(cmd) => cmd.run(global_args).await?, + Cmd::Unset(cmd) => cmd.run(global_args)?, + } + Ok(()) + } +} diff --git a/cmd/soroban-cli/src/commands/fees/stats.rs b/cmd/soroban-cli/src/commands/fees/stats.rs new file mode 100644 index 0000000000..3ecea0649f --- /dev/null +++ b/cmd/soroban-cli/src/commands/fees/stats.rs @@ -0,0 +1,57 @@ +use crate::{commands::global, config::network, rpc}; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Serde(#[from] serde_json::Error), + #[error(transparent)] + Network(#[from] network::Error), + #[error(transparent)] + Rpc(#[from] rpc::Error), +} + +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, clap::ValueEnum, Default)] +pub enum OutputFormat { + /// Text output of network info + #[default] + Text, + /// JSON result of the RPC request + Json, + /// Formatted (multiline) JSON output of the RPC request + JsonFormatted, +} + +#[derive(Debug, clap::Parser)] +pub struct Cmd { + #[command(flatten)] + pub network: network::Args, + + /// Format of the output + #[arg(long, value_enum, default_value_t)] + pub output: OutputFormat, +} + +impl Cmd { + pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> { + let network = self.network.get(&global_args.locator)?; + let client = network.rpc_client()?; + let fee_stats = client.get_fee_stats().await?; + + match self.output { + OutputFormat::Text => { + println!( + "Max Soroban Inclusion Fee: {}", + fee_stats.soroban_inclusion_fee.max + ); + println!("Max Inclusion Fee: {}", fee_stats.inclusion_fee.max); + println!("Latest Ledger: {}", fee_stats.latest_ledger); + } + OutputFormat::Json => println!("{}", serde_json::to_string(&fee_stats)?), + OutputFormat::JsonFormatted => { + println!("{}", serde_json::to_string_pretty(&fee_stats)?); + } + } + + Ok(()) + } +} diff --git a/cmd/soroban-cli/src/commands/fees/unset.rs b/cmd/soroban-cli/src/commands/fees/unset.rs new file mode 100644 index 0000000000..86ee1bb87c --- /dev/null +++ b/cmd/soroban-cli/src/commands/fees/unset.rs @@ -0,0 +1,22 @@ +use crate::{commands::global, config::locator, print::Print}; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error(transparent)] + Config(#[from] locator::Error), +} + +#[derive(Debug, clap::Parser, Clone)] +pub struct Cmd { + #[command(flatten)] + pub config_locator: locator::Args, +} + +impl Cmd { + pub fn run(&self, global_args: &global::Args) -> Result<(), Error> { + let printer = Print::new(global_args.quiet); + self.config_locator.unset_default_inclusion_fee()?; + printer.infoln("The default inclusion fee has been cleared"); + Ok(()) + } +} diff --git a/cmd/soroban-cli/src/commands/keys/default.rs b/cmd/soroban-cli/src/commands/keys/default.rs index bff94cff16..b40d01089f 100644 --- a/cmd/soroban-cli/src/commands/keys/default.rs +++ b/cmd/soroban-cli/src/commands/keys/default.rs @@ -19,8 +19,14 @@ pub struct Cmd { impl Cmd { pub fn run(&self, global_args: &global::Args) -> Result<(), Error> { let printer = Print::new(global_args.quiet); - let _ = self.config_locator.read_identity(&self.name)?; + if std::env::var("STELLAR_ACCOUNT").is_ok() + && std::env::var("STELLAR_ACCOUNT_SOURCE").is_err() + { + printer.warnln("Environment variable STELLAR_ACCOUNT is set, which will override this default source account."); + } + + let _ = self.config_locator.read_identity(&self.name)?; self.config_locator.write_default_identity(&self.name)?; printer.infoln(format!( diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index 58682d481b..4e83f13e60 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -14,6 +14,7 @@ pub mod doctor; pub mod env; pub mod events; pub mod fee_stats; +pub mod fees; pub mod global; pub mod keys; pub mod ledger; @@ -140,6 +141,7 @@ impl Root { Cmd::Ledger(ledger) => ledger.run(&self.global_args).await?, Cmd::Cache(cache) => cache.run()?, Cmd::Env(env) => env.run(&self.global_args)?, + Cmd::Fees(env) => env.run(&self.global_args).await?, Cmd::FeeStats(env) => env.run(&self.global_args).await?, } Ok(()) @@ -188,7 +190,7 @@ pub enum Cmd { #[command(subcommand)] Container(container::Cmd), - /// Manage cli configuration + /// Manage CLI configuration #[command(subcommand)] Config(cfg::Cmd), @@ -225,8 +227,12 @@ pub enum Cmd { #[command(subcommand)] Ledger(ledger::Cmd), - /// Fetch network feestats + /// ⚠️ Deprecated, use `fees stats` instead. Fetch network feestats FeeStats(fee_stats::Cmd), + + /// Fetch network feestats and configure CLI fee settings + #[command(subcommand)] + Fees(fees::Cmd), } #[derive(thiserror::Error, Debug)] @@ -285,6 +291,9 @@ pub enum Error { #[error(transparent)] FeeStats(#[from] fee_stats::Error), + + #[error(transparent)] + Fees(#[from] fees::Error), } #[async_trait] diff --git a/cmd/soroban-cli/src/commands/network/default.rs b/cmd/soroban-cli/src/commands/network/default.rs index 465994a1a5..a6e9800130 100644 --- a/cmd/soroban-cli/src/commands/network/default.rs +++ b/cmd/soroban-cli/src/commands/network/default.rs @@ -21,8 +21,14 @@ pub struct Cmd { impl Cmd { pub fn run(&self, global_args: &global::Args) -> Result<(), Error> { let printer = Print::new(global_args.quiet); - let _ = self.config_locator.read_network(&self.name)?; + if std::env::var("STELLAR_NETWORK").is_ok() + && std::env::var("STELLAR_NETWORK_SOURCE").is_err() + { + printer.warnln("Environment variable STELLAR_NETWORK is set, which will override this default network."); + } + + let _ = self.config_locator.read_network(&self.name)?; self.config_locator.write_default_network(&self.name)?; printer.infoln(format!("The default network is set to `{}`", self.name)); diff --git a/cmd/soroban-cli/src/commands/tx/args.rs b/cmd/soroban-cli/src/commands/tx/args.rs index 5cf15c1a8c..2b4c766c3e 100644 --- a/cmd/soroban-cli/src/commands/tx/args.rs +++ b/cmd/soroban-cli/src/commands/tx/args.rs @@ -5,7 +5,6 @@ use crate::{ address::{self, UnresolvedMuxedAccount}, data, network, secret, }, - fee, rpc::{self, Client, GetTransactionResponse}, tx::builder::{self, asset, TxExt}, xdr::{self, Limits, WriteXdr}, @@ -14,10 +13,11 @@ use crate::{ #[derive(Debug, clap::Args, Clone)] #[group(skip)] pub struct Args { - #[clap(flatten)] - pub fee: fee::Args, #[clap(flatten)] pub config: config::Args, + /// Build the transaction and only write the base64 xdr to stdout + #[arg(long)] + pub build_only: bool, } #[derive(thiserror::Error, Debug)] @@ -59,6 +59,7 @@ impl Args { .config .next_sequence_number(source_account.clone().account_id()) .await?; + // Once we have a way to add operations this will be updated to allow for a different source account let operation = xdr::Operation { source_account: None, @@ -66,7 +67,7 @@ impl Args { }; Ok(xdr::Transaction::new_tx( source_account, - self.fee.fee, + self.config.get_inclusion_fee()?, seq_num, operation, )) @@ -105,7 +106,7 @@ impl Args { ) -> Result, Error> { let network = self.config.get_network()?; let client = Client::new(&network.rpc_url)?; - if self.fee.build_only { + if self.build_only { return Ok(TxnEnvelopeResult::TxnEnvelope(Box::new(tx.into()))); } diff --git a/cmd/soroban-cli/src/commands/tx/simulate.rs b/cmd/soroban-cli/src/commands/tx/simulate.rs index 7fc1de7833..6ce13b616b 100644 --- a/cmd/soroban-cli/src/commands/tx/simulate.rs +++ b/cmd/soroban-cli/src/commands/tx/simulate.rs @@ -66,7 +66,7 @@ impl NetworkRunnable for Cmd { let resource_config = self .instruction_leeway .map(|instruction_leeway| soroban_rpc::ResourceConfig { instruction_leeway }); - let tx = simulate_and_assemble_transaction(&client, &tx, resource_config).await?; + let tx = simulate_and_assemble_transaction(&client, &tx, resource_config, None).await?; Ok(tx) } } diff --git a/cmd/soroban-cli/src/config/locator.rs b/cmd/soroban-cli/src/config/locator.rs index 0c16f9cb81..4027ae3095 100644 --- a/cmd/soroban-cli/src/config/locator.rs +++ b/cmd/soroban-cli/src/config/locator.rs @@ -215,6 +215,10 @@ impl Args { Config::new()?.set_identity(name).save() } + pub fn write_default_inclusion_fee(&self, inclusion_fee: u32) -> Result<(), Error> { + Config::new()?.set_inclusion_fee(inclusion_fee).save() + } + pub fn unset_default_identity(&self) -> Result<(), Error> { Config::new()?.unset_identity().save() } @@ -223,6 +227,10 @@ impl Args { Config::new()?.unset_network().save() } + pub fn unset_default_inclusion_fee(&self) -> Result<(), Error> { + Config::new()?.unset_inclusion_fee().save() + } + pub fn list_identities(&self) -> Result, Error> { Ok(KeyType::Identity .list_paths(&self.local_and_global()?)? diff --git a/cmd/soroban-cli/src/config/mod.rs b/cmd/soroban-cli/src/config/mod.rs index e5feaed0ff..cd86dc1324 100644 --- a/cmd/soroban-cli/src/config/mod.rs +++ b/cmd/soroban-cli/src/config/mod.rs @@ -7,6 +7,7 @@ use std::{ use crate::{ print::Print, signer::{self, Signer}, + utils::deprecate_message, xdr::{self, SequenceNumber, Transaction, TransactionEnvelope, TransactionV1Envelope, VecM}, Pwd, }; @@ -59,7 +60,7 @@ pub struct Args { /// Can be an identity (--source alice), a public key (--source GDKW...), /// a muxed account (--source MDA…), a secret key (--source SC36…), /// or a seed phrase (--source "kite urban…"). - /// If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to + /// If `--build-only` was NOT provided, this key will also be used to /// sign the final transaction. In that case, trying to sign with public key will fail. pub source_account: UnresolvedMuxedAccount, @@ -68,6 +69,14 @@ pub struct Args { #[command(flatten)] pub sign_with: sign_with::Args, + + /// ⚠️ Deprecated, use `--inclusion-fee`. Fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm + #[arg(long, env = "STELLAR_FEE")] + pub fee: Option, + + /// Maximum fee amount for transaction inclusion, in stroops. 1 stroop = 0.0000001 xlm. Defaults to 100 if no arg, env, or config value is provided + #[arg(long, env = "STELLAR_INCLUSION_FEE")] + pub inclusion_fee: Option, } impl Args { @@ -130,6 +139,24 @@ impl Args { Ok(self.network.get(&self.locator)?) } + /// Get the inclusion fee if available from args, otherwise fall back to fee, + /// and finally return 100 if nothing is set. + /// + /// Precedence is: + /// 1. inclusion_fee (via clap, arg then env var) + /// 2. fee (via clap, arg then env var) + /// 3. default of 100 stroops + pub fn get_inclusion_fee(&self) -> Result { + if self.fee.is_some() { + deprecate_message( + Print::new(false), + "--fee [env: STELLAR_FEE]", + "Use `--inclusion-fee [env: STELLAR_INCLUSION_FEE]` instead.", + ); + } + Ok(self.inclusion_fee.or(self.fee).unwrap_or(100)) + } + pub async fn next_sequence_number( &self, account: impl Into, @@ -181,6 +208,7 @@ pub struct Config { pub struct Defaults { pub network: Option, pub identity: Option, + pub inclusion_fee: Option, } impl Config { @@ -207,6 +235,12 @@ impl Config { self } + #[must_use] + pub fn set_inclusion_fee(mut self, uint: u32) -> Self { + self.defaults.inclusion_fee = Some(uint); + self + } + #[must_use] pub fn unset_identity(mut self) -> Self { self.defaults.identity = None; @@ -219,6 +253,12 @@ impl Config { self } + #[must_use] + pub fn unset_inclusion_fee(mut self) -> Self { + self.defaults.inclusion_fee = None; + self + } + pub fn save(&self) -> Result<(), locator::Error> { let toml_string = toml::to_string(&self)?; let path = cli_config_file()?; diff --git a/cmd/soroban-cli/src/config/network.rs b/cmd/soroban-cli/src/config/network.rs index c113579ac4..2401e73fc3 100644 --- a/cmd/soroban-cli/src/config/network.rs +++ b/cmd/soroban-cli/src/config/network.rs @@ -232,7 +232,12 @@ impl Network { .try_into() .map_err(|_| Error::InvalidHeader)?; - Ok(rpc::Client::new_with_headers(&self.rpc_url, header_map)?) + rpc::Client::new_with_headers(&self.rpc_url, header_map).map_err(|e| match e { + rpc::Error::InvalidRpcUrl(..) | rpc::Error::InvalidRpcUrlFromUriParts(..) => { + Error::InvalidUrl(self.rpc_url.clone()) + } + other => Error::Rpc(other), + }) } } @@ -464,6 +469,22 @@ mod tests { ); } + #[tokio::test] + async fn test_rpc_client_returns_err_with_bad_rpc_url() { + let network = Network { + rpc_url: "Bring Your Own: http://localhost:8000".to_string(), + network_passphrase: passphrase::LOCAL.to_string(), + rpc_headers: [].to_vec(), + }; + + let result = network.rpc_client(); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err().to_string(), + format!("Invalid URL Bring Your Own: http://localhost:8000") + ); + } + #[tokio::test] async fn test_default_to_testnet_when_no_network_specified() { use super::super::locator; diff --git a/cmd/soroban-cli/src/env_vars.rs b/cmd/soroban-cli/src/env_vars.rs index b756459d97..7f2122291b 100644 --- a/cmd/soroban-cli/src/env_vars.rs +++ b/cmd/soroban-cli/src/env_vars.rs @@ -8,6 +8,7 @@ pub fn unprefixed() -> Vec<&'static str> { "CONTRACT_ID", "DATA_HOME", "FEE", + "INCLUSION_FEE", "INVOKE_VIEW", "NETWORK", "NETWORK_PASSPHRASE", diff --git a/cmd/soroban-cli/src/lib.rs b/cmd/soroban-cli/src/lib.rs index 5d2cecf56a..b53d120164 100644 --- a/cmd/soroban-cli/src/lib.rs +++ b/cmd/soroban-cli/src/lib.rs @@ -15,11 +15,11 @@ pub mod assembled; pub mod commands; pub mod config; mod env_vars; -pub mod fee; pub mod get_spec; pub mod key; pub mod log; pub mod print; +pub mod resources; pub mod signer; pub mod toid; pub mod tx; diff --git a/cmd/soroban-cli/src/fee.rs b/cmd/soroban-cli/src/resources.rs similarity index 53% rename from cmd/soroban-cli/src/fee.rs rename to cmd/soroban-cli/src/resources.rs index a7bac65d6e..d000c2ddbf 100644 --- a/cmd/soroban-cli/src/fee.rs +++ b/cmd/soroban-cli/src/resources.rs @@ -6,34 +6,31 @@ use crate::assembled::Assembled; use crate::commands::tx::fetch; use crate::commands::tx::fetch::fee::FeeTable; use crate::commands::HEADING_RPC; -use crate::xdr; -#[derive(Debug, clap::Args, Clone)] +#[derive(Debug, clap::Args, Clone, Default)] #[group(skip)] pub struct Args { - /// fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm - #[arg(long, default_value = "100", env = "STELLAR_FEE", help_heading = HEADING_RPC)] - pub fee: u32, - /// Output the cost execution to stderr - #[arg(long = "cost", help_heading = HEADING_RPC)] - pub cost: bool, - /// Number of instructions to simulate + /// Set the fee for smart contract resource consumption, in stroops. 1 stroop = 0.0000001 xlm. Overrides the simulated resource fee + #[arg(long, env = "STELLAR_RESOURCE_FEE", help_heading = HEADING_RPC)] + pub resource_fee: Option, + /// ⚠️ Deprecated, use `--instruction-leeway` to increase instructions. Number of instructions to allocate for the transaction #[arg(long, help_heading = HEADING_RPC)] pub instructions: Option, - /// Allow this many extra instructions when budgeting resources during transaction simulation + /// Allow this many extra instructions when budgeting resources with transaction simulation #[arg(long, help_heading = HEADING_RPC)] pub instruction_leeway: Option, - /// Build the transaction and only write the base64 xdr to stdout + /// Output the cost execution to stderr #[arg(long, help_heading = HEADING_RPC)] - pub build_only: bool, + pub cost: bool, } impl Args { + // TODO: Remove once `--instructions` is fully removed pub fn apply_to_assembled_txn(&self, txn: Assembled) -> Assembled { if let Some(instructions) = self.instructions { txn.set_max_instructions(instructions) } else { - add_padding_to_instructions(txn) + txn } } @@ -54,28 +51,3 @@ impl Args { Ok(()) } } - -pub fn add_padding_to_instructions(txn: Assembled) -> Assembled { - let xdr::TransactionExt::V1(xdr::SorobanTransactionData { - resources: xdr::SorobanResources { instructions, .. }, - .. - }) = txn.transaction().ext - else { - return txn; - }; - // Start with 150% - let instructions = (instructions.checked_mul(150 / 100)).unwrap_or(instructions); - txn.set_max_instructions(instructions) -} - -impl Default for Args { - fn default() -> Self { - Self { - fee: 100, - cost: false, - instructions: None, - instruction_leeway: None, - build_only: false, - } - } -} diff --git a/cookbook/tx-op-add.mdx b/cookbook/tx-op-add.mdx index bfbd7babc0..1d4652ca3b 100644 --- a/cookbook/tx-op-add.mdx +++ b/cookbook/tx-op-add.mdx @@ -26,7 +26,7 @@ ASSET="USDC:$ISSUER_PK" # rather than transferring assets directly. # first the issuer sets the options for being able to clawback and revoke the asset -stellar tx new set-options --fee 1000 --source issuer --set-clawback-enabled --set-revocable --build-only \ +stellar tx new set-options --inclusion-fee 1000 --source issuer --set-clawback-enabled --set-revocable --build-only \ # next the distributor establishes a trustline with the asset. Note that here the distributor the source account for the operation, not the issuer | stellar tx op add change-trust --op-source distributor --line $ASSET \ # then the issuer sends the smallest amount possible to the distributor @@ -41,7 +41,7 @@ stellar tx new set-options --fee 1000 --source issuer --set-clawback-enabled --s # Next is an example of sandwiching an operation. That is giving permission in one operation, preforming the operation, and then removing the permission in a third operation. # Here is an example of minting new assets to the distributor with a sandwich transaction # First authorize the distributor to receive the asset -stellar tx new set-trustline-flags --fee 1000 --build-only --source issuer --asset $ASSET --trustor $distributor_PK --set-authorize \ +stellar tx new set-trustline-flags --inclusion-fee 1000 --build-only --source issuer --asset $ASSET --trustor $distributor_PK --set-authorize \ # Then mint the asset to the distributor | stellar tx op add payment --destination distributor --asset $ASSET --amount 1_000_000_000_000 \ # Finally remove the authorization