Skip to content

Commit

Permalink
Changing "Soroban CLI" to "Stellar CLI" (#633)
Browse files Browse the repository at this point in the history
* Changing "Soroban CLI" to "Stellar CLI"

* Update soroban-cli version. (#634)

* Update some CLI commands

* Remove Deadlink - Stellar Authenticator (#637)

* Update setup.mdx (#644)

The soroban-cli version in this doc is outdated and will give the following error when invoking a deployed contract:

"error: xdr processing error: xdr value invalid"

As specified here an update of the CLI version is needed:

https://stellar.org/blog/developers/protocol-21-upgrade-guide

* Update smart-contract-deployment.mdx (#645)

The it is an issue in the vault contract's withdraw function which will incorrectly update the value of Reserve.

In this line

    let balance = get_token_balance(&e);

balance is updated AFTER the transfer of the user deposit + yield has already occurred. 

Thus the balance fetched is already the current "reserve" balance of the Vault. 

So when the following line of code executes:

put_reserve(&e, balance - amount);

the Reserve is updated to the balance of the Vault contract - the amount withdrawn by the user, so it will count the withdrawn 2 times. 

Indeed when following the test the result from "get_rsrvs" in the first scenario will be :

"-1" 

Initial balance of the Vault: 200 - amount: 100 + yield: 1 (from the transfer) - amount: 100 (from the put_reserve input). 

For further improvements the get_rsrvs should only account for the amount of reward tokens that the vault is holding which can be useful to obtain the deposited amount (vault balance - reserves).

Additionally the --wasm argument in the "invoke" command is not needed and it was removed.

* [SDP-1054] Updating Stellar Docs for SDP multi-tenant (#407)

* [SDP-1139] sdp: add SDP multi-tenant migration doc (#394)

* feat: add SDP multi-tenant migration doc

* chore: address PR comments

* [SDP-1056] sdp: add SDP Admin API spec (#397)

* feat: add SDP Admin API spec

* chore: address PR comments

* fix: remove distribution_account field

* SDP-1054 update design and architecture docs

* Update the "Getting Started" section.

* chore: update SDP docs build (#440)

When running the `yarn api` these files are rebuilt due to a new authenticate method added (`Basic Auth`). This PR only updates these files to the latest version.

The changes are related to this #397.

* [SDP-1100] Default tenant endpoint (#455)

This PR adds the default tenant endpoint that sets a tenant as the default in the system.

---------

Authored-by: Caio Teixeira <caio.xd63@hotmail.com>

* [SDP-1151] Update single-tenant to multi-tenant migration guide (#496)

### What

Update the single-tenant to multi-tenant migration guide with the following changes:
* Update the status requirements saying that the only payments/submitter_transactions statuses that need to be solved before the migration are PENDING/PROCESSING
* Reorganize the content
* Add extra sections with more info
* Include new commands and SQL queries to make the migration easier.
* Add TODOs:
  - [x] stellar/stellar-disbursement-platform-backend#262
  - [ ] stellar/stellar-disbursement-platform-backend#266
  - [ ] https://stellarorg.atlassian.net/browse/SDP-1148

* [SDP-1151] Polish the single-tenant to multi-tenant migration guide (#511)

* [SDP-1157] add `Configuring the SDP` page (#512)

* SDP-1157 adding `Configuring the SDP` page

* SDP-1157 adding `Configuring the SDP` page

* SDP-1157 address PR comments

* SDP-1157 move sdp API under api-reference folder

* Fix broken link

* Change architecture diagram

* Update instructions with the updated field name.

* add tenant resolution and multi-tenant subdomain info. (#578)

* add tenant resolution and multi-tenant subdomain info.

* address PR comments

* Enforce the necessity to include the home domain in the SDP SEP-10 challenge GET request (#654)

### Why

To keep the docs up to date with the code. This is now required in the multitenant instance.

* [SDP] Polish the docs for the multitenant 2.0.0 release (#656)

### Changes

- Add the missing DELETE /tenants/:id API documentation
- Update the request and response bodies in the /tenants API.
- Updated the checksum on the .api.mdx files by running `yarn api`

---------

Co-authored-by: Caio Teixeira <caio.xd63@hotmail.com>
Co-authored-by: Erica <erica.liu@stellar.org>
Co-authored-by: Marcelo Salloum dos Santos <marcelosalloum@gmail.com>
Co-authored-by: Marcelo Salloum <marcelo@stellar.org>

* Rewriting scaling documentation (#659)

* rpc: add getFeeStats method documentation (#660)

* rpc: add getFeeStats method

* Address review feedback

* Remove unneeded stop

* Add some description updates

---------

Co-authored-by: Jane Wang <janewang@Janes-MacBook-Pro.local>

* Soroban RPC: Add document for getVersionInfo RPC (#661)

* Add document for getVersionInfo RPC

* update info

* Add captive core info

* Add a table of hardware requirements for various node types (#568)

* add a doc with a requirements comparison table

* add some sidebar content for new-ish section

* adjust some heading config for platforms pages

* Fix command for adding new networks. (#667)

* Adding Tokens Overview (wayfinding) (#570)

* Adding Tokens Overview (wayfinding)

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* formatting

* more updates

* update copy

* couple nits

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>

* update wording

* update note

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* G & C addresses

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* Update docs/smart-contracts/tokens/wayfinding.mdx

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>

* wording

* formatting

---------

Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>
Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>

* Categorize Learn Section (#646)

* Categorize Learn Section

* moving things around

* fix links

* more links

* mas links

* beaucoup links

* mais links

* authorization heading fix

* message

* little nits

* Fix link (#675)

* Learn section redirects (#678)

* Add examples of invoking contracts using Python SDK and Java SDK. (#643)

* Add examples of calling contracts using Python SDK and Java SDK

* rename file

* fix js example

* Add hubble diagrams and data dicts (#670)

Add hubble diagrams and data dicts

* Add Passkey Library session to meeting notes (#681)

* update meeting notes

* Update 2024-06-13.mdx

* Update 2024-06-13.mdx

* Update 2024-06-13.mdx

---------

Co-authored-by: Tyler van der Hoeven <hi@tyvdh.com>

* Add Ortege to Block Explorers (#671)

* Add Ortege to Block Explorers

* Update developer-tools.mdx

* Update Software Versions for Protocol 21: Mainnet (#685)

* Update Software Versions for Protocol 21: Mainnet

* adding versions back to be updated

* rpc: Add `getTransactions` documentation (#636)

* Add getTransactions documenation - 1

* Add getTransactions documentation - 2

* Add getTransactions documentation - 4

* Refactor Pagination changes

* Refactor the params object in getTransactions examples

* Change naming to only RPC

* Change description of diagnosticEventsXdr

* Add "items"

* Update openrpc/src/methods/getTransactions.json

Co-authored-by: George <Shaptic@users.noreply.github.com>

* Update openrpc/src/schemas/Cursor.json

Co-authored-by: George <Shaptic@users.noreply.github.com>

* Update openrpc/src/schemas/Pagination.json

Co-authored-by: George <Shaptic@users.noreply.github.com>

* Small changes - 1

* Remove links - 1

* Remove links - 2

* Fix broken TOID link

---------

Co-authored-by: George <Shaptic@users.noreply.github.com>

* Updates to Getting Started Docs (#674)

* Update soroban output to current 21.x state

* Fix naming for HelloContractClient

* Consistent directory names

* formatting and link

---------

Co-authored-by: Bri <92327786+briwylde08@users.noreply.github.com>

* Add more detail to overlay survey instructions (#653)

* Add more detail to overlay survey instructions

This change adds some additional instructions to the overlay survey
section of the admin guide. Specifically, it adds:

* Instructions on how to use the overlay survey script.
* Information about the `nonce` field in the "start/stop collecting"
  messages.
* Explicit instructions on how to opt-out of the survey.
* Recommendations for collecting phase durations.
* Small tweaks to fix grammar/formatting/example errors found while
  editing the section

* Add links

* Add admin-guide for hubble (#669)

Add admin-guide for hubble

* typo fix in cli guid (#693)

* Update docs/smart-contracts/getting-started/setup.mdx

Co-authored-by: Nando Vieira <me@fnando.com>

* Changing "Soroban CLI" to "Stellar CLI"

* Update some CLI commands

* Add more cli updates

* Update to stellar cli

* Fix path

---------

Co-authored-by: Nando Vieira <me@fnando.com>
Co-authored-by: Jane Wang <janewang@Janes-MacBook-Pro.local>
Co-authored-by: Ricky Lindenhovius <1669379+xiv@users.noreply.github.com>
Co-authored-by: FrankFourier <84725957+Frank-Fourier@users.noreply.github.com>
Co-authored-by: Marwen Abid <marwen.abid@stellar.org>
Co-authored-by: Caio Teixeira <caio.xd63@hotmail.com>
Co-authored-by: Erica <erica.liu@stellar.org>
Co-authored-by: Marcelo Salloum dos Santos <marcelosalloum@gmail.com>
Co-authored-by: Marcelo Salloum <marcelo@stellar.org>
Co-authored-by: Molly Karcher <molly@stellar.org>
Co-authored-by: Alfonso Acosta <fons@syntacticsugar.consulting>
Co-authored-by: Prit Sheth <124409873+psheth9@users.noreply.github.com>
Co-authored-by: Elliot Voris <elliot@stellar.org>
Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com>
Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>
Co-authored-by: Jun Luo <4catcode@gmail.com>
Co-authored-by: chowbao <simon.chow765@gmail.com>
Co-authored-by: Julian Martinez <73849597+Julian-dev28@users.noreply.github.com>
Co-authored-by: Tyler van der Hoeven <hi@tyvdh.com>
Co-authored-by: Aditya Vyas <adityavyas17@gmail.com>
Co-authored-by: George <Shaptic@users.noreply.github.com>
Co-authored-by: Pam S <pamela.selle@gmail.com>
Co-authored-by: Brett Boston <bboston7@users.noreply.github.com>
Co-authored-by: Rahul Soshte <rahul.soshte4771@gmail.com>
  • Loading branch information
1 parent 6a1e2fc commit 19beaf0
Show file tree
Hide file tree
Showing 30 changed files with 169 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,15 @@ public class SorobanExample {

## XDR Usage

Stellar supports invoking and deploying contracts with a new operation named `InvokeHostFunctionOp`. The [`soroban-cli`] abstracts these details away from the user, but not all SDKs do yet. If you're building a dapp you'll probably find yourself building the XDR transaction to submit to the network.
Stellar supports invoking and deploying contracts with a new operation named `InvokeHostFunctionOp`. The [`stellar-cli`] abstracts these details away from the user, but not all SDKs do yet. If you're building a dapp you'll probably find yourself building the XDR transaction to submit to the network.

The `InvokeHostFunctionOp` can be used to perform the following Soroban operations:

- Invoke contract functions.
- Upload Wasm of the new contracts.
- Deploy new contracts using the uploaded Wasm or built-in implementations (this currently includes only the [token contract](../../../../smart-contracts/tokens/stellar-asset-contract.mdx)).

[`soroban-cli`]: /docs/smart-contracts/getting-started/setup.mdx#install-the-soroban-cli
[`stellar-cli`]: /docs/smart-contracts/getting-started/setup.mdx#install-the-stellar-cli

There is only a single `InvokeHostFunctionOp` allowed per transaction. Contracts should be used to perform multiple actions atomically, for example, to deploy a new contract and initialize it atomically.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ When you compile a contract created with [soroban-sdk](../../../../tools/sdks/li

Today, these interface types are formatted using [XDR](../../data-format/xdr.mdx), but this [may change](https://github.com/stellar/rs-soroban-sdk/issues/683) down the road.

The important part is that tooling can fetch these interface types to make your life easier. [Soroban CLI](../../../../tools/developer-tools.mdx#cli) is the first tool to do so. Specifically, one subcommand:
The important part is that tooling can fetch these interface types to make your life easier. [Stellar CLI](../../../../tools/developer-tools.mdx#cli) is the first tool to do so. Specifically, one subcommand:

## `soroban contract invoke`
## `stellar contract invoke`

Really, every smart contract is its own program, and deserves its own CLI.

So that's what Soroban CLI gives you.
So that's what Stellar CLI gives you.

A unique CLI for each smart contract. Constructed on-the-fly, right from the on-chain interface types. Including the author's comments. An _implicit CLI_.

Expand Down Expand Up @@ -69,7 +69,7 @@ Options:
-h, --help Print help
```

Like any other CLI, you can also get help for any of these subcommands using something like `native balance --help`. Soroban CLI again fetches the on-chain interface types, this time using it to generate a full list of all arguments to the function, and even generates examples.
Like any other CLI, you can also get help for any of these subcommands using something like `native balance --help`. Stellar CLI again fetches the on-chain interface types, this time using it to generate a full list of all arguments to the function, and even generates examples.

:::tip

Expand All @@ -83,13 +83,13 @@ soroban contract invoke --network testnet --id CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIX

If you're unfamiliar with the `--` double dash separator, this is a pattern used by other CLIs. Everything after the double dash, sometimes called the [slop](https://github.com/clap-rs/clap/issues/971), gets passed to the child process. An example of another CLI that makes use of this is `cargo run`.

Of course, the exact way that that Soroban CLI parses arguments is an ongoing design discussion. Representing complex custom arguments on the command line is a design challenge no blockchain CLI gets perfect yet; many, including Soroban CLI, currently use JSON. But this has downsides, and other options are possible. [How would you like to see it work?](https://docs.google.com/document/d/1LASaLyxIA2-YqLnn2NqI5NZGnEmdzx9lLh-j7n0-i4A/edit#)
Of course, the exact way that that Stellar CLI parses arguments is an ongoing design discussion. Representing complex custom arguments on the command line is a design challenge no blockchain CLI gets perfect yet; many, including Stellar CLI, currently use JSON. But this has downsides, and other options are possible. [How would you like to see it work?](https://docs.google.com/document/d/1LASaLyxIA2-YqLnn2NqI5NZGnEmdzx9lLh-j7n0-i4A/edit#)

## Already the best; just getting started

We love that Soroban will have all contract interface types available on-chain right from day one. No secondary API calls to external services, no secondary API token management, no signing in or creating an account anywhere else, and near-perfect reliability. It's a game-changer within the blockchain space.

Soroban CLI already shows how this can be built into foundational tooling to give developers delightful experiences. And this is only the beginning. At every level of the stack, you can expect—and [build](https://stellar.org/foundation/grants-and-funding)—tooling that makes interacting with any contract predictable and seamless.
Stellar CLI already shows how this can be built into foundational tooling to give developers delightful experiences. And this is only the beginning. At every level of the stack, you can expect—and [build](https://stellar.org/foundation/grants-and-funding)—tooling that makes interacting with any contract predictable and seamless.

Soon we'll have TypeScript/JavaScript libraries that mirror the behavior of `soroban contract invoke`, customized for browser & nodejs environments. You can expect GUIs that adapt to any given contract on-the-fly, functioning as interactive documentation. If you're writing contracts that make cross-contract calls, most of the code you need can also be auto-generated.

Expand Down
2 changes: 1 addition & 1 deletion docs/learn/fundamentals/stellar-data-structures/assets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The public key of the issuing account is linked on the ledger to the asset. Resp

Assets issued on the Stellar network are accessible to smart contracts. Every Stellar asset has reserved a Stellar Asset Contract that can be deployed by anyone who wants to be able to interact with the asset from a contract.

The Soroban CLI can deploy a Stellar Asset Contract for a Stellar asset. Deploying the Stellar Asset Contract for a Stellar asset enables that asset for use with smart contracts.
The Stellar CLI can deploy a Stellar Asset Contract for a Stellar asset. Deploying the Stellar Asset Contract for a Stellar asset enables that asset for use with smart contracts.

Learn more in the [SAC section](../../../smart-contracts/tokens/stellar-asset-contract.mdx).

Expand Down
8 changes: 4 additions & 4 deletions docs/smart-contracts/example-contracts/TEMPLATE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm

## Run the Contract

If you have [`soroban-cli`] installed, you can invoke contract functions using it.
If you have [`stellar-cli`] installed, you can invoke contract functions using it.

<Tabs groupId="platform" defaultValue={getPlatform()}>

<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--wasm target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm \
--id 1 \
-- \
Expand All @@ -165,7 +165,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke `
stellar contract invoke `
--wasm target/wasm32-unknown-unknown/release/soroban_hello_world_contract.wasm `
--id 1 `
-- `
Expand All @@ -177,7 +177,7 @@ soroban contract invoke `

</Tabs>

[`soroban-cli`]: ../getting-started/setup.mdx#install-the-soroban-cli
[`stellar-cli`]: ../getting-started/setup.mdx#install-the-stellar-cli

## Further Reading

Expand Down
42 changes: 21 additions & 21 deletions docs/smart-contracts/example-contracts/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ assert_eq!(client.increment(&user_2, &4), 5);

## Build the Contract

To build the contract into a `.wasm` file, use the `soroban contract build` command.
To build the contract into a `.wasm` file, use the `stellar contract build` command.

```sh
soroban contract build
stellar contract build
```

The `.wasm` file should be found in the `target` directory after building:
Expand All @@ -287,15 +287,15 @@ target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm

## Run the Contract

If you have [`soroban-cli`] installed, you can invoke functions on the contract.
If you have [`stellar-cli`] installed, you can invoke functions on the contract.

But since we are dealing with authorization and signatures, we need to set up some identities to use for testing and get their public keys:

```sh
soroban keys generate acc1
soroban keys generate acc2
soroban keys address acc1
soroban keys address acc2
stellar keys generate acc1
stellar keys generate acc2
stellar keys address acc1
stellar keys address acc2
```

Example output with two public keys of identities:
Expand All @@ -305,14 +305,14 @@ GA6S566FD3EQDUNQ4IGSLXKW3TGVSTQW3TPHPGS7NWMCEIPBOKTNCSRU
GAJGHZ44IJXYFNOVRZGBCVKC2V62DB2KHZB7BEMYOWOLFQH4XP2TAM6B
```

Now the contract itself can be invoked. Notice the `--source` must be the identity name matching the address passed to the `--user` argument. This allows `soroban` tool to automatically sign the necessary payload for the invocation.
Now the contract itself can be invoked. Notice the `--source` must be the identity name matching the address passed to the `--user` argument. This allows `Stellar CLI` to automatically sign the necessary payload for the invocation.

<Tabs groupId="platform" defaultValue={getPlatform()}>

<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--source acc1 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -327,7 +327,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke `
stellar contract invoke `
--source acc1 `
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm `
--id 1 `
Expand All @@ -348,7 +348,7 @@ Run a few more increments for both accounts.
<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--source acc2 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -359,7 +359,7 @@ soroban contract invoke \
```

```sh
soroban contract invoke \
stellar contract invoke \
--source acc1 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -370,7 +370,7 @@ soroban contract invoke \
```

```sh
soroban contract invoke \
stellar contract invoke \
--source acc2 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -385,7 +385,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke \
stellar contract invoke \
--source acc2 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -396,7 +396,7 @@ soroban contract invoke \
```

```powershell
soroban contract invoke \
stellar contract invoke \
--source acc1 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -407,7 +407,7 @@ soroban contract invoke \
```

```powershell
soroban contract invoke \
stellar contract invoke \
--source acc2 \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
--id 1 \
Expand All @@ -421,10 +421,10 @@ soroban contract invoke \

</Tabs>

View the data that has been stored against each user with `soroban contract read`.
View the data that has been stored against each user with `stellar contract read`.

```sh
soroban contract read --id 1
stellar contract read --id 1
```

```
Expand All @@ -439,7 +439,7 @@ It is also possible to preview the authorization payload that is being signed by
<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--source acc2 \
--auth \
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm \
Expand All @@ -455,7 +455,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke `
stellar contract invoke `
--source acc2 `
--auth `
--wasm target/wasm32-unknown-unknown/release/soroban_auth_contract.wasm `
Expand All @@ -474,7 +474,7 @@ soroban contract invoke `
Contract auth: [{"address_with_nonce":null,"root_invocation":{"contract_id":"0000000000000000000000000000000000000000000000000000000000000001","function_name":"increment","args":[{"object":{"address":{"account":{"public_key_type_ed25519":"c7bab0288753d58d3e21cc3fa68cd2546b5f78ae6635a6f1b3fe07e03ee846e9"}}}},{"u32":123}],"sub_invocations":[]},"signature_args":[]}]
```

[`soroban-cli`]: ../getting-started/setup.mdx#install-the-soroban-cli
[`stellar-cli`]: ../getting-started/setup.mdx#install-the-stellar-cli

## Further reading

Expand Down
20 changes: 10 additions & 10 deletions docs/smart-contracts/example-contracts/cross-contract-call.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ assert_eq!(sum, 12);

## Build the Contracts

To build the contract into a `.wasm` file, use the `soroban contract build` command. Both `contract_call/contract_a` and `contract_call/contract_b` must be built, with `contract_a` being built first.
To build the contract into a `.wasm` file, use the `stellar contract build` command. Both `contract_call/contract_a` and `contract_call/contract_b` must be built, with `contract_a` being built first.

```sh
soroban contract build
stellar contract build
```

Both `.wasm` files should be found in both contract `target` directories after building both contracts:
Expand All @@ -243,20 +243,20 @@ target/wasm32-unknown-unknown/release/soroban_cross_contract_b_contract.wasm

## Run the Contract

If you have [`soroban-cli`] installed, you can invoke contract functions. Both contracts must be deployed.
If you have [`stellar-cli`] installed, you can invoke contract functions. Both contracts must be deployed.

<Tabs groupId="platform" defaultValue={getPlatform()}>

<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract deploy \
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/soroban_cross_contract_a_contract.wasm \
--id a
```

```sh
soroban contract deploy \
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/soroban_cross_contract_b_contract.wasm \
--id b
```
Expand All @@ -266,13 +266,13 @@ soroban contract deploy \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract deploy `
stellar contract deploy `
--wasm target/wasm32-unknown-unknown/release/soroban_cross_contract_a_contract.wasm `
--id a
```

```powershell
soroban contract deploy `
stellar contract deploy `
--wasm target/wasm32-unknown-unknown/release/soroban_cross_contract_b_contract.wasm `
--id b
```
Expand All @@ -288,7 +288,7 @@ Invoke Contract B's `add_with` function, passing in values for `x` and `y` (e.g.
<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--id b \
-- \
add_with \
Expand All @@ -302,7 +302,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke `
stellar contract invoke `
--id b `
-- `
add_with `
Expand All @@ -323,4 +323,4 @@ The following output should occur using the code above.

Contract B's `add_with` function invoked Contract A's `add` function to do the addition.

[`soroban-cli`]: ../getting-started/setup.mdx#install-the-soroban-cli
[`stellar-cli`]: ../getting-started/setup.mdx#install-the-stellar-cli
16 changes: 8 additions & 8 deletions docs/smart-contracts/example-contracts/custom-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ assert_eq!(

## Build the Contract

To build the contract, use the `soroban contract build` command.
To build the contract, use the `stellar contract build` command.

```sh
soroban contract build
stellar contract build
```

A `.wasm` file should be outputted in the `target` directory:
Expand All @@ -248,14 +248,14 @@ target/wasm32-unknown-unknown/release/soroban_custom_types_contract.wasm

## Run the Contract

If you have [`soroban-cli`] installed, you can invoke contract functions in the Wasm using it.
If you have [`stellar-cli`] installed, you can invoke contract functions in the Wasm using it.

<Tabs groupId="platform" defaultValue={getPlatform()}>

<TabItem value="unix" label="macOS/Linux">

```sh
soroban contract invoke \
stellar contract invoke \
--wasm target/wasm32-unknown-unknown/release/soroban_custom_types_contract.wasm \
--id 1 \
-- \
Expand All @@ -268,7 +268,7 @@ soroban contract invoke \
<TabItem value="windows" label="Windows (PowerShell)">

```powershell
soroban contract invoke `
stellar contract invoke `
--wasm target/wasm32-unknown-unknown/release/soroban_custom_types_contract.wasm `
--id 1 `
-- `
Expand All @@ -288,14 +288,14 @@ The following output should occur using the code above.

Run it a few more times with different increment amounts to watch the count change.

Use the `soroban` to inspect what the counter is after a few runs.
Use the `stellar-cli` to inspect what the counter is after a few runs.

```sh
soroban contract read --id 1 --key STATE
stellar contract read --id 1 --key STATE
```

```
STATE,"{""count"":25,""last_incr"":15}"
```

[`soroban-cli`]: ../getting-started/setup.mdx#install-the-soroban-cli
[`stellar-cli`]: ../getting-started/setup.mdx#install-the-stellar-cli
Loading

0 comments on commit 19beaf0

Please sign in to comment.