Rise In Logo



Learn everything about Stellar

Installing Soroban CLI:

Open vscode terminal and enter this command:

cargo install --locked --version 20.1.1 soroban-cli

Configuring the CLI for Testnet:

Soroban has a test network called Testnet that you can use to deploy and test your smart contracts. It's a live network, but it's not the same as the Stellar public network. It's a separate network that is used for development and testing, so you can't use it for production apps. But it's a great place to test your contracts before you deploy them to the public network.

To configure your CLI to interact with Testnet, run the following command:

soroban config network add --global testnet --rpc-url https://soroban-testnet.stellar.org:443

Configure an Identity:

When you deploy a smart contract to a network, you need to specify an identity that will be used to sign the transactions.

Let's configure an identity called alice. You can use any name you want, but it might be nice to have some named identities that you can use for testing, such as alice, bob, and carol.

soroban config identity generate --global alice

You can see the public key of alice with:

soroban config identity address alice

Like the Network configs, the “--global” means that the identity gets stored in “~/.config/soroban/identity/alice.toml”. You can omit the “--global” flag to store the identity in your project's .soroban/identity folder instead.

All this did so far is generate a public/private keypair on your local machine. No network requests were made, and alice has no funds on Testnet. This means that you can't make any transactions with aliceyet.

To get alice some Testnet tokens, you'll need to use Friendbot. All Stellar and Soroban test networks have a Friendbot that you can use to get some test tokens. The public Friendbot instance for Testnet lives at https://friendbot.stellar.org. Use it:

curl "https://friendbot.stellar.org/?addr=$(soroban config identity address alice)"

Comments

You need to enroll in the course to be able to comment!

Stay in the know

Never miss updates on new programs and opportunities.

Rise In Logo

Rise together in web3!

Disclaimer: The information /programs / events provided on https://patika.dev and https://risein.com are strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice and do not make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://patika.dev and https://risein.com disclaim any responsibility for financial decisions made by users based on information provided here.