diff --git a/docs/build/EVM/chainide-for-astar-evm/_category_.json b/docs/build/EVM/chainide-for-astar-evm/_category_.json new file mode 100644 index 000000000..26bdd4fc0 --- /dev/null +++ b/docs/build/EVM/chainide-for-astar-evm/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "ChainIDE for Astar EVM", + "position": 2 +} \ No newline at end of file diff --git a/docs/build/EVM/chainide-for-astar-evm/index.md b/docs/build/EVM/chainide-for-astar-evm/index.md new file mode 100644 index 000000000..ac114bd8b --- /dev/null +++ b/docs/build/EVM/chainide-for-astar-evm/index.md @@ -0,0 +1,5 @@ +# ChainIDE for Astar EVM + +"ChainIDE for Astar" is the first multi-chain cloud-powered IDE and development platform for Astar WASM & EVM. Extending on top of our experience with ChainIDE, ChainIDE for Astar is packed with the tooling, pre-made templates & tutorials for kickstarting Astar dApp development in a fully cloud-based environment. + +![](https://chainide.com/static/ead2903c7c2ac312b3b86ca4c8fe13ab/26ebd/astar-evm.webp) diff --git a/docs/build/EVM/chainide-for-astar-evm/setup.md b/docs/build/EVM/chainide-for-astar-evm/setup.md new file mode 100644 index 000000000..13177920e --- /dev/null +++ b/docs/build/EVM/chainide-for-astar-evm/setup.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 1 +--- + +# ChainIDE for Astar Environment Setup + +> This section provides a detailed explanation of the environment configuration for Astar IDE, which is essential for developing dApp on the Astar blockchain. + +### 1. Create a new Astar Project + +Visit [ChainIDE](chainide.com) and click the "Try Now" button on the front page as shown in the figure below. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FHcGG1r0m832Y05z1D7VT%2Fimage.png?alt=media&token=2ba1b1c0-7bc2-49cc-b08e-35c29934f19f) + +Here, you will choose your login method, which includes two options: GitHub and Guest. In the tutorial, select GitHub login, as later on, the use of the Sandbox requires users to log in with GitHub. + +Click the "New Project" button. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FFaeBrBu7u5LUAxQynl1r%2Fimage.png?alt=media&token=7a988e98-415c-442e-a137-080f2dbd0372) + +A pop-up window will appear. On the left side of the pop-up, select "Astar," and on the right side, choose the corresponding smart contract environment (EVM or WASM). Then, click to create a project using a template. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FtlDKHhGPOGacmVNHCOgE%2Fimage.png?alt=media&token=92b6347b-346e-420b-92c9-7684078338cd) + +### 2. Configure Wallet + +Astar IDE provides support for two smart contract environments: EVM and WASM. EVM is compatible with the Metamask wallet, while WASM supports four wallets: Polkadot Wallet, Sub Wallet, Math Wallet, and Talisman Wallet. + +#### 2.1 Wallets Supporting EVM + +##### 2.1.1 Metamask (Recommended) + +> https://metamask.io/ + +#### 2.2 Wallets Supporting WASM + +##### 2.2.1 Polkadot Wallet (Recommended) + +> https://polkadot.js.org/extension/ + +##### 2.2.2 Sub Wallet + +> https://www.subwallet.app/ + +##### 2.2.3 Math Wallet + +> https://mathwallet.org/ + +##### 2.2.4 Talisman Wallet + +> https://www.talisman.xyz/ + +### 3. Acquiring test tokens + +A faucet is the site/place where you can get test tokens. Faucets are available for all Shibuya accounts and empty Astar and Shiden accounts. Use them to make sure your wallet has enough assets to cover the cost of deployment and pay transaction gas + +Tutorial on Acquiring Test Tokens: https://docs.astar.network/docs/build/environment/faucet diff --git a/docs/build/EVM/chainide-for-astar-evm/use.md b/docs/build/EVM/chainide-for-astar-evm/use.md new file mode 100644 index 000000000..8548a9c14 --- /dev/null +++ b/docs/build/EVM/chainide-for-astar-evm/use.md @@ -0,0 +1,103 @@ +--- +sidebar_position: 2 +--- + +# How to Use Astar EVM IDE? + +> Set the entire process of writing, compiling, deploying, interacting, and querying with Astar EVM smart contracts + + + +### 1. Write a contract + +Upon entering the project, the README.md file included in the folder will be automatically previewed. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FXlOvuSg0NjRdEaR8zpad%2Fimage.png?alt=media&token=fccb3f22-8cd5-4047-bf5f-80b5cc3e21b4) + +In the Explorer panel, you can create new files (or folders), refresh the directory, and download files. You can also directly click on the files that come with the template. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FE2cSwSZdbKLZK5YN7XGK%2Fimage.png?alt=media&token=47ea9493-d238-474e-ab62-17a9d1f83dd3) + +Click on a contract file to edit the code. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fc3NCif0cmQb6idg1jY4z%2Fimage.png?alt=media&token=a3bfae68-88a5-480d-b296-de50afd1b019) + +### 2. Compile the contract + +Once your contract code is written, click on the "Compiler" button in the right-side menu to open the compilation module. Choose the compiler version and decide whether to enable optimization, then click "Compile \*\*\*.sol" to initiate the compilation. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FQZbNokWNSvFgonXwTbJp%2Fimage.png?alt=media&token=0e4f3887-8b97-413d-8517-fcaead085d62) + +After successful compilation, the ABI and BYTE CODE will be displayed below, and you'll see a message in the console stating "Compile contract success." + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FczE48oDmrmEi2hNWpGds%2Fimage.png?alt=media&token=3f51d9b4-063e-48dd-a60e-b13b54bc0781) + +### 3. Connect to Astar EVM + +Before deploying the contract, you need to click on "Connect Wallet" in the upper right corner and select to connect to JavaScript VM (used for testing, implemented in JavaScript) or Metamask (for deployment on the Astar blockchain). + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FLRhasXHh6XnfX6AsxOko%2Fimage.png?alt=media&token=81c389b6-c8b0-43c2-a26e-7f5ee01d60c9) + +### 4. Deploy the contract + +Click the "Deploy & Interaction" button on the right-hand side, which will bring up the deployment and interaction pages. Select the compiled contract and click "Deploy" to initiate the deployment (then confirm in Metamask). After successful contract deployment, the console will display the contract deployment result and relevant information. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fln6jNoeLtMlVkXYdRToD%2Fimage.png?alt=media&token=f45eeeb9-5a03-4f1b-9d30-7381903497bd) + +In addition, you can click "Import Deployed Contract" to import a contract that has already been deployed for contract interactions. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fvs7JD4L1ByOYlg609PKg%2Fimage.png?alt=media&token=492fd5a0-21d4-45d3-af3d-46a9980c6800) + +### 5. Contract interaction + +After a successful contract deployment, you can interact with the contract. Click on the deployed contract, choose the corresponding interface, and click "Submit" or "Get" to perform interactions. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F2W7d4EBGj5c5cZ4DdJTH%2Fimage.png?alt=media&token=15101c1a-a115-44ba-be8f-b30621d35528) + +### 6. Transaction Query + +Click on the transaction hash in the Output section to view the specific details of each transaction. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FhPClEEbEHXfKlahiWt1V%2Fimage.png?alt=media&token=8f6caec5-6be4-44bb-bdc7-11dee067ee14) + +### 7. Verify the contract + +Click on the "Scan Verifier" plugin on the right, select the contract you want to verify, enter the deployed contract address, and click "Verify." + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FB6FyC40PqzdcwYJjWlKv%2Fimage.png?alt=media&token=b61e484d-4ced-4a1b-a58e-d28cea41d85c) + +After successful verification, you can view the link to the verified contract on BlockScout scan. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FwFhSzT1bdiDYld5cWQJt%2Fimage.png?alt=media&token=a8b1cdf7-658b-43d7-8608-88fb49fe2ef7) + +### 8. Astar EVM Sandbox + +If you prefer using the command line for development, you can open the Astar EVM Sandbox, which comes pre-loaded with [Hardhat](https://hardhat.org/), [Truffle](https://trufflesuite.com/), [Brownie](https://eth-brownie.readthedocs.io/en/stable/) [Ganache](https://trufflesuite.com/ganache/), [Git](https://git-scm.com/) and [Node.js V16](https://nodejs.org/en). + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F246ekmxAbc8yLacVah0J%2Fimage.png?alt=media&token=db1d1d7c-a38c-4c8c-b39a-1053eaa97787) + +### 9. serve your dApp + +ChainIDE Sandbox makes it easier to develop full-stack dApps by providing powerful features such as port-forwarding. This means you can build a frontend for your Astar dApps using frontend frameworks (React/Vue/VanillaJS) in the browser. To build the frontend for Astar dApps, please use Voting dApp or Hardhat dApp Wave template. Follow the steps below showcasing how the port manager can be used to access the frontend. + +#### 9.1 Open Port Manager + +Click on the left side's Port Manager + +![image-20231026183219456](https://d3gvnlbntpm4ho.cloudfront.net/astar_evm_Ide/image-20231026183219456.png) + +Click on "Add Port" + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FjsLBwBqMkYaUC6DLktk2%2Fimage.png?alt=media&token=722f87a8-4ba3-4f2a-8086-a6d1cb6ebcc9) + +Select the relevant options and click "Add" + +![image-20231026183248705](https://d3gvnlbntpm4ho.cloudfront.net/astar_evm_Ide/image-20231026183248705.png) + +#### 10.2 Access the frontend + +Click the jump button to access the corresponding port + +![image-20231026183332884](https://d3gvnlbntpm4ho.cloudfront.net/astar_evm_Ide/image-20231026183332884.png) + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FvICzLC9sWXColFYm4WQg%2Fimage.png?alt=media&token=1043c42d-8c65-40b4-907d-99921105e428) diff --git a/docs/build/wasm/chainide-for-astar-wasm/_category_.json b/docs/build/wasm/chainide-for-astar-wasm/_category_.json new file mode 100644 index 000000000..55060ca1a --- /dev/null +++ b/docs/build/wasm/chainide-for-astar-wasm/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "ChainIDE for Astar WASM", + "position": 7 +} \ No newline at end of file diff --git a/docs/build/wasm/chainide-for-astar-wasm/index.md b/docs/build/wasm/chainide-for-astar-wasm/index.md new file mode 100644 index 000000000..00fa41e27 --- /dev/null +++ b/docs/build/wasm/chainide-for-astar-wasm/index.md @@ -0,0 +1,5 @@ +# ChainIDE for Astar WASM + +"ChainIDE for Astar" is the first multi-chain cloud-powered IDE and development platform for Astar WASM & EVM. Extending on top of our experience with ChainIDE, ChainIDE for Astar is packed with the tooling, pre-made templates & tutorials for kickstarting Astar dApp development in a fully cloud-based environment. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FahFXXhBvi6RCafGk7gFa%2Fimg_v2_c2f3adee-2848-4a42-ae87-ab50c8efb6ah.png?alt=media&token=8d1332f8-35b1-49e2-8844-9049d538fd8c) diff --git a/docs/build/wasm/chainide-for-astar-wasm/setup.md b/docs/build/wasm/chainide-for-astar-wasm/setup.md new file mode 100644 index 000000000..554bbd8bc --- /dev/null +++ b/docs/build/wasm/chainide-for-astar-wasm/setup.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 1 +--- + +# ChainIDE for Astar Environment Setup + +> This section provides a detailed explanation of the environment configuration for Astar IDE, which is essential for developing dApp on the Astar blockchain. + +### 1. Create a new Astar project + +Visit [ChainIDE](chainide.com) and click the "Try Now" button on the front page as shown in the figure below. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FHcGG1r0m832Y05z1D7VT%2Fimage.png?alt=media&token=2ba1b1c0-7bc2-49cc-b08e-35c29934f19f) + +Here, you will choose your login method, which includes two options: GitHub and Guest. We suggest you choose login with Github as later on the use of Sandbox requires users to log in with GitHub. + +Click the "New Project" button. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FFaeBrBu7u5LUAxQynl1r%2Fimage.png?alt=media&token=7a988e98-415c-442e-a137-080f2dbd0372) + +A pop-up window will appear. On the left side of the pop-up, select “Astar,” and on the right side, choose the corresponding smart contract environment (EVM or WASM). Then, click to create a project using a template. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FtlDKHhGPOGacmVNHCOgE%2Fimage.png?alt=media&token=92b6347b-346e-420b-92c9-7684078338cd) + +### 2. Configure Wallet + +Astar IDE provides support for two smart contract environments: EVM and WASM. EVM is compatible with the Metamask wallet, while WASM supports four wallets: Polkadot Wallet, Sub Wallet, Math Wallet, and Talisman Wallet. + +#### 2.1 Wallets Supporting EVM + +##### 2.1.1 Metamask (Recommended) + +> https://metamask.io/ + +#### 2.2 Wallets Supporting WASM + +##### 2.2.1 Polkadot Wallet (Recommended) + +> https://polkadot.js.org/extension/ + +##### 2.2.2 Sub Wallet + +> https://www.subwallet.app/ + +##### 2.2.3 Math Wallet + +> https://mathwallet.org/ + +##### 2.2.4 Talisman Wallet + +> https://www.talisman.xyz/ + +### 3. Acquiring test tokens + +A faucet is the site/place where you can get test tokens. Faucets are available for all Shibuya accounts and empty Astar and Shiden accounts. Use them to make sure your wallet has enough assets to cover the cost of deployment and pay transaction gas + +Tutorial on Acquiring Test Tokens: https://docs.astar.network/docs/build/environment/faucet diff --git a/docs/build/wasm/chainide-for-astar-wasm/use.md b/docs/build/wasm/chainide-for-astar-wasm/use.md new file mode 100644 index 000000000..120bbd205 --- /dev/null +++ b/docs/build/wasm/chainide-for-astar-wasm/use.md @@ -0,0 +1,155 @@ +--- +sidebar_position: 2 +--- + +# How to Use Astar WASM IDE? + +> Set up the entire process of writing, compiling, deploying, interacting, querying, and verifying with Astar WASM smart contracts." + + + +### 1. Write a contract + +Upon entering the project, the README.md file included in the folder will be automatically previewed. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FWeeVCEJ73jLedlRAKoxV%2Fimage.png?alt=media&token=e4e05e51-afb8-4b49-be38-062ea3675e63) + +In the Explorer panel, you can create new files (or folders), refresh the directory, and download files. You can also directly click on the files that come with the template. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FGGYdT9agJlf7Ph0rXSms%2Fimage.png?alt=media&token=1c1f82a8-78d9-4c8b-bcaf-5d59630fe08d) + +Click on a contract file to edit the code. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FMY5bewzZ7DfGwGO5nWRR%2Fimage.png?alt=media&token=c35a9405-7926-46c3-b2eb-76743a579761) + +### 2. Compile the contract + +Once the contract code is written, click the "Compiler" button on the right-hand menu to open the compilation module. Choose whether to enable "release" and "nightly" (usually not required), and then click "Build \*\*\*.rs" to initiate the compilation. + +> Compiling WASM contracts takes a few minutes, so in the meantime, we can proceed with the next step. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FY0tSy2rK1GwK9ZuTNA9s%2Fimage.png?alt=media&token=18a9fb40-1ee5-43cf-a0c1-2f8fd5ebf0d2) + +After a successful compilation, the left-hand Explorer panel will display the "target/ink" folder, and within that folder, you will find the "\*\*\*.contract" file (used for deploying the contract). + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FnWu7x82UnQDLddSCaCX5%2Fimage.png?alt=media&token=db9683ac-a6ed-4484-aaa9-1c7fe95a8c63) + +### 3. Connect to Astar WASM + +Before deploying the contract, you need to click on "Connect Wallet" in the upper right corner, choose your wallet, and use it to connect to the Astar blockchain. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FqGHKAWaMl6bWi3Yd8n9s%2Fimage.png?alt=media&token=c59a0e98-ee1a-4bbe-8a5c-2e79957c8601) + +By default, it's connected to the Shibuya testnet. If you need to switch to another network, you can click on "Shibuya Testnet" in the bottom right corner to change the network. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FurEAknTY3HMezZCJ1Aqc%2Fimage.png?alt=media&token=806e022a-9d70-40c0-a7c4-71d9e0be2de5) + +ChainIDE supports switching between four networks: Astar Mainnet, Shibuya Testnet, Shiden Mainnet, and Custom Network. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FVTfQUs58NQqPzSK13rlF%2Fimage.png?alt=media&token=fd67febc-4540-42de-8231-f998568e132d) + +#### 3.1 Connect to Swanky Node + +> Swanky Node is a Substrate-based blockchain designed to facilitate local development of Wasm smart contracts. If you require a substantial amount of tokens for testing and have high-speed interaction requirements, this section is worth exploring. + +ChainIDE has integrated a graphical Swanky Node. Click on "Astar Swanky Node" on the right-hand side and then click "Start." + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fd9ryBSYgJDzZ4hLYgqV8%2Fimage.png?alt=media&token=b0084087-ea1b-4b00-8156-86a87a3d8e9e) + +Wait for a few seconds until the Sandbox displays the following two lines. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FkTXeTf1tKbEUAa9fWk00%2Fimage.png?alt=media&token=43f82d46-7072-46e7-8c47-5acdd9e83a75) + +Click on the "Jump" link in the Faucet URL to obtain test tokens on the Swanky Node's local network. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FFMlEK1IRGNY2P5aiKjCX%2Fimage.png?alt=media&token=e789cfb3-b618-43c6-8e55-334637776c22) + +Choose an account with tokens and transfer some tokens to your own wallet. + +![](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FztN6TAtFx1xaNFrrGqff%2Fimage.png?alt=media&token=5b670d83-2a54-4294-816f-735af8ad6e1b) + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FAfXYIT7xUDBJLGFhyfHp%2Fimage.png?alt=media&token=c68e5db1-ab22-40b4-b34a-970027cff32f) + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FdtwiBB7VmQ9lG6bf6XXO%2Fimage.png?alt=media&token=e1a0a625-c594-4203-9dfe-c748cb7a6e7c) + +Return to the ChainIDE for Astar page and copy the WebSocket URL. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FTLwkw4HDVbuZaj2N9LGR%2Fimage.png?alt=media&token=ac675926-b03e-415f-b0b8-b27d9b8a6246) + +Refer to [step 3, "Connect to Astar WASM"](#3. Connect to Astar WASM), select "Custom Mode," and enter the WebSocket URL you copied in the previous step. Then, click "Switch." + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FQU3zJmkPbnd34GGwg7xS%2Fimage.png?alt=media&token=c17229e2-53e0-4eb4-999f-071566dd4d92) + +Congratulations, you have successfully switched to the Swanky Node local network. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F3cfN5dOiVj9CtQVoMY3u%2Fimage.png?alt=media&token=0dda4980-ab7d-414d-aa37-594505930847) + +### 4. Deploy the contract + +Click the "Deploy & Interaction" button on the right-hand side, which will bring up the deployment and interaction pages. Select the compiled contract, click "Deploy" to initiate the deployment (then confirm in your wallet). After successful contract deployment, the console will display the contract deployment result and relevant information. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F7M7qeIO6QoBFgLGeAdlT%2Fimage.png?alt=media&token=56f3e375-0ac9-49b6-a2e1-dc855b433204) + +In addition, you can click on "Import Deployed Contract" to import contracts that have already been deployed, or you can use "On-Chain Contract Code" to deploy contracts using a CodeHash. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FhetQ818kb3arcnxtWpje%2Fimage.png?alt=media&token=d80aa523-7cda-4658-8bf7-a4d8d56e90be) + +### 5. Contract interaction + +After a successful contract deployment, you can interact with the contract. Click on the deployed contract, choose the corresponding interface, and click "Submit" or "Get" to perform interactions. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FrCHoqS8429KSMrp5KDl9%2Fimage.png?alt=media&token=38e8385e-d8de-4694-a449-0fbae10c6dc9) + +### 6. Transaction Query + +Click on the transaction hash in the Output section to view the specific details of each transaction. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F1RJBRpDyZB2TD7rooN3D%2Fimage.png?alt=media&token=61cfa1b7-eb1c-45c2-aa15-26ab1493f07a) + +### 7. Contract verification + +Contracts compiled using ChainIDE can be submitted to Polkaholic for contract verification. + +Click the "Scan Verifier" button on the right-hand side, select the network, code hash, and public mode, then click "Publish Verified Code" to initiate the contract verification process. + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fi2XKtzbpnFhA4n4cRR9O%2Fimage.png?alt=media&token=fe8d392f-5661-4c33-9c6f-9666a5349efb) + +### 8. View WASM Developer dashboard + +ChainIDE and Polkaholic have collaborated to develop the WASM Developer Dashboard. + +Click the "WASM Developer Dashboard" button on the right-hand side to view information such as "Recent Code Stored," "Recent Contracts Instantiated," and "Recent Calls." + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fdq8uRpcEo4iIXiropWEe%2Fimage.png?alt=media&token=a537caf0-4463-4b19-a0d7-95dd558241f1) + +### 9. Astar WASM Sandbox + +If you prefer command-line development, you can open the Astar WASM Sandbox, which comes pre-loaded with [Swanky Suite](https://docs.astar.network/docs/build/wasm/swanky-suite/), [Git](https://git-scm.com/) and [Node.js V16](https://nodejs.org/en). + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FehdI1phVyiBrFrREipp1%2Fimage.png?alt=media&token=52e289cf-4e15-4b46-94b2-cadfebaf58f8) + +### 10. Serve your dApp + +ChainIDE Sandbox makes it easier to develop full-stack dApps by providing powerful features such as port-forwarding. To build the frontend for Astar dApps, you can utilize the magink-dApp template (ref: https://github.com/inkdevhub/magink-dapp) inside ChainIDE and build and test the frontend alongside smart contracts. Follow the below steps to set up the port manager to access the frontend. + +#### 10.1 Open Port Manager + +Click on the left side's Port Manager + +![image-20231026171540725](https://d3gvnlbntpm4ho.cloudfront.net/astar_wasm_ide/image-20231026171540725.png) + +Click on "Add Port" + +![img](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FjsLBwBqMkYaUC6DLktk2%2Fimage.png?alt=media&token=722f87a8-4ba3-4f2a-8086-a6d1cb6ebcc9) + +Select the relevant options and click "Add" + +![image-20231026171611778](https://d3gvnlbntpm4ho.cloudfront.net/astar_wasm_ide/image-20231026171611778.png) + +#### 10.2 Access the frontend + +Click the jump button to access the corresponding port + +![image-20231026171651956](https://d3gvnlbntpm4ho.cloudfront.net/astar_wasm_ide/image-20231026171651956.png) + +![image-20231026171710121](https://d3gvnlbntpm4ho.cloudfront.net/astar_wasm_ide/image-20231026171710121.png)