|
| 1 | +# Quick Start Guide for Artela EVM++ with Rollkit |
| 2 | + |
| 3 | +<script setup> |
| 4 | +import constants from '../.vitepress/constants/constants.js' |
| 5 | +</script> |
| 6 | + |
| 7 | +This guide will assist you to quickly set up a rollup node with [Artela EVM++](https://docs.artela.network/main/Artela-Blockchain/EVM++) execution layer using Rollkit and local-DA. |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +EVM++ is a modular dual-VM execution layer that supports the dynamic creation of native extension modules for blockchain at runtime. It enables developers to leverage WasmVM to build native extensions that co-process with EVM, offering enhanced customization capabilities. More than just a dual-VM setup, these native extensions facilitate blockchain-level customization. They allow for the integration of custom logic throughout the transaction lifecycle, providing access to an expanded runtime context. |
| 12 | + |
| 13 | +## 📦 Clone the Artela Rollkit Repository |
| 14 | + |
| 15 | +Start by cloning the Artela Rollkit repository: |
| 16 | + |
| 17 | +```bash |
| 18 | +git clone https://github.com/artela-network/artela-rollkit.git |
| 19 | +cd artela-rollkit |
| 20 | +``` |
| 21 | + |
| 22 | +## 🛥️ Run with Docker Compose |
| 23 | + |
| 24 | +Ensure Docker is installed on your system before setting up the Artela rollup node. If not already installed, download and follow the setup instructions available [here](https://www.docker.com/products/docker-desktop/). |
| 25 | + |
| 26 | +After installing Docker, run the following command to start a local development node: |
| 27 | + |
| 28 | +```bash |
| 29 | +docker compose up -d |
| 30 | +``` |
| 31 | + |
| 32 | +This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command: |
| 33 | + |
| 34 | +```bash |
| 35 | +docker logs artroll -f |
| 36 | +``` |
| 37 | + |
| 38 | +If you observe the following output, the local development node is running properly: |
| 39 | + |
| 40 | +```bash |
| 41 | +... |
| 42 | +7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0 |
| 43 | +7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager |
| 44 | +7:09AM INF indexed block events height=3 module=txindex |
| 45 | +7:09AM INF Creating and publishing block height=4 module=BlockManager |
| 46 | +... |
| 47 | +``` |
| 48 | + |
| 49 | +## 🔑 Get prefunded test accounts |
| 50 | + |
| 51 | +Access testing accounts by entering the `artroll` Docker container: |
| 52 | + |
| 53 | +```bash |
| 54 | +docker exec -ti artroll /bin/bash |
| 55 | +``` |
| 56 | + |
| 57 | +Retrieve the address and private key of testing accounts using: |
| 58 | + |
| 59 | +```bash |
| 60 | +# 👇 Alternatively, you can use myKey2.info, myKey3.info, myKey4.info |
| 61 | +./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test |
| 62 | +``` |
| 63 | + |
| 64 | +This will display the testing private key and its address: |
| 65 | + |
| 66 | +```bash |
| 67 | +private key: { Plain Private Key in Hex Format } |
| 68 | +address: { Address Associated with the Private Key } |
| 69 | +``` |
| 70 | +
|
| 71 | +There are four testing accounts available in the local development node for interacting with the EVM chain. |
| 72 | +
|
| 73 | +## 🧪 Build on EVM++ |
| 74 | +
|
| 75 | +Let’s dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials: |
| 76 | +
|
| 77 | +👉 [Contract interaction tutorial](/tutorials/evm-contract-interaction): Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node. |
| 78 | +
|
| 79 | +:::tip |
| 80 | +When you are following the Contract interaction tutorial, you need to make the following replacements: |
| 81 | +1. Use https://github.com/artela-network/gm-portal.git instead of the original `gm-portal` repo. |
| 82 | +2. Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial. |
| 83 | +3. The contract address should be `0x9fcEbD70654D360b41ccD123dADAAad6ce13C788` instead of the one starts with `0x18D...`. |
| 84 | +::: |
| 85 | +
|
| 86 | +👉 [Quick Start for Aspect on EVM++](https://docs.artela.network/develop/get-started/dev-aspect): Try your first [Aspect](https://docs.artela.network/develop/core-concepts/aspect-programming) with Artela rollup node. |
| 87 | +
|
| 88 | +:::tip |
| 89 | +Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements: |
| 90 | +1. Replace `npm install -g @artela/aspect-tool` with `npm install -g @artela-next/aspect-tool` |
| 91 | +2. Replace the Artela Testnet node URL in `project.config.json` with `http://localhost:8545` to connect to your local rollup node. |
| 92 | +3. Use the private key you obtained from the previous step in this tutorial instead of creating a new account. |
| 93 | +::: |
| 94 | +
|
| 95 | +By now, we assume that you: |
| 96 | +
|
| 97 | +- Have a basic understanding of Artela technology. |
| 98 | +- Have installed and played with Artela development tools. |
| 99 | +- Understand how Aspect functions and its impact on making dApps distinct and superior. |
| 100 | +- May already have numerous innovative ideas for building on Artela. |
| 101 | +
|
| 102 | +### 📖 More to know |
| 103 | +
|
| 104 | +If you want to gain a deeper understanding of Aspect’s capabilities and limitations to fully grasp how it can enhance or constrain your project, make sure not to overlook these essential concepts: |
| 105 | +
|
| 106 | +- [Aspect Runtime](https://docs.artela.network/develop/core-concepts/aspect-runtime) |
| 107 | +- [Aspect Lifecycle](https://docs.artela.network/develop/core-concepts/lifecycle) |
| 108 | +- [Join Point](https://docs.artela.network/develop/core-concepts/join-point) |
| 109 | +- [Aspect Tool](https://docs.artela.network/develop/reference/aspect-tool/overview) |
| 110 | +- [Aspect Libs](https://docs.artela.network/develop/reference/aspect-lib/overview) |
| 111 | +
|
| 112 | +### 💥 Build with examples |
| 113 | +
|
| 114 | +Our community has built numbers of projects with Aspect, you can refer to these projects and modify them to learn how to use Aspect more effectively. |
| 115 | +
|
| 116 | +Simple examples that use the basic functionalities of Aspect: |
| 117 | +
|
| 118 | +- Example 1: [Aspect Reentrancy Guard](https://github.com/artela-network/example/blob/rollkit/curve_reentrance/README.md) |
| 119 | +- Example 2: [Black List Aspect](https://github.com/artela-network/blacklist-aspect/tree/rollkit) |
| 120 | +- Example 3: [Throttler Aspect](https://github.com/artela-network/throttler-aspect/tree/rollkit) |
| 121 | +
|
| 122 | +Real-world use cases that show how to build more complex projects with Aspect: |
| 123 | +
|
| 124 | +- [Session key Aspect](https://github.com/artela-network/session-key-aspect/tree/rollkit): use Aspect to extend EoA with session keys and improve |
| 125 | +- [JIT-gaming Aspect](https://github.com/artela-network/jit-gaming/tree/rollkit): use Aspect to add automatic on-chain NPC for a fully on-chain game. |
| 126 | +
|
| 127 | +
|
| 128 | +## 🛑 Stopping the Node |
| 129 | +
|
| 130 | +To cease operations and shutdown the Artela rollup node, use: |
| 131 | +
|
| 132 | +```bash |
| 133 | +docker compose down |
| 134 | +``` |
| 135 | +
|
| 136 | +This command halts all running containers and clears the environment. |
| 137 | +
|
| 138 | +## 🎉 Conclusion |
| 139 | +
|
| 140 | +Congratulations! You have successfully learnt some basic knowledge of EVM++ and have set up an Artela EVM++ rollup using Rollkit and local-DA. This setup enables you to test the integrated capabilities of Artela’s EVM++ with Rollkit. |
0 commit comments