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:
📄️ Organize contract errors with an error enum type
A convenient way to manage and meaningfully communicate contract errors is to collect them into an enum struct. These errors are a special type of enum integer type that are stored on ledger as Status values containing a u32 code. First, create the Error struct in your smart contract.
📄️ Upgrade the Wasm bytecode of a deployed contract
Upgrade the Wasm bytecode of a deployed contract
📄️ Write metadata for your contract.
Write structured metadata.