What is Stellar Soroban? Stellar Network Smart Contract?
2024-12-23Bittime - Soroban is a smart contract platform integrated into the Stellar network. These contracts are small programs written in the Rust programming language and compiled into WebAssembly (Wasm) for the deployment process.
Acquaintance with Soroban
To start writing contracts in Soroban, you need to install the Rust toolchain, configure your programming editor to support Rust programs, and learn some basic Rust concepts.
Rust by Stellar
Smart contracts on Stellar have several characteristics, such as resource constraints and security considerations, that require them to use only a small subset of the overall Rust language.
Additionally, contracts must use custom libraries for most tasks.
Notes on Crates in the Stellar Project
It should be noted that the Rust standard library and most third-party libraries (so-called "crates") cannot be used directly in contracts due to the limitations already mentioned.
Some crates can be adapted for use in contracts, while others may be integrated into the host environment as host objects or functions.
Currently, only Rust is supported, although support for other languages may become available in the future.
Soroban Rust SDK
Contracts are developed using a software development kit (SDK). The Soroban Rust SDK consists of a Rust crate and command line tools.
Read too Check the Price of Stellar (XLM) to IDR Latest Today
What's that Crates SDK?
The Crate SDK serves as a replacement for the Rust standard library — providing data structures and utility functions for contracts — as well as providing access to smart contract-specific functionality of the contract environment, such as cryptographic hashing, signature verification, access to on-chain persistent storage, and location and invocation secondary contract via stable identifier.
The Soroban SDK command line tools provide a developer-focused interface for compiling, testing, checking, versioning, and depoying contracts.
The tool also includes a complete implementation of a contract host environment identical to the one running on-chain, called local test mode.
With this capability, contracts can be run locally on a developer's workstation and can be tested and debugged directly with a local debugger in a standard IDE, as well as using fast unit tests and fast fuzzing or property tests.
Soroban Host Environment
The host environment is a collection of Rust crates compiled into the SDK and stellar-core command line tools. It includes a set of host objects and functions, interfaces for on-chain storage and contract invocation, resource accounting and cost billing systems, and the Wasm interpreter.
Most contract developers will not need to interact directly with the host environment frequently — the SDK functions encapsulate most of its facilities and provide richer, ergonomic types and functions — but it is important to understand its structure to understand the conceptual model presented by the SDK.
Some parts of the host environment will likely be visible when testing or debugging natively compiled contracts on a local workstation.
Read too When Will Stellar (XLM) Launch? This is the history, investors must know!
FAQ Soroban
What is Soroban in the context of Stellar? Is this a new blockchain?
Soroban is not a new blockchain. Soroban is a smart contract platform integrated into the existing Stellar blockchain. This is an additional feature that coexists with and does not replace the existing Stellar operating set.
How to call Soroban contract in Stellar?
You can invoke the Soroban contract by sending a transaction containing a new operation: InvokeHostFunctionOp.
Can Soroban contracts use Stellar accounts for authentication?
Yes. Stellar account shared with Soroban. The smart contract has access to the Stellar account signing configuration and knows the source account that directly invoked it in the transaction.
Can Soroban contracts interact with Stellar assets?
Yes. Soroban has a built-in Stellar Asset Contract that can interact with classic trustlines.
Can Soroban contracts interact with other Stellar operations?
No. Other than interactions with the accounts and assets mentioned above, Soroban contracts cannot interact with SDEX, claimable balances, or sponsorships.
What Stellar policy recommendations apply to the Soroban contract?
No. Soroban has a different fee structure, and the ledger entries allocated by the Soroban contract do not add up to the minimum balance required for the account.
How to Buy Crypto on Bittime
Want to trade sell buy Bitcoins and crypto investment easily? Bittime is here to help! As an Indonesian crypto exchange officially registered with Bappebti, Bittime ensures every transaction is safe and fast.
Start with registration and identity verification, then make a minimum deposit of IDR 10,000. After that, you can immediately buy your favorite digital assets!
Check the exchange rate BTC to IDR, ETH to IDR, SOL to IDR and other crypto assets to find out today's crypto market trends in real-time on Bittime.
Also, visit the Bittime Blog for interesting updates and educational information about the crypto world. Find reliable articles about Web3, blockchain technology, and digital asset investment tips designed to enrich your crypto knowledge.
Reference
Stellar Developer, Write Smart Contract, Accessed December 23, 2024
Author: IN
Disclaimer: The views expressed belong exclusively to the author and do not reflect the views of this platform. This platform and its affiliates disclaim any responsibility for the accuracy or suitability of the information provided. It is for informational purposes only and not intended as financial or investment advice.