Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/stylus/cli-tools/check-and-deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The `cargo stylus check` command validates that your contract can be deployed an
- Required exports (`user_entrypoint`)
- Allowed imports (only `vm_hooks`)
- Memory constraints
- Size limits (24KB compressed)
- Size limits (decompressed WASM within `MaxWasmSize`)
4. **Simulates activation** using `eth_call` to verify onchain compatibility
5. **Estimates the data fee** required for activation

Expand Down Expand Up @@ -106,7 +106,7 @@ Common validation errors include:

- **Missing entrypoint**: Contract lacks `#[entrypoint]` attribute
- **Invalid exports**: Contract exports reserved symbols
- **Size limit exceeded**: Compressed WASM exceeds 24KB
- **Size limit exceeded**: Decompressed WASM exceeds `MaxWasmSize` (the chain-configurable limit, 128 KB by default and 256 KB at ArbOS 60+)
- **Invalid imports**: Contract imports functions outside `vm_hooks`
- **Memory violations**: Incorrect memory handling or growth

Expand Down Expand Up @@ -263,7 +263,7 @@ cargo stylus deploy \
# Specify cargo-stylus version
cargo stylus deploy \
--private-key-path=./key.txt \
--cargo-stylus-version=0.5.0
--cargo-stylus-version=0.10.7
```

Skip Docker for local development (non-reproducible):
Expand Down Expand Up @@ -401,7 +401,7 @@ cargo stylus deploy \
cargo stylus deploy \
--endpoint="https://arb1.arbitrum.io/rpc" \
--private-key-path=./key.txt \
--cargo-stylus-version=0.5.0
--cargo-stylus-version=0.10.7

# 4. Verify the deployed contract
cargo stylus verify \
Expand Down Expand Up @@ -522,7 +522,7 @@ cargo stylus deploy \
cargo stylus deploy \
--endpoint="https://arb1.arbitrum.io/rpc" \
--private-key-path=./key.txt \
--cargo-stylus-version=0.5.0
--cargo-stylus-version=0.10.7

# Then verify on Arbiscan
cargo stylus verify \
Expand All @@ -542,7 +542,7 @@ cargo stylus deploy \
# Check compressed size
cargo stylus check

# If size is close to 24KB limit:
# If the decompressed WASM is close to the MaxWasmSize limit:
# - Use #[no_std]
# - Remove unused dependencies
# - Enable aggressive optimizations
Expand All @@ -568,7 +568,7 @@ cargo stylus deploy --private-key-path=./key.txt --estimate-gas

### Size limit errors

**Error**: Compressed WASM exceeds 24KB
**Error**: Decompressed WASM exceeds the size limit (`MaxWasmSize`)

**Solutions**:

Expand All @@ -583,7 +583,7 @@ cargo stylus deploy --private-key-path=./key.txt --estimate-gas

```toml
[dependencies]
stylus-sdk = "0.5"
stylus-sdk = "0.10.7"
# Remove unnecessary crates
```

Expand Down Expand Up @@ -690,7 +690,7 @@ cargo stylus deploy --private-key-path=./key.txt --estimate-gas
4. Check SDK version compatibility:
```toml
[dependencies]
stylus-sdk = "0.5" # Use latest stable version
stylus-sdk = "0.10.7" # Use latest stable version
```

## Non-Rust WASM Deployment
Expand Down
Loading