diff --git a/docs/code/deploy-and-run/aptos.md b/docs/code/deploy-and-run/aptos.md index dfc3b576b..c51145d27 100644 --- a/docs/code/deploy-and-run/aptos.md +++ b/docs/code/deploy-and-run/aptos.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 description: Deploy and Run Aptos Smart Contract keywords: [Deploy and Run, Aptos, Smart Contract] --- diff --git a/docs/code/deploy-and-run/arbitrum.md b/docs/code/deploy-and-run/arbitrum.md new file mode 100644 index 000000000..8ab552f1f --- /dev/null +++ b/docs/code/deploy-and-run/arbitrum.md @@ -0,0 +1,100 @@ +--- +sidebar_position: 2 +description: Deploy and Run Arbitrum Smart Contract +keywords: [Deploy and Run, Arbitrum, Smart Contract] +--- + +# Arbitrum + +## Connect to WELLDONE Code + +You can activate the **WELLDONE Code** plugin by accessing this deep link: [WELLDONE Code Remix Plugin](https://remix.ethereum.org/?#activate=wds-code-remix). + +## Add Network to MetaMask + +Before you start deploying contracts on the Arbitrum network, you need to add the network to your MetaMask wallet. Follow these steps: + +1. Open MetaMask and click on the network dropdown at the top. +2. Select **Add Network**. +3. Enter the following network details: +- **Network Name:** Stylus V2 +- **New RPC URL:** `https://stylusv2.arbitrum.io/rpc` +- **Chain ID:** `13331371` +- **Currency Symbol:** ETH +- **Block Explorer URL (Optional):** `https://stylusv2-explorer.arbitrum.io/` + +4. Click **Save**. + +Now you have successfully added the Arbitrum network to your MetaMask wallet. + +## Create the Project + +In Arbitrum Stylus, you can write smart contracts with Rust language. **WELLDONE Code** provides two features to help developers new to Stylus. + +### Create Template + +Create a simple example contract code written in Rust. You can create a sample contract by selecting the template option and clicking the `Create` button. More templates may be found at [Stylus Samples](https://github.com/OffchainLabs/stylus-workshop-rust-solidity). + +template-code-arbitrum + +### New Project + +Automatically generate a contract structure. Click the `Create` button to create a contract structure. + +:::info +You can create your own contract projects without using the features above. However, for the remix plugin to build and deploy the contract, it must be built within the directory `arbitrum/`. If you start a new project, the structure should look like the following. +::: + +#### Writing Contracts in Rust + ``` + neutron + └── + ├── Cargo.toml + └── src + └── contract.rs + └── examples + └── schema.rs + ``` + +## Compile the Contract + +:::info +We now only support the AMD compilation server. The build environment is crucial for contract verification due to the non-deterministic nature of building Rust into Wasm. +::: + +**Step 1**: Select the project you want to compile in the **TARGET PROJECT** section. + +**Step 2**: Select a compilation option and click the `Compile` button. + +**Step 3**: When the compilation is complete, a tx_data and abi files are returned. + +arbitrum-compile + + +:::note +You can check the returned tx_data file and abi file in `neutron//output`. + +When you run the recompilation, the existing `output` folders will be deleted and the compilation process will start anew. +::: + +## Deploy the Contract +The deployment stage involves uploading the compiled WebAssembly (WASM) smart contract code to the blockchain. This step is necessary to make the smart contract available for use on the blockchain. + +### When is Deployment Needed? +- **New Contracts:** When deploying a new smart contract to the blockchain for the first time. +- **Contract Updates:** When changing the core logic or adding new functionalities to the smart contract, requiring a new version to be deployed. + +arbitrum-contract + +## Activate the Contract +The activation stage ensures that the deployed contract is fully operational and can be interacted with on the Arbitrum network. This step verifies that the contract is ready for actual use. + +#### When is Activation Needed? +- **Post-Deployment:** After deploying the contract, activation is needed to ensure the contract is recognized by the network and fully operational. +- **Re-Deployments:** When redeploying an updated version of the contract, activation ensures that the new version is properly initialized and functional. + +## Execute the Contract + +**Step 1**: Select the method to run. + +**Step 2**: Add parameters as you needed. \ No newline at end of file diff --git a/docs/code/deploy-and-run/celo.md b/docs/code/deploy-and-run/celo.md index 9cf196a70..81b43553d 100644 --- a/docs/code/deploy-and-run/celo.md +++ b/docs/code/deploy-and-run/celo.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 7 description: Deploy and Run Celo Smart Contract keywords: [Deploy and Run, Celo, Smart Contract] --- diff --git a/docs/code/deploy-and-run/img/arbitrum-compile.png b/docs/code/deploy-and-run/img/arbitrum-compile.png new file mode 100644 index 000000000..b3f552bd2 Binary files /dev/null and b/docs/code/deploy-and-run/img/arbitrum-compile.png differ diff --git a/docs/code/deploy-and-run/img/arbitrum-contract.png b/docs/code/deploy-and-run/img/arbitrum-contract.png new file mode 100644 index 000000000..04e019501 Binary files /dev/null and b/docs/code/deploy-and-run/img/arbitrum-contract.png differ diff --git a/docs/code/deploy-and-run/img/template-code-arbitrum.png b/docs/code/deploy-and-run/img/template-code-arbitrum.png new file mode 100644 index 000000000..7d54d5b9a Binary files /dev/null and b/docs/code/deploy-and-run/img/template-code-arbitrum.png differ diff --git a/docs/code/deploy-and-run/juno.md b/docs/code/deploy-and-run/juno.md index a10f20208..2628a942c 100644 --- a/docs/code/deploy-and-run/juno.md +++ b/docs/code/deploy-and-run/juno.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 8 description: Deploy and Run Juno Smart Contract keywords: [Deploy and Run, Juno, Smart Contract] --- diff --git a/docs/code/deploy-and-run/klaytn.md b/docs/code/deploy-and-run/klaytn.md index cface79a1..64351ad1e 100644 --- a/docs/code/deploy-and-run/klaytn.md +++ b/docs/code/deploy-and-run/klaytn.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 9 description: Deploy and Run Klaytn Smart Contract keywords: [Deploy and Run, Klaytn, Smart Contract] --- diff --git a/docs/code/deploy-and-run/near.md b/docs/code/deploy-and-run/near.md index b0b2a649d..24928e349 100644 --- a/docs/code/deploy-and-run/near.md +++ b/docs/code/deploy-and-run/near.md @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 6 description: Deploy and Run NEAR Smart Contract keywords: [Deploy and Run, NEAR, Smart Contract] --- diff --git a/docs/code/deploy-and-run/neutron.md b/docs/code/deploy-and-run/neutron.md index d19de959c..d01bbceab 100644 --- a/docs/code/deploy-and-run/neutron.md +++ b/docs/code/deploy-and-run/neutron.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 5 description: Deploy and Run Neutron Smart Contract keywords: [Deploy and Run, Neutron, Smart Contract] --- diff --git a/docs/code/deploy-and-run/sui.md b/docs/code/deploy-and-run/sui.md index 02e8d45fc..806404234 100644 --- a/docs/code/deploy-and-run/sui.md +++ b/docs/code/deploy-and-run/sui.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 description: Deploy and Run Sui Smart Contract keywords: [Deploy and Run, Sui, Smart Contract] --- diff --git a/docs/code/getting-started.md b/docs/code/getting-started.md index 2305c69b3..fcd50f10a 100644 --- a/docs/code/getting-started.md +++ b/docs/code/getting-started.md @@ -35,6 +35,7 @@ Refer to the table below for the chains and their supported wallets: | Chain | Supported Wallets | |-------------|--------------------------| +| Arbitrum | **MetaMask** | | Neutron | **Keplr Wallet**, **WELLDONE Wallet** | > **Note:** We plan to add more wallets for other chains, so keep an eye on plugin updates for the latest supported wallets.