Contract Conventions
These guides describe the "typical" way something might be accomplished in a Rust contract. These guides aren't meant to be quite as prescriptive as some others; instead, they serve to highlight some of the norms we've seen when crop up in contract development.
Guides in this category:
📄️ Analyzing smart contract cost and efficiency
Several factors influence how quickly and efficiently your smart contracts execute on the Stellar network. This guide will help you understand these factors and provide tips on how to write cost-effective contracts.
📄️ Using __check_auth in interesting ways
Using check_auth in interesting ways
📄️ Deploy a contract from installed Wasm bytecode using a deployer contract
{Deploy a contract from installed Wasm bytecode using a deployer contract}
📄️ Organize contract errors with an error enum type
Manage and communicate contract errors using an enum struct stored as Status values.
📄️ Install and deploy a smart contract with code
Install and deploy a smart contract with code
📄️ Integrate Stellar Assets Contracts
Test and use Stellar assets in a Soroban smart contract
📄️ Upgrading Wasm Bytecode for a Deployed Contract
Upgrading Wasm Bytecode for a Deployed Contract
📄️ Write metadata for your contract
Use the contractmeta! macro in Rust SDK to write metadata in Wasm contracts.