Setting Up Arbitrum Stylus
Setting Up the Arbitrum Stylus Environment
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 Rust Lang’s installation instructions.
VS Code
Download and install Visual Studio Code.
Recommended extensions for Rust development:
rust-analyzer
Error Lens
Even Better TOML
crates
Setting Up Arbitrum Stylus
Install Cargo Stylus
Install the
cargo-stylus
andcargo-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 projectexport-abi
: Export a Solidity ABIcheck
: Check a contractdeploy
: Deploy a contractreplay
: Replay a transaction in gdbtrace
: Trace a transactionc-gen
: Generate C codehelp
: 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
Navigate to BwareLabs Faucet.
Enter your wallet address and click Claim.
Additional Faucets
Summary
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.
Last updated