arbitrum-stylus

Write and deploy Arbitrum Stylus smart contracts in Rust compiled to WASM.

1|1|Updated May 21, 2026
One-click install
npx skills add https://github.com/naruto11eth/cryptoskills --skill arbitrum-stylus-naruto11eth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arbitrum-stylus
Source: https://github.com/naruto11eth/cryptoskills/tree/main/skills/arbitrum-stylus
Command: npx skills add https://github.com/naruto11eth/cryptoskills --skill arbitrum-stylus-naruto11eth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI models carry stale or incorrect knowledge about Arbitrum Stylus development, such as treating Stylus as a separate chain, missing the mandatory contract activation step, or using the outdated sol_storage! macro. This Skill provides current, accurate guidance for writing, testing, deploying, and interoperating Stylus WASM contracts in Rust. ## Core Features & Use Cases - Stylus Contract Development: Covers the stylus-sdk 0.6+ attribute-based API (#[storage], #[entrypoint], #[public]), typed storage primitives, StorageVec/StorageMap collections, events, and error handling patterns. - Deployment & Activation Workflow: Guides cargo stylus check, deploy, and activate commands, including the two-step deployment plus activation process and ArbWasm precompile interaction. - Solidity Interop & Testing: Explains sol_interface! cross-VM calls, shared storage slot layouts for proxy patterns, and unit testing with the motsu framework. - Use Case: Build a gas-efficient ERC20 token in Rust, test it with motsu, deploy it to Arbitrum Sepolia, and call it from a Solidity contract using the exported ABI. ## Quick Start Ask the agent to scaffold a new Stylus counter contract in Rust with storage, tests, and deployment commands for Arbitrum Sepolia.

Frequently Asked Questions about arbitrum-stylus

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a smart contract in Rust for Arbitrum Stylus?

Install Rust with the wasm32-unknown-unknown target and the cargo-stylus CLI, then run cargo stylus new to scaffold a project. Define storage with the #[storage] attribute, mark the struct with #[entrypoint], and expose functions in a #[public] impl block using stylus-sdk 0.6+.

How do I deploy and activate a Stylus contract?

Run cargo stylus check to validate the WASM, then cargo stylus deploy with your RPC endpoint and private key. Deployment performs two transactions: bytecode deployment and activation via ArbWasm.activateProgram(). Unactivated contracts revert on every call.

Can Stylus contracts call Solidity contracts?

Yes. Use the sol_interface! macro to declare the Solidity contract's interface, then invoke methods through Call::new(). Stylus and Solidity share the same state and ABI encoding on Arbitrum, so cross-VM calls work like standard contract calls.

Why does my Stylus contract fail cargo stylus check with floating point detected?

Stylus WASM requires deterministic execution and disallows f32 and f64 types. Remove all floating-point usage from your code and dependencies, replacing decimal math with U256 integers and scaling factors.

When is Stylus not worth using over Solidity?

Stylus saves gas on compute-heavy work like cryptography, parsing, and complex math, but storage costs are identical to Solidity. Simple CRUD contracts, basic ERC20s, and storage-heavy logic see minimal savings, and Stylus cannot use CREATE/CREATE2 or delegatecall.