### Arbitrum Resources for Developers Source: https://docs.arbitrum.io/welcome/get-started Guides developers on building decentralized applications on Arbitrum, with quickstarts for Solidity and Rust. ```APIDOC Resource | Description ---|--- A gentle introduction to Arbitrum | A technical introduction to Arbitrum's suite of scaling solutions. Quickstart (Solidity) | Targeted at Web2 developers who want to deploy their first Solidity smart contract to Arbitrum. Quickstart (Rust) | Targeted at Web3 developers who want to deploy their first Rust smart contract to Arbitrum using Stylus. ``` -------------------------------- ### Project Setup with npm Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Initializes a new project directory and sets up the project using npm. ```bash mkdir usdc-transfer-app cd usdc-transfer-app npm init -y ``` -------------------------------- ### Install viem Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Installs the viem library, a lightweight, fast, and type-safe Ethereum library for interacting with the blockchain. ```bash npm i viem ``` -------------------------------- ### Install Project Dependencies Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Installs the necessary React, TypeScript, and Vite dependencies for the project. ```bash npm install react@^18.2.0 react-dom@^18.2.0 @types/react@^18.0.27 @types/react-dom@^18.0.10 @vitejs/plugin-react@^3.1.0 typescript@^5.0.3 vite@^4.4.5 ``` -------------------------------- ### Setup Public Client with viem Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Configures a public client using viem to interact with the Arbitrum Sepolia network. This client is used for reading blockchain data. ```javascript import { http, createPublicClient } from 'viem'; import { arbitrumSepolia } from 'viem/chains'; const publicClient = createPublicClient({ chain: arbitrumSepolia, transport: http(), }); ``` -------------------------------- ### Setup Wallet Client with viem Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Configures a wallet client using viem to interact with user accounts on the Arbitrum Sepolia network. This client is used for signing transactions and messages. ```javascript import { createWalletClient } from 'viem'; import { arbitrumSepolia } from 'viem/chains'; const walletClient = createWalletClient({ chain: arbitrumSepolia, transport: custom(window.ethereum!), }); ``` -------------------------------- ### Arbitrum Resources for Developers Source: https://docs.arbitrum.io/index This table provides resources for developers looking to build decentralized applications on Arbitrum, with quickstarts for Solidity and Rust. ```APIDOC Resource | Description --|-- A gentle introduction to Arbitrum | A technical introduction to Arbitrum's suite of scaling solutions. Quickstart (Solidity) | Targeted at Web2 developers who want to deploy their first Solidity smart contract to Arbitrum. Quickstart (Rust) | Targeted at Web3 developers who want to deploy their first Rust smart contract to Arbitrum using Stylus. ``` -------------------------------- ### Install Foundry and Run Anvil Source: https://docs.arbitrum.io/build-decentralized-apps/quickstart-solidity-remix Installs Foundry (a Solidity development toolkit) and then runs Anvil, Foundry's local Ethereum node, to set up a local testnet. ```Shell curl -L https://foundry.paradigm.xyz |bash anvil ``` -------------------------------- ### Generated Solidity ABI Interface Example Source: https://docs.arbitrum.io/stylus/quickstart An example of the Solidity ABI interface generated by `cargo stylus export-abi` for a Rust-based Stylus contract. ```Solidity /** * This file was automatically generated by Stylus and represents a Rust program. * For more information, please see [The Stylus SDK](https://github.com/OffchainLabs/stylus-sdk-rs). */ // SPDX-License-Identifier: MIT-OR-APACHE-2.0 pragma solidity ^0.8.23; interface ICounter { function number() external view returns (uint256); function setNumber(uint256 new_number) external; function mulNumber(uint256 new_number) external; function addNumber(uint256 new_number) external; function increment() external; } ``` -------------------------------- ### Starting the Development Server Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-paymaster-quickstart Command to start the local development server for the Arbitrum project. Once running, the application can be accessed via a web browser. ```bash npm run dev ``` -------------------------------- ### Install Reown AppKit and Dependencies Source: https://docs.arbitrum.io/for-devs/third-party-docs/Reown Installs the Reown AppKit SDK, the wagmi adapter for Ethereum interactions, and react-query for state management. This setup enables wallet connections and Web3 functionalities. ```JavaScript npm install @reown/appkit @reown/appkit-wagmi-adapter wagmi @tanstack/react-query ``` -------------------------------- ### Create New Stylus Project Source: https://docs.arbitrum.io/stylus/quickstart Initializes a new Stylus project with a starter template, similar to the Solidity Counter example. ```Rust cargo stylus new ``` -------------------------------- ### Install Cargo Stylus Source: https://docs.arbitrum.io/stylus/quickstart Installs the `cargo-stylus` CLI toolkit, a plugin for the Rust Cargo tool, used for developing Stylus contracts. ```Shell cargo install --force cargo-stylus ``` -------------------------------- ### Generated Solidity ABI Interface Example Source: https://docs.arbitrum.io/stylus/stylus-quickstart An example of the Solidity ABI interface generated by `cargo stylus export-abi` for a Rust-based Stylus contract. ```Solidity /** * This file was automatically generated by Stylus and represents a Rust program. * For more information, please see [The Stylus SDK](https://github.com/OffchainLabs/stylus-sdk-rs). */ // SPDX-License-Identifier: MIT-OR-APACHE-2.0 pragma solidity ^0.8.23; interface ICounter { function number() external view returns (uint256); function setNumber(uint256 new_number) external; function mulNumber(uint256 new_number) external; function addNumber(uint256 new_number) external; function increment() external; } ``` -------------------------------- ### Arbitrum Resources for Node Runners Source: https://docs.arbitrum.io/index This table outlines resources for individuals running Arbitrum nodes, including setup and data availability configuration. ```APIDOC Resource | Description --|-- Run a full node | Targeted at node runners who want to access Arbitrum chains without having to connect to a third-party node. Configure a Data Availability Committee | Targeted at Data Availability Committee members and Arbitrum chain operators who want to run a Data Availability Server. ``` -------------------------------- ### Create New Stylus Project Source: https://docs.arbitrum.io/stylus/stylus-quickstart Initializes a new Stylus project with a starter template, similar to the Solidity Counter example. ```Rust cargo stylus new ``` -------------------------------- ### Arbitrum Resources for Node Runners Source: https://docs.arbitrum.io/welcome/get-started Information for node runners on setting up and maintaining Arbitrum network infrastructure. ```APIDOC Resource | Description ---|--- Run a full node | Targeted at node runners who want to access Arbitrum chains without having to connect to a third-party node. Configure a Data Availability Committee | Targeted at Data Availability Committee members and Arbitrum chain operators who want to run a Data Availability Server. ``` -------------------------------- ### Solidity Counter Smart Contract Example Source: https://docs.arbitrum.io/stylus/quickstart A basic Solidity smart contract demonstrating a counter functionality. ```Solidity // SPDX-License-Identifier: MIT pragmasolidity>=0.4.22<0.9.0; contractCounter{ uint count; functionsetCount()public{ count = count +1; } functiongetCount()viewpublicreturns(uint){ return count; } } ``` -------------------------------- ### Install Cargo Stylus Source: https://docs.arbitrum.io/stylus/stylus-quickstart Installs the `cargo-stylus` CLI toolkit, a plugin for the Rust Cargo tool, used for developing Stylus contracts. ```Shell cargo install --force cargo-stylus ``` -------------------------------- ### Solidity Counter Smart Contract Example Source: https://docs.arbitrum.io/stylus/stylus-quickstart A basic Solidity smart contract demonstrating a counter functionality. ```Solidity // SPDX-License-Identifier: MIT pragmasolidity>=0.4.22<0.9.0; contractCounter{ uint count; functionsetCount()public{ count = count +1; } functiongetCount()viewpublicreturns(uint){ return count; } } ``` -------------------------------- ### Gas Estimation Result for Deployment Source: https://docs.arbitrum.io/stylus/quickstart Example output showing the estimated gas, gas price, and total cost in ETH for deploying a contract. ```APIDOC deployment tx gas: 7123737 gas price: "0.100000000" gwei deployment tx total cost: "0.000712373700000000" ETH ``` -------------------------------- ### Arbitrum Suite Components Source: https://docs.arbitrum.io/welcome/get-started Details the core components of the Arbitrum suite, including protocols, chains, and software that enable Ethereum scaling. ```APIDOC Component | Description ---|--- Arbitrum Rollup | A **protocol** for scaling Ethereum smart contracts. Arbitrum AnyTrust | A **protocol** for scaling Ethereum smart contracts even further, with a mild trust assumption. Arbitrum Nitro | The node **software** that codifies the Rollup and AnyTrust protocols. Arbitrum nodes | **Machines** that run Nitro in order to service and/or interact with an Arbitrum chain. Arbitrum One | A public Rollup **chain**. Arbitrum Nova | A public AnyTrust **chain**. Arbitrum bridge | Lets you move `ETH` and `ERC-20` tokens between Ethereum, Arbitrum, and select Arbitrum (Orbit) chains. Arbitrum (Orbit) chains | Lets you run your own Rollup and AnyTrust chains. Arbitrum Stylus | Lets you write EVM-compatible smart contracts in Rust and any other language that compiles to Wasm. ``` -------------------------------- ### USDC Transfer App with viem Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide A React application using viem to connect a wallet, send USDC tokens, and display transaction receipts on the Arbitrum Sepolia network. It includes setup for public and wallet clients, USDC contract ABI, and state management for transaction status. ```typescript import React, { useEffect, useState } from 'react'; import ReactDOM from 'react-dom/client'; import { http, type Address, type Hash, type TransactionReceipt, createPublicClient, createWalletClient, custom, stringify, encodeFunctionData, } from 'viem'; import { arbitrumSepolia } from 'viem/chains'; import 'viem/window'; const publicClient = createPublicClient({ chain: arbitrumSepolia, transport: http() }); const walletClient = createWalletClient({ chain: arbitrumSepolia, transport: custom(window.ethereum!) }); const USDC_CONTRACT_ADDRESS = '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d'; const USDC_ABI = [ { constant: false, inputs: [ { name: '_to', type: 'address' }, { name: '_value', type: 'uint256' }, ], name: 'transfer', outputs: [{ name: '', type: 'bool' }], type: 'function', }, ]; function Example() { const [account, setAccount] = useState
(); const [hash, setHash] = useState(); const [receipt, setReceipt] = useState(); const addressInput = React.createRef(); const valueInput = React.createRef(); const connect = async () => { const [address] = await walletClient.requestAddresses(); setAccount(address); }; const sendTransaction = async () => { if (!account) return; const to = addressInput.current!.value as Address; const value = valueInput.current!.value as `${number}`; const valueInWei = BigInt(value) * BigInt(10**6); // Assuming USDC has 6 decimals const data = encodeFunctionData({ abi: USDC_ABI, functionName: 'transfer', args: [to, valueInWei], }); const hash = await walletClient.sendTransaction({ account, to: USDC_CONTRACT_ADDRESS, data, }); setHash(hash); }; useEffect(() => { (async () => { if (hash) { const receipt = await publicClient.waitForTransactionReceipt({ hash }); setReceipt(receipt); } })(); }, [hash]); if (account) { return ( <>
Connected:{account}
{receipt && (
Receipt:
{stringify(receipt, null, 2)}
)} ); } return ; } ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( ); ``` -------------------------------- ### Gas Estimation Result for Deployment Source: https://docs.arbitrum.io/stylus/stylus-quickstart Example output showing the estimated gas, gas price, and total cost in ETH for deploying a contract. ```APIDOC deployment tx gas: 7123737 gas price: "0.100000000" gwei deployment tx total cost: "0.000712373700000000" ETH ``` -------------------------------- ### Install Project Dependencies Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-paymaster-quickstart Installs various UI and utility libraries required for the Next.js project, including Radix UI components, TanStack Query, class-variance-authority, clsx, lucide-react, permissionless, viem, and Tailwind CSS utilities. ```bash npm install @radix-ui/react-label @radix-ui/react-slot @radix-ui/react-tabs @tanstack/query-core @tanstack/react-query class-variance-authority clsx lucide-react next permissionless react react-dom tailwind-merge tailwindcss-animate viem ``` -------------------------------- ### Stylus Contracts Introduction and Quickstart Source: https://docs.arbitrum.io/stylus/stylus-overview This section covers the basics of writing Stylus contracts, offering a gentle introduction and a quickstart guide for developers using Rust. It aims to get users up and running with Stylus development efficiently. ```English A gentle introduction Start with the basics of Stylus contracts. Quickstart (Rust) Get started quickly with Rust. ``` -------------------------------- ### Smart Contract Development Summary Source: https://docs.arbitrum.io/build-decentralized-apps/quickstart-solidity-remix Overview of the quickstart's key takeaways, including identifying business rules, challenges, solutions using Arbitrum, and the process of converting logic to a Solidity smart contract and deploying it. ```APIDOC Identified two business rules: 1) fair and permissionless cupcake distribution 2) immutable business logic and data. Identified a challenge: These rules are difficult to follow in a centralized application. Identified a solution: Using Arbitrum, we can decentralize business logic and data. Converted a vending machine's Javascript business logic into a Solidity smart contract. Deployed our smart contract to a local development network, and then Arbitrum's Sepolia testnet. ``` -------------------------------- ### Arbitrum Orbit SDK Rollup Creation Example Reference Source: https://docs.arbitrum.io/launch-arbitrum-chain/a-gentle-introduction A reference to the Arbitrum Orbit SDK for step-by-step instructions on creating a Rollup chain, highlighting low prototyping costs. ```English See the Orbit SDK Rollup creation example for step-by-step instructions. ``` -------------------------------- ### Transaction Trace Output Example Source: https://docs.arbitrum.io/stylus/how-tos/debugging-tx Example JSON output from a transaction trace, detailing function calls, arguments, start and end ink values, and return values. ```json [{"args":[0,0,0,4],"endInk":846200000,"name":"user_entrypoint","outs":[],"startInk":846200000},{"args":[],"endInk":846167558,"name":"msg_reentrant","outs":[0,0,0,0],"startInk":846175958},{"args":[],"endInk":846047922,"name":"read_args","outs":[208,157,224,138],"startInk":846061362},{"args":[],"endInk":845914924,"name":"msg_value","outs":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"startInk":845928364},{"args":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"endInk":227196069,"name":"storage_load_bytes32","outs":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"startInk":844944549},{"args":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],"endInk":226716083,"name":"storage_cache_bytes32","outs":[],"startInk":226734563},{"args":[0],"endInk":226418732,"name":"storage_flush_cache","outs":[],"startInk":226486805},{"args":[],"endInk":226362319,"name":"write_result","outs":[],"startInk":226403481},{"args":[],"endInk":846200000,"name":"user_returned","outs":[0,0,0,0],"startInk":846200000}] ``` -------------------------------- ### Cargo Stylus Commands Source: https://docs.arbitrum.io/stylus/quickstart Displays the available commands for `cargo-stylus`, a CLI toolkit for developing Stylus projects, including commands for project creation, deployment, and ABI export. ```APIDOC Cargo command for developing Stylus projects Usage: cargo stylus Commands: new Create a new Stylus project init Initializes a Stylus project in the current directory export-abi Export a Solidity ABI activate Activate an already deployed contract [aliases: a] cache Cache a contract using the Stylus CacheManager for Arbitrum chains check Check a contract [aliases: c] deploy Deploy a contract [aliases: d] verify Verify the deployment of a Stylus contract [aliases: v] cgen Generate c code bindings for a Stylus contract replay Replay a transaction in gdb [aliases: r] trace Trace a transaction [aliases: t] help Print this message or the help of the given command(s) Options: -h, --help Print help -V, --version Print version ``` -------------------------------- ### Estimate Gas for Stylus Contract Deployment Source: https://docs.arbitrum.io/stylus/quickstart Estimates the gas required for deploying a Stylus contract. Requires specifying the endpoint and a private key. ```Rust cargo stylus deploy \ --endpoint='http://localhost:8547' \ --private-key="0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659" \ --estimate-gas ``` -------------------------------- ### Webacy API Integration Guide Source: https://docs.arbitrum.io/for-devs/third-party-docs/Webacy Instructions for integrating with Webacy's APIs to leverage their risk data network. This involves obtaining an API key and following a quick start guide for implementation. ```APIDOC Quick Start Integration Guide: - Reach out to info@webacy.com for an API key. - Follow the provided Quick Start Integration Guide for implementation. ``` -------------------------------- ### Acquire Testnet ETH for Arbitrum Sepolia Source: https://docs.arbitrum.io/build-decentralized-apps/quickstart-solidity-remix Steps to obtain testnet ETH for the Arbitrum Sepolia testnet. This involves using a faucet on the Sepolia network and then bridging the ETH to Arbitrum Sepolia. ```APIDOC 1. Use a parent chain Sepolia ETH faucet like sepoliafaucet.com to acquire some testnet ETH on parent chain Sepolia. 2. Bridge your parent chain Sepolia ETH into Arbitrum child chain using the Arbitrum bridge. ``` -------------------------------- ### Arbitrum Stylus Contract Development Guide Source: https://docs.arbitrum.io/stylus/stylus-content-map This section covers the fundamentals of developing smart contracts using Stylus on Arbitrum. It includes introductory concepts, quickstart guides, and details on the associated SDK and CLI tools. ```APIDOC Arbitrum Stylus Contract Development: - Introduction to Stylus Contracts - Basics of Stylus contract development. - Quickstart (Rust) - Get started quickly with Rust for Stylus. - Testnet Exploration - Information on using the testnet environment. - Stylus by Example - Learning Stylus through practical examples. - Stylus Rust SDK - In-depth guide to the Stylus Rust SDK. - Gas, Ink, and Caching - Strategies for gas optimization, ink usage, and caching. - CLI Tools (cargo-stylus) - Mastering the command-line interface for Stylus. - Run a Stylus Dev Node - Setting up and running a local development node. - Other Supported Languages - Overview of additional languages supported by Stylus. - Troubleshooting - Solutions for common development issues. - Source Code Repository - Access to the project's source code. - Public Preview - Information on the public preview of Stylus. ``` -------------------------------- ### Arbitrum Resources for Chain Operators Source: https://docs.arbitrum.io/welcome/get-started Guidance for chain operators on running specialized Arbitrum Rollup and AnyTrust chains. ```APIDOC Resource | Description ---|--- Arbitrum chains gentle introduction | Targeted at readers who want to understand Arbitrum chain's value proposition and use cases. ``` -------------------------------- ### Build and Serve Documentation Source: https://docs.arbitrum.io/for-devs/contribute Commands to build the translated documentation and start the development server. `yarn build-translation` processes the translations, and `yarn build` builds the static site. `npm run serve` starts the local development server. ```bash yarn build-translation &&yarn build ``` ```bash npm run serve ``` -------------------------------- ### Arbitrum Resources for Users Source: https://docs.arbitrum.io/welcome/get-started Provides resources for users interacting with the Arbitrum ecosystem, focusing on the bridge and dApp discovery. ```APIDOC Resource | Description ---|--- Arbitrum bridge | Lets you move `ETH` and `ERC-20` tokens between Ethereum, Arbitrum, and select Arbitrum (Orbit) chains. Arbitrum Portal | A directory of dApps on Arbitrum. Quickstart (bridge) | Provides step-by-step instructions for first-time bridge users. ``` -------------------------------- ### Run an Arbitrum Node Source: https://docs.arbitrum.io/node-running/node-running-content-map Guides on running different types of Arbitrum nodes, including installation, configuration, and troubleshooting. ```English Overview of node types Installation and configuration for running a full node Installation and configuration for running a local dev node Installation and configuration for running a validator node Setup an Arbitrum chain AnyTrust node Installation and configuration for running an archive node Installation and configuration for running a Classic node Keep your node in sync with the sequencer Infrastructure node list for using a node provider Beacon Chain provider list for Beacon Chain RPC providers ArbOS release list for ArbOS software releases Common issues and solutions for troubleshooting Frequently asked questions ``` -------------------------------- ### Arbitrum Technical Deep Dives Source: https://docs.arbitrum.io/welcome/get-started Provides in-depth technical explanations of Arbitrum's core technologies, including Nitro and AnyTrust. ```APIDOC Resource | Description ---|--- Inside Nitro | A technical deep dive into Nitro's architecture. Inside AnyTrust | A technical deep dive into the AnyTrust protocol. Arbitrum whitepaper | The original whitepaper that introduced Nitro. ``` -------------------------------- ### Install Arbitrum SDK Source: https://docs.arbitrum.io/sdk Instructions for installing the Arbitrum SDK using npm, yarn, and pnpm package managers. ```Shell npm install @arbitrum/sdk ``` ```Shell yarn add @arbitrum/sdk ``` ```Shell pnpm install @arbitrum/sdk ``` -------------------------------- ### Arbitrum Resources for Users Source: https://docs.arbitrum.io/index This table lists resources available for users interacting with the Arbitrum ecosystem, including the bridge and dApp discovery. ```APIDOC Resource | Description --|-- Arbitrum bridge | Lets you move `ETH` and `ERC-20` tokens between Ethereum, Arbitrum, and select Arbitrum (Orbit) chains. Arbitrum Portal | A directory of dApps on Arbitrum. Quickstart (bridge) | Provides step-by-step instructions for first-time bridge users. ``` -------------------------------- ### Cargo Stylus Commands Source: https://docs.arbitrum.io/stylus/stylus-quickstart Displays the available commands for `cargo-stylus`, a CLI toolkit for developing Stylus projects, including commands for project creation, deployment, and ABI export. ```APIDOC Cargo command for developing Stylus projects Usage: cargo stylus Commands: new Create a new Stylus project init Initializes a Stylus project in the current directory export-abi Export a Solidity ABI activate Activate an already deployed contract [aliases: a] cache Cache a contract using the Stylus CacheManager for Arbitrum chains check Check a contract [aliases: c] deploy Deploy a contract [aliases: d] verify Verify the deployment of a Stylus contract [aliases: v] cgen Generate c code bindings for a Stylus contract replay Replay a transaction in gdb [aliases: r] trace Trace a transaction [aliases: t] help Print this message or the help of the given command(s) Options: -h, --help Print help -V, --version Print version ``` -------------------------------- ### Arbitrum Suite Components Source: https://docs.arbitrum.io/index This table outlines the core components of the Arbitrum suite, detailing their purpose and function within the Arbitrum ecosystem. ```APIDOC Component | Description --|-- Arbitrum Rollup | A protocol for scaling Ethereum smart contracts. Arbitrum AnyTrust | A protocol for scaling Ethereum smart contracts even further, with a mild trust assumption. Arbitrum Nitro | The node software that codifies the Rollup and AnyTrust protocols. Arbitrum nodes | Machines that run Nitro in order to service and/or interact with an Arbitrum chain. Arbitrum One | A public Rollup chain. Arbitrum Nova | A public AnyTrust chain. Arbitrum bridge | Lets you move `ETH` and `ERC-20` tokens between Ethereum, Arbitrum, and select Arbitrum (Orbit) chains. Arbitrum (Orbit) chains | Lets you run your own Rollup and AnyTrust chains. Arbitrum Stylus | Lets you write EVM-compatible smart contracts in Rust and any other language that compiles to Wasm. ``` -------------------------------- ### Launch Nitro Devnode Source: https://docs.arbitrum.io/stylus/quickstart Executes the script to launch the Arbitrum Nitro devnode, providing a pre-funded wallet for transaction testing. ```Shell ./run-dev-node.sh ``` -------------------------------- ### Estimate Gas for Stylus Contract Deployment Source: https://docs.arbitrum.io/stylus/stylus-quickstart Estimates the gas required for deploying a Stylus contract. Requires specifying the endpoint and a private key. ```Rust cargo stylus deploy \ --endpoint='http://localhost:8547' \ --private-key="0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659" \ --estimate-gas ``` -------------------------------- ### Wait for Transaction Receipt Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Uses the public client to wait for the transaction receipt, confirming that the transaction has been successfully mined on the blockchain. ```javascript useEffect(() => { (async () => { if (hash) { const receipt = await publicClient.waitForTransactionReceipt({ hash }); setReceipt(receipt); } })(); }, [hash]); ``` -------------------------------- ### Connect Wallet Function Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide A function to connect the user's wallet using the wallet client and retrieve their account address. ```javascript const connect = async () => { const [address] = await walletClient.requestAddresses(); setAccount(address); }; ``` -------------------------------- ### View Contract on Arbiscan Source: https://docs.arbitrum.io/build-decentralized-apps/quickstart-solidity-remix Instructions on how to view a deployed smart contract on the Arbiscan block explorer. ```APIDOC Visit https://sepolia.arbiscan.io/address/0x...B3, but replace the 0x...B3 part of the URL with the full address of your deployed smart contract. ``` -------------------------------- ### Successful Stylus Contract Deployment Output Source: https://docs.arbitrum.io/stylus/quickstart Indicates a successful contract deployment and activation, providing the deployed contract address and the transaction hash. ```APIDOC deployed code at address: 0x33f54de59419570a9442e788f5dd5cf635b3c7ac deployment tx hash: 0xa55efc05c45efc63647dff5cc37ad328a47ba5555009d92ad4e297bf4864de36 wasm already activated! ``` -------------------------------- ### Deploy Stylus Contract Source: https://docs.arbitrum.io/stylus/quickstart Deploys a Stylus contract to the specified endpoint using the provided private key. This process involves sending two transactions: contract deployment and activation. ```Rust cargo stylus deploy \ --endpoint='http://localhost:8547' \ --private-key="0xb6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659" ``` -------------------------------- ### Arbitrum Resources for Chain Operators Source: https://docs.arbitrum.io/index This table provides resources for chain operators managing custom Arbitrum chains, focusing on their value proposition and use cases. ```APIDOC Resource | Description --|-- Arbitrum chains gentle introduction | Targeted at readers who want to understand Arbitrum chain's value proposition and use cases. ``` -------------------------------- ### Configure Metamask for Local Testnet Source: https://docs.arbitrum.io/build-decentralized-apps/quickstart-solidity-remix Instructions for setting up Metamask to connect to a local Ethereum test network. This involves enabling test networks, adding a custom network with specific RPC details, and importing a private key for testnet funds. ```APIDOC Metamask Configuration: Enable Test Networks: Click 'Show/hide test networks'. Add Network: - Click network selector dropdown. - Click 'Add Network'. - Click 'Add a network manually'. - Network Name: `localhost` - New RPC URL: `http://127.0.0.1:8545` - Chain ID: `31337` - Currency Symbol: `ETH` Import Test Account: - Copy private key (e.g., `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80`). - Import into Metamask. - Confirm connection to Remix when prompted. ``` -------------------------------- ### Send USDC Transaction Source: https://docs.arbitrum.io/for-devs/third-party-docs/Circle/usdc-quickstart-guide Encodes the USDC transfer function data and sends the transaction using the wallet client, initiating the USDC transfer. ```javascript const data = encodeFunctionData({ abi: USDC_ABI, functionName: 'transfer', args: [to, valueInWei], }); const hash = await walletClient.sendTransaction({ account, to: USDC_CONTRACT_ADDRESS, data, }); ```