Quick Start Guide for Artela EVM++ with Rollkit β
This guide will assist you to quickly set up a rollup node with Artela EVM++ execution layer using Rollkit and local-DA.
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.
π¦ Clone the Artela Rollkit Repository β
Start by cloning the Artela Rollkit repository:
git clone https://github.com/artela-network/artela-rollkit.git
cd artela-rollkit
π₯οΈ Run with Docker Compose β
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.
TIP
Make sure you meet these prerequisites of enabling host network mode in Docker.
After installing Docker, run the following command to start a local development node:
docker compose up -d
This command launches the Artela rollup node with Rollkit and local-DA. To monitor the logs, use this command:
docker logs artroll -f
If you observe the following output, the local development node is running properly:
...
7:09AM INF finalized block block_app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager num_txs_res=0 num_val_updates=0
7:09AM INF executed block app_hash=E483920A1E1E7E492E47036300003769420813BB13BB3F25CFAFDB0DF19C144A height=3 module=BlockManager
7:09AM INF indexed block events height=3 module=txindex
7:09AM INF Creating and publishing block height=4 module=BlockManager
...
π Get prefunded test accounts β
Access testing accounts by entering the artroll
Docker container:
docker exec -ti artroll /bin/bash
Retrieve the address and private key of testing accounts using:
# π Alternatively, you can use myKey2.info, myKey3.info, myKey4.info
./entrypoint keyinfo --file ~/.artroll/keyring-test/mykey.info --passwd test
This will display the testing private key and its address:
private key: { Plain Private Key in Hex Format }
address: { Address Associated with the Private Key }
There are four testing accounts available in the local development node for interacting with the EVM chain.
βοΈ Configuring the Node β
You can modify runtime parameters of the Artela development node by adjusting its configuration files. Follow the steps below to make these changes.
To configure the development node, first access the Docker container by running the following command:
docker exec -it artroll /bin/bash
Inside the container, you will need to modify the following configuration files:
- /root/.artroll/config/app.toml
- /root/.artroll/config/config.toml
After making the necessary changes, return to the Docker host and restart the container to apply the new configuration:
docker compose restart artroll
π§ͺ Build on EVM++ β
Letβs dive into Artela EVM++ by kicking off with the Hello World project, the following code will guide you through the essentials:
π Contract interaction tutorial: Get hands-on experience with deploying and interacting with smart contracts on the Artela rollup node.
TIP
When you are following the Contract interaction tutorial, you need to make the following replacements:
- Use https://github.com/artela-network/gm-portal.git instead of the original
gm-portal
repo. - Use the private key you obtained from the previous step in this tutorial instead of the one used in the Contract interaction tutorial.
- The contract address should be
0x9fcEbD70654D360b41ccD123dADAAad6ce13C788
instead of the one starts with0x18D...
.
π Quick Start for Aspect on EVM++: Try your first Aspect with Artela rollup node.
TIP
Please note that when you are following the Aspect on EVM++ tutorial, you need to make the following replacements:
- Replace
npm install -g @artela/aspect-tool
withnpm install -g @artela-next/aspect-tool
- Replace the Artela Testnet node URL in
project.config.json
withhttp://localhost:8545
to connect to your local rollup node. - Use the private key you obtained from the previous step in this tutorial instead of creating a new account.
By now, we assume that you:
- Have a basic understanding of Artela technology.
- Have installed and played with Artela development tools.
- Understand how Aspect functions and its impact on making dApps distinct and superior.
- May already have numerous innovative ideas for building on Artela.
π More to know β
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:
π₯ Build with examples β
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.
Simple examples that use the basic functionalities of Aspect:
- Example 1: Aspect Reentrancy Guard
- Example 2: Black List Aspect
- Example 3: Throttler Aspect
Real-world use cases that show how to build more complex projects with Aspect:
- Session key Aspect: use Aspect to extend EoA with session keys and improve
- JIT-gaming Aspect: use Aspect to add automatic on-chain NPC for a fully on-chain game.
π Stopping the Node β
To cease operations and shutdown the Artela rollup node, use:
docker compose down
This command halts all running containers and clears the environment.
π Conclusion β
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.