Write Stylus contracts in TypeScript.
ERC-20, ERC-721 and custom logic. No Solidity. No Rust.
Choose Your Contract Type
Select the token standard you want to explore. This choice will guide your entire journey.
From TypeScript to Stylus in seconds
TypeScript
Write contracts
Generate
AssemblyScript
Compile
WASM
Deploy
To Arbitrum
Interact
Call functions
Up and running in under 60s
Three commands to deploy your first Stylus contract
Prerequisites
Make sure you have the required tools installed before getting started.
Quick Install (convenience)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall Rust + rustup (skip if already installed). Then source "$HOME/.cargo/env".
Rust Setup (in order)
cargo-stylus requires Rust 1.81+ and the wasm32-unknown-unknown target.
rustup updateUpdate rustup and installed toolchains.
rustup default stableUse stable toolchain by default.
rustc --versionVerify version (cargo-stylus requires Rust ≥ 1.81).
rustup target add wasm32-unknown-unknownAdd WASM target (mandatory for Stylus).
Install cargo-stylus
cargo install cargo-stylusInstall the Stylus CLI (latest version published on crates.io).
Step 1: Generate project
Create a new Stylus contract template
npx @wakeuplabs/as-stylus generate my-tokenStep 2: Open project and copy contract code
Navigate to project folder, open it in your editor, then replace contract.ts with the code shown here
Important Step
After opening your project, copy the contract code from the left panel and replace the entire contents of contract.ts
cd my-token && code .Step 3: Build & compile
Transform TypeScript into WebAssembly
npx @wakeuplabs/as-stylus compile contract.tsStep 4: Deploy to Arbitrum
Deploy your contract to Arbitrum Sepolia testnet. You can provide your private key via --private-key parameter or the system will securely prompt for it.
npx @wakeuplabs/as-stylus deploy contract.ts --endpoint https://sepolia-rollup.arbitrum.io/rpc --constructor-args "MyToken" "MYT" --private-key YOUR_PRIVATE_KEYDeployment Options
Alternative: Remove --private-key to be prompted securely (recommended for production)
Interact with your contract
Connect to your deployed contract and test its functions
Enter your deployed ERC20 contract address, then click "Confirm Contract" to interact with your smart contract functions.
Curious what gets compiled?
Peek under the hood to see the generated artifacts