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.

Currently exploring: ERC20

From TypeScript to Stylus in seconds

1

TypeScript

Write contracts

2

Generate

AssemblyScript

3

Compile

WASM

4

Deploy

To Arbitrum

5

Interact

Call functions

Up and running in under 60s

Three commands to deploy your first Stylus contract

Working with:ERC20 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 | sh

Install 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 update

Update rustup and installed toolchains.

rustup default stable

Use stable toolchain by default.

rustc --version

Verify version (cargo-stylus requires Rust ≥ 1.81).

rustup target add wasm32-unknown-unknown

Add WASM target (mandatory for Stylus).

Install cargo-stylus

cargo install cargo-stylus

Install the Stylus CLI (latest version published on crates.io).

Contract Code

Step 1: Generate project

Create a new Stylus contract template

npx @wakeuplabs/as-stylus generate my-token

Step 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.ts

Step 4: Deploy to Arbitrum

Deploy your contract to Arbitrum Sepolia testnet. The system will securely prompt for your wallet's private key (no need to expose it in the command).

npx @wakeuplabs/as-stylus deploy contract.ts --endpoint https://sepolia-rollup.arbitrum.io/rpc --constructor-args "MyToken" "MYT"

Recommended RPC Endpoint

Your private key will be requested securely during deployment (similar to sudo password prompt)

Interact with your contract

Connect to your deployed contract and test its functions

Testing:ERC20 Contract
Network detection failed
Contract Configuration

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

Analyzing:ERC20 Contract

Ready for your first deploy?

Start building Stylus contracts with TypeScript today. No Rust knowledge required.

Join us to building the future of smart contracts