Getting started with the Nahmii 2.0 testnet
About Nahmii 2.0
Nahmii 2.0 is a layer 2 scaling solution for Ethereum built around the Nahmii Virtual Machine, NVM. This upgraded version of Nahmii provides generalised smart contract support and full composability between them. Nahmii leverages patent-pending state pool technology which gives unprecedented scalability. This makes Nahmii the only commercially viable scaling solution for Ethereum.
Connecting to the Nahmii 2.0 testnet
The current testnet iteration of Nahmii 2.0 works with both the Ropsten public testnet and an L2 network. It is thus required to connect to two RPC networks.
Network details
L1 testnet
Network name: Nahmii 2.0 L1 testnet
RPC URL: https://l1.testnet.nahmii.io/ (or any other node on the Ropsten public testnet)
ChainID: 3
Symbol: ETH
Block explorer URL: https://ropsten.etherscan.io
L2 testnet
Network name: Nahmii 2.0 L2 testnet
RPC URL: https://l2.testnet.nahmii.io/
ChainID: 5553
Symbol: ETH
Block explorer URL: https://explorer.testnet.nahmii.io
Connect with the press of a button
Connect manually via MetaMask
Open the MetaMask browser extension.
Click on the network name.
When the networks window pops up, click on 'Custom RPC'.
A new window will popup where you can fill in the connection details. Fill in the details provided above for the first network and click save.
Do this again for the second network listed above.
Nahmii 2.0 Meta contracts L1 <-> L2
The main contract that is relevant for developers is the AddressManager. The AddressManager provides easy access to all the other contracts and exposes their addresses. For examples on how to interact with the Nahmii 2.0 L2 contracts, please see the provided examples.
Configuring a project to run on Nahmii 2.0
To compile the correct bytecode to work with the Nahmii virtual machine, the hardhat-nvm dependency is required due to the differences between certain opcodes in the EVM and the NVM.
Install the NVM hardhat plugin.
Edit
hardhat.config.js
to use the NVM package.
In the same file, add
nahmii
to the list of networks:
Note
To test contracts on the live Nahmii L2, compile it with hardhat:
To interact with the smart contracts manually, use the console. The JavaScript console can be ran with the following command:
Last updated
Was this helpful?