How to build a smart contract on Stellar Blockchain with Soroban
As you know smart contracts are programs written in blockchain programming language and in our case we will see how to build a simple or smart contract on stellar blockchain, if your are not a software developer, there are no problems, you can continue to read this blog post, you will understand fundamentals of the building of a smart contract on stellar.
To build and develop a contract on soroban you need to install :
-Rust toolchain
-An editor tool that support Rust
-Stellar CLI(Commande Line Interface)
First we must install Rust
To install Rust you must copy and past this commande in your terminal
if you are on Linux , MacOs, or other Linux environmentcurl --proto '=https' --tlsv1.2 -sSf
https://sh.rustup.rs
| sh
if you are on Windows like me
we must download the .exe file and install it by pressing enter in every step
the links is here :
https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
Then, we must install the target
copy and past this command in your terminalrustup target add wasm32-unknown-unknown
Next steps, we will install a code editor that support Rust, you can install Visual Studio Code, it’s my favorite and i recommend this code editor, and you will install extension of Visual Studio Code like Rust Analyzer and CodeLLDB
Finally we must to install the Stellar CLI, and you can open your terminal and past this if you use Windows hijoi hsngcargo install --locked stellar-cli --features opt
And if you are using MacOs or Linux, past this cmdbrew install stellar-cli
Then we need to configure the CLI for Testnet
just run this command in your terminal if you are on windowsstellar network add --global testnet --rpc-url
https://soroban-testnet.stellar.org:443
` --network-passphrase "Test SDF Network ; September 2015"
if you are on Linux or MacOsstellar network add --global testnet --rpc-url
https://soroban-testnet.stellar.org:443
--network-passphrase "Test SDF Network ; September 2015"
Subscribe to my newsletter
Read articles from Mintoumba Caleb directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by