Setting Up Arbitrum Stylus
Last updated
Last updated
To start developing with Arbitrum Stylus, follow these steps to set up your environment properly:
Prerequisites
Rust Toolchain
Ensure you have the Rust toolchain installed. Follow the .
VS Code
Download and install .
Recommended extensions for Rust development:
rust-analyzer
Error Lens
Even Better TOML
crates
Setting Up Arbitrum Stylus
Install Cargo Stylus
Install the cargo-stylus
and cargo-stylus-check
tools:
Add WASM Target
Add WebAssembly as a build target for your Rust compiler:
Cargo Stylus Commands
Verify the installation and see the available commands:
Available commands include:
new
: Create a new Rust project
export-abi
: Export a Solidity ABI
check
: Check a contract
deploy
: Deploy a contract
replay
: Replay a transaction in gdb
trace
: Trace a transaction
c-gen
: Generate C code
help
: Print help
Developer Wallet / Account
Create a Developer Wallet
Use MetaMask or another wallet service to create a fresh account for development purposes.
Avoid using personal accounts with real assets.
Obtain the Private Key
For MetaMask, follow the instructions to export your private key.
CAUTION: Never share your “secret recovery phrase” with anyone. A private key is valid for an individual account only, but a secret recovery phrase can be used to gain access to ALL accounts in your wallet.
Acquiring Testnet ETH
BwareLabs Faucet
Enter your wallet address and click Claim.
Additional Faucets
By following these steps, you will have your environment set up for developing and deploying Rust smart contracts on Arbitrum Stylus. Ensure you have the Rust toolchain, configure your development environment with VS Code, install the necessary cargo-stylus
tools, set up a developer wallet, and acquire testnet ETH for testing your contracts.
Navigate to .