Writing the Hello World Contract
Project Setup
Step 1: Create a New Project
cargo stylus new hello_world
cd hello_worldStep 2: Edit Cargo.toml
Cargo.toml[package]
name = "hello_world"
version = "0.1.0"
edition = "2021"
[dependencies]
stylus-sdk = { version = "0.5.2", features = ["debug"] }
wee_alloc = "0.4.5"
[features]
export-abi = ["stylus-sdk/export-abi"]
[profile.release]
codegen-units = 1
strip = true
lto = true
panic = "abort"
opt-level = "s"
[workspace]Step 3: Edit Contract Code
Explanation
Last updated