Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
You will need to install MetaMask (or another Ethereum wallet) to connect to EW-DOS applications on the Volta test network or the main network, and to sign transactions on the blockchain.
Read more about using MetaMask here.
If you are using applications or smart contracts on the , you will need .
Learn how to get Volta Tokens .
Once you have Volta tokens, you will need to .
If you are using or developing applications or smart contracts deployed on the , you will need to have .
Learn how to get EWT .
Once you have EWT, you will need to .
Blockchain networks to support test and production environments
Energy Web supports two distinct blockchain networks:
The Volta Test Network (Testnet)
The Energy Web Production Network (Mainnet)
These networks are independent of each other. They each have their own chain specifications that the OpenEthereum client uses to configure the blockchain. You can view them on github here.
You cannot transfer tokens between these two blockchains. They each use their own unique utility token that pays for transaction fees on the blockchain (read more about this ).
The Energy Web Chain's main network utility token is the , which has real fiat value. The Volta Test Network's token is the , and it has no real value. They are not interchangeable - if you have Volta tokens, this does not mean you have Energy Web Tokens, and vice versa.
Volta is the pre-production test network (testnet) of the Energy Web Chain. It’s the blockchain equivalent of a test server or test environment in traditional software development. Most blockchains have at least one test network. Ethereum, for example, for pre-deployment testing.
Volta is used as a staging network to:
Test before they are deployed on the production chain. If you write your own smart contract, you will want to deploy it and test it on Volta first to make sure it works as expected. Because tokens on the testnet () have no real value, you can test thoroughly and incur no cost.
Test protocol updates before they are deployed on the production chain. Each time there is an , we test it on the Volta Network first.
The utility token for the Volta Test Network is the . Volta tokens have no real value, but you will need them to "pay" for transaction costs associated with interacting with smart contracts on the Volta network. Read more about the Volta Token and how to get some
- you will need to connect to the Volta network in order to access applications and smart contracts deployed on Volta
- you have the option to run your own local node of the Volta network. You can read about the purpose and benefits of running a local node .
The Energy Web main network (mainnet) is the production network of the Energy Web Chain. The gas fees to pay for transactions require Energy Web Tokens (EWT), which have real value. You can read more about EWT and how to acquire it .
- you will need to connect to the Energy Web Chain in order to access applications and smart contracts deployed on the Energy Web main network
- you have the option to run your own local node of the Energy Web Chain. You can read about the purpose and benefits of running a local node .
Below are steps to deploy a smart contract on the Volta Test Network (the test network for the Energy Web Chain) using Remix. Remix is a web application used to compile, deploy and test smart contracts on Ethereum networks.
In order to deploy a smart contract to the Energy Web Chain Main Network, rather than the Volta Test Network, the steps are identical, except that you will connect your MetaMask to the Energy Web Chain rather than to Volta. We recommend that you always deploy and test your smart contracts to Volta first to make sure they behave as expected.
Once your smart contract is deployed, you can use the contract's ABI and address on the blockchain to interact with its public methods. For more information on how to interact with smart contracts, go here.
You can see steps for doing this are . If you do not have a MetaMask installed, you can do so .
You will need to to pay for the transaction fee for deploying the smart contract to the blockchain. For directions on how to get Volta Tokens, go . To learn more about what transaction fees are, you can go .
*Note that if you are deploying to the Energy Web Main Network, you will need to have .
In the "Environment" dropdown, selected "Injected Web3". Notice that when you select this, "Custom (73799) network shows up. 73799 is the Volta Test Network - this confirms that we are connected to the Volta network via MetaMask.
You will need to confirm the connection to MetaMask.
Go to the file explorer panel (select the first icon on the left panel). Add a new .sol file in the 'Contracts' folder. Below it is called VoltaContract.sol.
In the .sol file, add the following code:
If there are no errors, click "Compile VoltaContract.sol" (make sure that the 'Language' selected is 'Solidity').
If you want to interact with your contract in the future using an API client, you will need the contract's ABI. The ABI is in the bottom right hand corner of the Solidity Compiler page after it is compiled.
Click 'Deploy' to deploy the contract to Volta Test Network.
Confirm the transaction in MetaMask. Make sure that you have some gwei as a gas price by doing the following:
Select EDIT
Select "Edit suggested gas fee"
Make sure you have a Gas price of 6e-8 GWEI (this should be autofilled)
Confirm the transaction in MetaMask
Once your contract is deployed, you can see it in the "Deployed Contracts" section of the same page ("Deploy and Run Transactions")
Click on "get" to test our contract's functionality. Remember from the code that is should just return a string "Volta".
Copy the address of the contract by clicking the copy icon.
Go to the . If you are deploying to the main network, the block explorer is .
Paste the contract address in the search bar at the top right:
You can see the smart contract address details, the block it was created in, and the byte code. The block explorer contract details from the example above is .
Now that you have your smart contract's address on the blockchain and its ABI, you can use an Ethereum API client to interact with your contract in your decentralized applications. For a tutorial on how to do this, go .
Using smart contracts on the Ethereum Virtual Machine
EW-DOS utility layer packages and SDKs interact with smart contracts that are deployed on the Energy Web Chain. To do this, they use API Client Libraries to connect to the blockchain and create instances of smart contracts to access their public functions.
Below we provide an overview of API Client libraries and a some code examples. Note that exact implementation varies in each package or SDK, but the fundamental concepts remain the same.
You can interact with smart contracts (i.e. call their public read and write functions) on the the Energy Web Chain and the Volta Test Network using any Ethereum API client library. Client libraries allow you to connect to and interact with the blockchain network. You can read about all the functionalities of Ethereum API client libraries in the Ethereum documentation .
The most popular JavaScript libraries for interacting with Ethereum networks are and . EW-DOS uses ethers.js, so below we will provide ethers.js examples, however concepts will be similar among different client libraries.
When interacting with a contract, you use a library to first create a Provider, which is a connection the blockchain. You then use the provider to create an instance of the smart contract that you want to interact with. Once this instance is created, you can call the public methods that are exposed in the smart contract.
A provider is a connection to the blockchain. It gives you an interface to interact with the network. To create a , you will need the JSON RPC Url. To create an , you will need the path local IPC filename (this is only available in node.js).
You can see the full ethers.js documentation on Providers .
See source code
To create a new instance of a contract that is already deployed on the blockchain, you need three pieces of information:
The contract's ABI- the ABI (Application Binary Interface). The ABI is a JSON object that provides the interface to your smart contract. It defines the contract's constructor, events and the behavior of its public functions. The contract's ABI is generated with the smart contract is compiled.
The contract's address - every smart contract has an address when it is deployed to the blockchain. You can deploy the same contract on multiple blockchains, but each contract will have a different address.
The provider
You can see the ethers.js documentation **** for creating a new instance of a deployed Contract .
See source code
The Contract method returns a new instance of that contract at the address passed in. Now that we have an instance of this contract, we can interact with its public methods:
See source code
For a tutorial on how to deploy a smart contract on the Volta Test Network or Energy Web Main Network, go .
Incorporate external data sources into your smart contracts
By themselves, smart contracts cannot access data outside of the blockchain or send its data to services outside of the blockchain. To do this, smart contracts use middleware called an oracles, which are third-party services that fetch and send data to and from smart contracts. Oracles are similar to traditional web-based API services.
Smart contracts can contain logic that triggers certain changes or actions based on external data from an Oracle. Without oracles, blockchains and their applications that cater to specific industries that rely on real-time changes such as finance, commodity trading, or IoT, would not have access to the data necessary to react to real-time external factors.
It's important to keep in mind that oracles are agnostic of the data they transmit - they are only responsible for fetching, verifying and relaying the data to and from the blockchain.
Inbound oracles send data to the blockchain. This is the most common type of oracle. Like traditional API services, the inbound data that the oracle provides can be anything that your smart contract needs for internal logic that it cannot access from the blockchain or the smart contract itself.
For example, you want to send 10 EWT to a friend's address when the price of a specific stock goes above $10 per share. An oracle will provide you with the data about stock price, and the blockchain logic will trigger the send when the oracle delivers data indicating that the price of a stock goes above $10.
Outbound oracles send data about events that happen on the blockchain to third party applications. For example, an account could receive a payment and trigger an outbound oracle to a mechanism that activates a pv solar panel.
Oracles can gather data from software and hardware. A software oracle interacts with and fetches data available from any web source that exposes its data. Some common examples are weather APIs, real-time stock information and exchange rates.
Hardware oracles interact with 'physical' data sources like sensors from IoT devices, QR codes or bar codes. Some examples could be reading the temperature from a smart thermostat or fetching data from a flood sensor..
Centralized oracles are developed, maintained and controlled by a single entity. One oracle is responsible for fetching data from one or many data sources, and then transmitting that data to the smart contract on the blockchain. You could liken this to using a centralized database for your smart contract's external data sources.
Decentralized oracles aggregate data from multiple sources using multiple oracle nodes, so that there is no single point of failure for data retrieval, and no single point of failure for the oracle itself. Decentralized oracles are more aligned with the wider community of public blockchain.
Regardless of the data source, or if it is centralized or decentralized, all oracles provide three main functionalities:
Listen to the blockchain network for incoming requests for off-chain data
Fetch data from the requested off-chain source
Transfer the data to the blockchain via a signed transaction
Insert the data into a smart contract’s local storage. Once the data is in the smart contract's storage, it can be used to trigger logic within that smart contract, or it can be available for other smart contract's to use
Depending on the nature of the data itself and how the smart contract uses the data, oracles can be designed to communicate with smart contracts using three main patterns:
Publish-subscribe: An oracle broadcasts data, and certain smart contracts are polling or "listening to" that oracle for changes in data. An example: "Poll the temperature of region X every 10 minutes. If the temperature is above 70 degrees celsius, turn the smart thermostat to 'on'."
Immediate-read: Oracles hold data in their storage and provide this data on request. Users or devices query the oracle for this data at the same time that it is needed. An example: "Is device X in a list of authorized devices to provide solar power to region Y."
Request-response: External accounts (via decentralized applications) interact with a smart contract and necessitate data from the oracle. The smart contract sends the data parameters to the oracle and performs the third-party data query. When the data is fetched, it sends the result back to the smart contract for the decentralized application to use. Because the decentralized application cannot always wait for the data, this occurs asynchronously. An example: A user selects from a dropdown on a decentralized application a date range to determine the average temperature of each day during the range. The start and end date are sent to the data oracle to fetch the temperatures for the days in the given date range. The data is sent back to the smart contract to perform necessary logic based on the data.
Chainlink provides decentralized oracle networks. This tutorial covers:
Setting up a Chainlink node and using it from a smart contract on the Volta test network
Aggregating data from multiple Oracles, and how to use the public EWT/EUR Price Pair Oracle infrastructure on Volta
Design principles of Chainlink oracles
Scenarios where it makes sense to use Chainlink
Smart Contracts
Link to Source Code
IAM Smart Contracts
Origin Smart Contracts
Volta System Contracts
Energy Web System Contracts
Staking Contracts
import { providers, Signer, utils, errors, Wallet } from "ethers";
const { JsonRpcProvider } = providers;
this._provider = new JsonRpcProvider({ url: rpcUrl });//pass in the smart contract address, smart contract ABI, provider:
this._contract = new Contract(settings.address, this.settings.abi, this._provider); try {
valid = await this._contract.validDelegate(identityAddress, bytesType, delegateAddress);
} catch (error) {
throw new Error(error);
}pragma solidity >=0.4.0 <0.7.0;
contract SimpleReturn {
function get() public pure returns (string) {
return "Volta";
}
}The Ethereum Name Service is available on Energy Web Chain and Volta Testnet
The Energy Web blockchain uses the Ethereum Name Service (ENS) for name-spacing assets that are anchored on our blockchain. ENS is a critical part of providing user-friendly dApps. You can interact with the ENS contracts that are deployed on the Energy Web Chain in several ways.
Below we explain:
The (ENS) is a distributed, open, and extensible naming system based on the Ethereum blockchain.
Machine-readable blockchain identifiers such as Ethereum addresses, content hashes and metadata are difficult to interact with in a user interface. ENS was developed to provide human-readable, user-friendly mapping for these identifiers, and to give users the ability to reserve domain names for our applications. To date, it is the most widely used blockchain naming standard.
ENS solves a similar problem that Domain Name Systems (DNS) provide. DNS lets us navigate to a website using human language and an intuitive format (), rather than using an IP address that is impractical to remember and has no association with the content that it directs you to (104.26.13.227). Similar to DNS, ENS supports a structure of dot notation for hierarchy and nesting.
Using ENS, you can create identifiers for the following blockchain content types:
Address
Reverse address (e.g. an address resolves to alice.eth)
Content hash (e.g.: IPFS/Swarm hashes)
ABI definitions
You can see a full list , as well as the specifications for resolving each type.
As a simple example, if you want to send funds to your friend Alice, you can specify the recipient as “alice.eth” instead of “0x0052569B2d787bB89d711e4aFB56F9C1E420a2a6”.
If you want to refer to a content hash of a report listed at your custom domain, you can refer to it has “myReport.myDomain”, instead of by the hash identifier.
The two main components of ENS, explained below, are responsible for storing the human-readable address in smart contract registry, and resolving it to its original content.
ENS has two primary components: the Registry and the Resolvers.
A smart contract that holds all of the domains/subdomains, the owner of the domain, and the domain resolver (the method used to map it back to its original address.) You can see the ENS Registry smart contract
Methods that translate the human-readable names to their original address. A resolver has multiple methods, each of which are responsible for resolving different types identifiers (for example, one method is responsible for resolving contract ABI definitions , one method is responsible for resolving content hashes.)
You can see the ENS smart contracts for all of the resolver types
You can read more about the Registry and Resolvers in the original documentation
What’s important to take away is that the two primary components for ENS are smart contracts that hold a mapping for all domains/subdomains, and provide resolver methods for translating different address types to a human readable form. These contracts are extendible, so you can add your own resolvers for different address types.
Energy Web has deployed the ENS smart contracts on the Energy Web mainnet and Volta testnet. You have several options for interacting with ENS, depending on your use case.
You can use this interface to search for available names in the Energy Web domain and register them to your address. Note that you will need to have sufficient funds in your wallet to do so as there is a fee for name registration.
Our management app is forked from the .
There are a number of libraries that support ENS. These libraries have methods to configure your registry, and manage and resolve names. The and both connect to ENS using the ethers library. You can see the Ethers API support for ENS .
For a full list of libraries that support ENS, see the
Nethermind Client
Full specification for Nethermind configuration options can be found here:
Run the following command in your terminal -
Your local node should start:
This section describes minimal setup to run an RPC node locally or on the server using Docker container run with docker-compose. This is solely for development purposes, it's not a production grade recommendation.
See Nethermind documentation for Docker:
Verify that prerequisites are installed:
Create working directory
Create docker-compose.yaml file
Start container:
Examine logs:
The log output should be similar to the following
In this section, we'll walk through how to connect to the Energy Web blockchain, and the Volta testnet using the MetaMask browser extension.
Prerequisite: Metamask plugin is installed in the browser; this section explains how to add the Energy Web blockchain to it.
To configure Metamask to connect to the Energy Web blockchain or to Volta, the fastest way to do that is using the or
chmod +x nethermind
# To run a Full node
./nethermind --config volta
# To run an Archive node
./nethermind --config volta_archive# To run a Full node
./nethermind --config energyweb
# To run an Archive node
./nethermind --config energyweb_archive2024-03-05 13-54-12.2501|Nethermind starting initialization.
2024-03-05 13-54-12.2939|Client version: Nethermind/v1.25.4+20b10b35/linux-x64/dotnet8.0.2
2024-03-05 13-54-12.2980|Loading embedded plugins
2024-03-05 13-54-12.2981| Found plugin type Nethermind.Consensus.AuRa.AuRaPlugin
2024-03-05 13-54-12.2982| Found plugin type Nethermind.Consensus.Clique.CliquePlugin
2024-03-05 13-54-12.2983| Found plugin type Nethermind.Consensus.Ethash.EthashPlugin
2024-03-05 13-54-12.2983| Found plugin type Nethermind.Consensus.Ethash.NethDevPlugin
2024-03-05 13-54-12.2983| Found plugin type Nethermind.Hive.HivePlugin
2024-03-05 13-54-12.2983| Found plugin type Nethermind.UPnP.Plugin.UPnPPlugin
Resolved executing directory as /home/ubuntu/neth/nethermind-1.25.4.
2024-03-05 13-54-12.3211|Loading 12 assemblies from /home/ubuntu/neth/nethermind-1.25.4/plugins
2024-03-05 13-54-12.3212|Loading assembly Nethermind.Init
2024-03-05 13-54-12.3230|Loading assembly Nethermind.Merge.AuRa
2024-03-05 13-54-12.3254| Found plugin type Nethermind.Merge.AuRa
2024-03-05 13-54-12.3255|Loading assembly Nethermind.HealthChecks
2024-03-05 13-54-12.3270| Found plugin type Nethermind.HealthChecks
2024-03-05 13-54-12.3271|Loading assembly Nethermind.EthStats
2024-03-05 13-54-12.3276| Found plugin type Nethermind.EthStats
2024-03-05 13-54-12.3277|Loading assembly Nethermind.Consensus.AuRa
2024-03-05 13-54-12.3315|Loading assembly Nethermind.Optimism
2024-03-05 13-54-12.3330| Found plugin type Nethermind.Optimism
2024-03-05 13-54-12.3331|Loading assembly Nethermind.JsonRpc.TraceStore
2024-03-05 13-54-12.3338| Found plugin type Nethermind.JsonRpc.TraceStore
2024-03-05 13-54-12.3338|Loading assembly Nethermind.Mev
2024-03-05 13-54-12.3361| Found plugin type Nethermind.Mev
2024-03-05 13-54-12.3361|Loading assembly Nethermind.Init.Snapshot
2024-03-05 13-54-12.3365| Found plugin type Nethermind.Init.Snapshot
2024-03-05 13-54-12.3366|Loading assembly Nethermind.Merge.Plugin
2024-03-05 13-54-12.3393| Found plugin type Nethermind.Merge.Plugin
2024-03-05 13-54-12.3394|Loading assembly Nethermind.AccountAbstraction
2024-03-05 13-54-12.3419| Found plugin type Nethermind.AccountAbstraction
2024-03-05 13-54-12.3420|Loading assembly Nethermind.Api
2024-03-05 13-54-12.4062|Loading standard NLog.config file from /home/ubuntu/neth/nethermind-1.25.4/NLog.config.
2024-03-05 13-54-12.4908|NLog.config loaded in 83ms.
2024-03-05 13-54-12.4915|Reading config file from /home/ubuntu/neth/nethermind-1.25.4/configs/volta.cfg
2024-03-05 13-54-12.5428|Configuration initialized.
05 Mar 13:54:12 | RocksDb Version: 8.3.2
05 Mar 13:54:12 | Loading chainspec from embedded resources: /home/ubuntu/neth/nethermind-1.25.4/chainspec/volta.json
05 Mar 13:54:12 | CPU: (CT)
05 Mar 13:54:12 | Using http://ipv4.icanhazip.com to get external ip
05 Mar 13:54:12 | Setting up memory allowances
05 Mar 13:54:12 | Memory hint: 768 MB
05 Mar 13:54:12 | General memory: 32 MB
05 Mar 13:54:12 | Peers memory: 25 MB
05 Mar 13:54:12 | Netty memory: 134 MB
05 Mar 13:54:12 | Mempool memory: 110 MB
05 Mar 13:54:12 | Fast blocks memory: 46 MB
05 Mar 13:54:12 | Trie memory: 83 MB
05 Mar 13:54:12 | DB memory: 335 MB
05 Mar 13:54:12 | Generating private key for the node (no node key in configuration) - stored in plain + key store for JSON RPC unlocking
05 Mar 13:54:14 | Store this password for unlocking the node key for JSON RPC - this is not secure - this log message will be in your log files. Use only in DEV contexts.
05 Mar 13:54:16 | Block tree initialized, last processed is 0, best queued is 0, best known is 0, lowest inserted header , body , lowest sync inserted block number
05 Mar 13:54:16 | Initializing 15 plugins
05 Mar 13:54:16 | Clique by Nethermind
05 Mar 13:54:16 | Clique by Nethermind initialized in 0ms
05 Mar 13:54:16 | AuRa by Nethermind
05 Mar 13:54:16 | AuRa by Nethermind initialized in 0ms
05 Mar 13:54:16 | Ethash by Nethermind
05 Mar 13:54:16 | Ethash by Nethermind initialized in 0ms
05 Mar 13:54:16 | Optimism by Nethermind
05 Mar 13:54:16 | Optimism by Nethermind initialized in 0ms
05 Mar 13:54:16 | NethDev by Nethermind
05 Mar 13:54:16 | NethDev by Nethermind initialized in 0ms
05 Mar 13:54:16 | AuRaMerge by Nethermind
05 Mar 13:54:16 | AuRaMerge by Nethermind initialized in 0ms
05 Mar 13:54:16 | Merge by Nethermind
05 Mar 13:54:16 | Merge by Nethermind initialized in 2ms
05 Mar 13:54:16 | MEV by Nethermind
05 Mar 13:54:16 | MEV by Nethermind initialized in 0ms
05 Mar 13:54:16 | HealthChecks by Nethermind
05 Mar 13:54:16 | HealthChecks by Nethermind initialized in 1ms
05 Mar 13:54:16 | Hive by Nethermind
05 Mar 13:54:16 | Hive by Nethermind initialized in 0ms
05 Mar 13:54:16 | Account Abstraction by Nethermind
05 Mar 13:54:16 | Account Abstraction Plugin: User Operation Mining Disabled
05 Mar 13:54:16 | Account Abstraction by Nethermind initialized in 0ms
05 Mar 13:54:16 | EthStats by Nethermind
05 Mar 13:54:16 | EthStats by Nethermind initialized in 0ms
05 Mar 13:54:16 | Snapshot by Nethermind
05 Mar 13:54:16 | Snapshot by Nethermind initialized in 0ms
05 Mar 13:54:16 | TraceStore by Nethermind
05 Mar 13:54:16 | TraceStore by Nethermind initialized in 0ms
05 Mar 13:54:16 | UPnP by Nethermind
05 Mar 13:54:16 | UPnP by Nethermind initialized in 0ms
05 Mar 13:54:16 | Loaded 0 static nodes from file: /home/ubuntu/neth/nethermind-1.25.4/Data/static-nodes.json
05 Mar 13:54:16 | Skipping Account Abstraction network protocol
05 Mar 13:54:16 | Now syncing nodes starting from root of block 0
05 Mar 13:54:16 | No block tree levels to review for fixes. All fine.
05 Mar 13:54:16 | Numbers resolved, level = Max(0, 0), header = Max(0, 0), body = Max(0, 0)
05 Mar 13:54:16 | Beacon Numbers resolved, level = 0, header = 0, body = 0
05 Mar 13:54:16 | Loading fork choice info
05 Mar 13:54:16 | Grafana / Prometheus metrics are disabled in configuration
05 Mar 13:54:16 | System.Diagnostics.Metrics disabled
05 Mar 13:54:16 | Skipping Flashbots RPC plugin
05 Mar 13:54:16 | Skipping Account Abstraction RPC plugin
05 Mar 13:54:16 | Json RPC is disabled
05 Mar 13:54:16 |
======================== Nethermind initialization completed ========================
This node : enode://15ec8f735368cf809735071cd607ee8e12fe86bbbc99c14161272c8a2253d4a7cf063d46b9cd201735011ae008687175b504bdcf45f8f20605a763d39b951044@15.188.207.110:30303
Node address : 0x1dc9ca5452806e178959506e100300d3566ec79f (do not use as an account)
Mem est tx : 40 MB
Mem est DB : 8 MB
Genesis hash : 0xebd8b413ca7b7f84a8dd20d17519ce2b01954c74d94a0a739a3e416abe0e43e5
External IP : 15.188.207.110
Ethereum : tcp://15.188.207.110:30303
Discovery : udp://15.188.207.110:30303
Client id : Nethermind/v1.25.4+20b10b35/linux-x64/dotnet8.0.2
Chainspec : chainspec/volta.json
Chain head : 0
Chain ID : Volta
=====================================================================================
05 Mar 13:54:17 | Changing state Disconnected to FastHeaders at processed: 0 | state: 0 | block: 0 | header: 0 | target block: 26907152 | peer block: 26907152
05 Mar 13:54:17 | Sync mode changed from Disconnected to FastHeaders
05 Mar 13:54:17 | Connected to 2 bootnodes, 7 trusted/persisted nodes
05 Mar 13:54:20 | Changing state FastHeaders to FastSync, FastHeaders at processed: 0 | state: 0 | block: 0 | header: 26680000 | target block: 26907153 | peer block: 26907153
05 Mar 13:54:20 | Sync mode changed from FastHeaders to FastSync, FastHeaders
05 Mar 13:54:21 | Peers | with best block: 2 | all: 2 | eth66 (100 %) | Active: 2 Headers, 1 Bodies, 1 Receipts, 1 Blocks | Sleeping: None | OpenEthereum (100 %)
05 Mar 13:54:21 | Old Headers 2,560 / 26,680,000 ( 0.01 %) | queue 2,048 | current 0 Blk/s | total 640 Blk/s
05 Mar 13:54:25 | Discovered new block 26907154 13:54:25 (0xbf2c2c...21b348), tx count: 0 miner 0xe6c064719623c5bc62ef51caa4639416f8634ab6, sent by [Peer|eth66|26907154| 3.121.165.10:30303| Out], with AuRa step 341929373
05 Mar 13:54:26 | Old Headers 6,144 / 26,680,000 ( 0.02 %) | queue 0 | current 717 Blk/s | total 683 Blk/s
05 Mar 13:54:26 | Downloaded 26,680,637 / 26,907,154 ( 99.16 %) | current 0 Blk/s | total 128 Blk/s
05 Mar 13:54:30 | Discovered new block 26907155 13:54:30 (0x702e54...a3e29f), tx count: 0 miner 0xc09e63b27775508b6599daf3b6dcbe09cf3f82ac, sent by [Peer|eth66|26907155| 3.121.165.10:30303| Out], with AuRa step 341929374
05 Mar 13:54:31 | Old Headers 8,192 / 26,680,000 ( 0.03 %) | queue 0 | current 410 Blk/s | total 585 Blk/s
05 Mar 13:54:31 | Downloaded 26,681,653 / 26,907,155 ( 99.16 %) | current 203 Blk/s | total 167 Blk/s
05 Mar 13:54:35 | Discovered new block 26907156 13:54:35 (0xa73994...be656b), tx count: 0 miner 0x20ea864187c1c1eaa613726ed4d211244209503c, sent by [Peer|eth66|26907156| 3.121.165.10:30303| Out], with AuRa step 341929375
05 Mar 13:54:36 | Old Headers 9,728 / 26,680,000 ( 0.04 %) | queue 0 | current 307 Blk/s | total 512 Blk/s
05 Mar 13:54:36 | Downloaded 26,682,669 / 26,907,156 ( 99.17 %) | current 203 Blk/s | total 179 Blk/s
docker --version
docker-compose --version mkdir data_dircat > docker-compose.yaml << 'EOF'
version: '3.8'
services:
nethermind:
image: nethermind/nethermind:1.25.4
restart: always
command:
--config volta -dd /nethermind/data_dir
# For EnergyWebChain network
# --config energyweb -dd /nethermind/data_dir
volumes:
- ./data_dir:/nethermind/data_dir
ports:
- 8545:8545
- 8546:8546
- 30303:30303
- 30303:30303/udp
EOFdocker-compose up -ddocker-compose logs --tail 20 nethermindnethermind_1 | Mem est tx : 40 MB
nethermind_1 | Mem est DB : 8 MB
nethermind_1 | Genesis hash : 0xebd8b413ca7b7f84a8dd20d17519ce2b01954c74d94a0a739a3e416abe0e43e5
nethermind_1 | External IP : 15.188.207.110
nethermind_1 | Ethereum : tcp://15.188.207.110:30303
nethermind_1 | Discovery : udp://15.188.207.110:30303
nethermind_1 | Client id : Nethermind/v1.25.4+20b10b35/linux-x64/dotnet8.0.2
nethermind_1 | Chainspec : chainspec/volta.json
nethermind_1 | Chain head : 0 (0xebd8b4...0e43e5)
nethermind_1 | Chain ID : Volta
nethermind_1 | =====================================================================================
nethermind_1 | 05 Mar 13:57:50 | Changing state Disconnected to FastSync, FastHeaders at processed: 0 | state: 0 | block: 26696639 | header: 26696639 | target block: 26907183 | peer block: 26907183
nethermind_1 | 05 Mar 13:57:50 | Sync mode changed from Disconnected to FastSync, FastHeaders
nethermind_1 | 05 Mar 13:57:51 | Connected to 2 bootnodes, 4 trusted/persisted nodes
nethermind_1 | 05 Mar 13:57:54 | Peers | with best block: 2 | all: 2 | eth66 (100 %) | Active: 2 Headers, 1 Bodies, 1 Receipts, 1 Blocks | Sleeping: None | OpenEthereum (100 %)
nethermind_1 | 05 Mar 13:57:54 | Old Headers 122,368 / 26,680,000 ( 0.46 %) | queue 0 | current 0 Blk/s | total 30,593 Blk/s
nethermind_1 | 05 Mar 13:57:54 | Downloaded 26,697,149 / 26,907,183 ( 99.22 %) | current 0 Blk/s | total 131 Blk/s
nethermind_1 | 05 Mar 13:57:59 | Old Headers 130,048 / 26,680,000 ( 0.49 %) | queue 0 | current 1,537 Blk/s | total 14,454 Blk/s
nethermind_1 | 05 Mar 13:57:59 | Downloaded 26,698,165 / 26,907,184 ( 99.22 %) | current 203 Blk/s | total 173 Blk/s
nethermind_1 | 05 Mar 13:58:00 | Discovered new block 26907185 13:58:00 (0x03214c...f02603), tx count: 0 miner 0x20ea864187c1c1eaa613726ed4d211244209503c, sent by [Peer|eth66|26907185| 3.121.165.10:30303| Out], with AuRa step 341929416 DNS records
Public keys
Smart contract interfaces (see EIP 165)
Text (email, physical address, geo location, metadata)
0x5630EBDbf41624fF77DcBfC4518c867D93E42E9f
0x3BDA3EE55a5b43493BA05468d0AE5A5fF916252f
Public Resolver
0x0a97e07c4Df22e2e31872F20C5BE191D5EFc4680
0xA517983Bd4Af4DF0Ed9b52DA4BC405d0A95eE7E2
Reverse Registrar
0xff7Befa016689dC5D89165867a65CF26B73e6514
0xcB9BCAa8010F51D6484570B99B127e8a26B6B468
Reverse Resolver
0x775e2a91501cdadeA65BF8eBb94a82529Fc2C34B
0x0C12c9087342DafE42b28A93998CEd711DC9a614
Contract
Source
Volta address
EWC address
Registry
0xd7CeF70Ba7efc2035256d828d5287e2D285CD1ac
0x0A6d64413c07E10E890220BBE1c49170080C6Ca0
ETH Registrar Controller
0xb842CCA1682DC2Ee6A9da6A59bA4B5C736b229cD
0x9C99a28D3d702E6096361Ff31E724b772B5D709e
ETH Base Registrar
Network Name
EWC
New RPC URL
https://rpc.energyweb.org
Chain ID
246
Currency Symbol
EWT
Block Explorer URL
http://explorer.energyweb.org
3. Save the settings and switch to the newly added network 'EWC'
1. Click on the "Networks" dropdown at the top of your MetaMask interface and select "Custom RPC" 2. Add the new network using the following settings
Field
Value
Network Name
3. Save the settings and switch to the newly added network 'Volta'
Field
Value
Run a full instance of the blockchain on your machine
You have the option of running a full node of the Energy Web Chain main network or Volta test network locally. Running a local node does requires a degree of technical capability. It helps to understand the benefits of doing so, and the alternatives to running a full local node.
There are a number of benefits to running your own node, which are described below.
A 'client' is software that implements a blockchain's protocols and allows you to connect directly with the blockchain - that is to read data from the blockchain or initiate transactions on the blockchain, such as transferring tokens. Anyone can create client software, as long as it implements that blockchain's official protocols. Ethereum's protocols are specified in their , and there are a number of Ethereum clients to choose from.
A node is any machine that is actively running client software and is connected to the blockchain. Blockchain is often called a “peer-to-peer” network, because its network is made up of many peers running nodes simultaneously that are connected to each other.
Depending on if you are running a full node, a light node, or an archive node (see the differences between these nodes ), your client will sync with the current state of blockchain and then continue to execute every transaction that is added to the blockchain. Essentially it is having a live copy or version of the blockchain running locally on your machine.
Depending on the blockchain you are you connecting to, this can take up large amounts of space and take a long time to retrieve and sync the history of the chain on your machine. For example, synching with the Energy Web chain will require much less resources than syncing with the Ethereum mainnet, as it is a much larger and longer-running blockchain.
To run a node, you need to install the client software. The Energy Web mainnet and Volta testnet both use the client (formally known as Parity), because it supports the , which is a consensus algorithm specifically for Proof-of-Authority (PoA) blockchains. You can read more about the PoA consensus algorithm and why we implemented it for the Energy Web Chain .
The more nodes there are, the more secure the system is as a whole. Blockchains are decentralized technology, so by design the system performs better if there are multiple instances of it rather than just one. The more nodes there are, the less points of failure or opportunities for malicious action.
Your transactions are more direct and more secure. Software that provides intermediary connections to the blockchain like or are, like any other web-based software, susceptible to downtime or error. By connecting to the blockchain yourself, you are removing your dependency on external providers for secure and direct connection. You also do not expose your public keys to the browser.
You can self-verify transactions.
Running a local node is not necessary to use applications that run on the blockchain or transfer tokens.
To use applications deployed on the Energy Web Chain, or to transfer tokens, you can connect to the blockchain through using a remote RPC. You can see guidance for doing that on the Volta Test Network and the Energy Web Main Network .
You need to meet OpenEthereum hardware requirements and have enough disk space to store database snapshots (which will grow in time).
Multi-core CPU
4GB RAM
SSD drive and free space
EWC RPC node - 150 GB
Download and save the chain config to your local machine.
Note that there are different chainspec files for the and the :
The chainspec file for Volta Test Network is .
The chainspec file for Energy Web Main Network is .
1. Download the chainspec file.
Volta Testnet chainspec:
Energy Web Chain (production) chainspec:
Download
Full specification for OpenEthereum configuration options can be found here:
Run the following command in your terminal. Provide the path to the chain config that you want to use. The following command references the Volta chain config.
Your local node should start:
Connect your MetaMask to the Volta Test Network or Energy Web Chain via remote RPC. You can read how to do this
Get the URL of your MetaMask account. You can do this by clicking the settings dropdown and selecting "Expand View."
When the view is expanded, copy the URL in the browser
Run the following command in your terminal
This section describes minimal setup to run an RPC node locally or on the server using Docker container run with docker-compose. This is solely for development purposes, it's not a production grade recommendation.
See OpenEthereum documentation for Docker:
Verify that prerequisites are installed:
2. Create working directory
3. Create docker-compose.yaml file
4. Download database snapshot - this takes some time and requires resources due to the size of the .tar file, but it will speed up synchronization process.
*Note that this step is optional. If you do not download the database snapshot, move to Step 6.
Volta (depending on your internet connection ~1 hour download time for us):
Energy Web Chain (production) (30 minutes download time for us):
5. Unpack database snapshot. This snapshot only works with OpenEthereum client.
*Note that this step is optional. If you did not complete Step 5, skip this step and move to Step 6.
Volta:
Energy Web Chain (production):
6. Set permissions:
8. Start container:
9. Examine logs:
The log output should be similar to the following (sometimes the logging output does not appear immediately, wait some time):
10. After some, you will sync with the network. Until a full sync, you will see be in a "syncing" state:
11. Check the database synchronization status in the command line using OpenEthereum's 'eth-syncing' module:
The output will show current synchronization status:
It will take some time to fully sync with the current state of the blockchain. When the synchronization is finished status will be:

You are not subject to rate limits. Infura (and therefore MetaMask, as it implements Infura to connect to the blockchain) does have rate limits for JSON RPC requests. If your development requires a lot of requests to the blockchain, running a local node may be more efficient.
Volta RPC node - 200 GB
A decent DSL connection is required
Volta
New RPC URL
https://volta-rpc.energyweb.org
Chain ID
73799
Currency Symbol
VT
Block Explorer URL
http://volta-explorer.energyweb.org
Network Name
EnergyWeb RPC
New RPC URL
http://consortia-rpc.energyweb.org
Chain ID
246
Currency Symbol
EWT
Block Explorer URL
https://explorer.energyweb.org




curl -L https://raw.githubusercontent.com/energywebfoundation/ewf-chainspec/master/Volta.json -o chainspec-volta.jsoncurl -L https://raw.githubusercontent.com/energywebfoundation/ewf-chainspec/master/EnergyWebChain.json -o chainspec-ewc.jsonchmod +x openethereum
./openethereum --chain /path/to/chainconfig/Volta.json2024-03-05 10:49:35 UTC Starting OpenEthereum/v3.3.5-stable-6c2d392d8-20220405/x86_64-linux-gnu/rustc1.58.1
2024-03-05 10:49:35 UTC Keys path /home/ubuntu/.local/share/openethereum/keys/Volta
2024-03-05 10:49:35 UTC DB path /home/ubuntu/.local/share/openethereum/chains/Volta/db/d94a0a739a3e416a
2024-03-05 10:49:35 UTC State DB configuration: fast
2024-03-05 10:49:35 UTC Operating mode: active
2024-03-05 10:49:35 UTC Not preparing block; cannot sign.
2024-03-05 10:49:36 UTC Configured for Volta using AuthorityRound engine
2024-03-05 10:49:36 UTC Signal for switch to contract-based validator set.
2024-03-05 10:49:36 UTC Initial contract validators: [0x36f67dd84e7327c10c7ead6c429a47189798fbdc, 0x20df7a4e8408add37c6a5c4afc1b1509924619fe, 0x77901f14183b1669c80e8c6137ff6721c9a26b25]
2024-03-05 10:49:36 UTC Listening for new connections on 127.0.0.1:8546.
2024-03-05 10:49:40 UTC Not preparing block; cannot sign.
2024-03-05 10:49:41 UTC Public node URL: enode://bb4962584a90ebcb373f5dd22cbe005ddd1300e7889c124ba33bfb0c327799948d8248054b7b6301f3bee46844c16cdaaffd390472198ddfb96798c8d03868b7@172.31.16.183:30303
2024-03-05 10:49:46 UTC Syncing #1143 0xa666…220c 114.43 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed LI:#1143 2/25 peers 405 KiB chain 0 bytes queue RPC: 0 conn, 0 req/s, 0 µs
2024-03-05 10:49:51 UTC Syncing #3559 0xe8e6…6a6c 483.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 124 Qed LI:#3683 2/25 peers 978 KiB chain 187 KiB queue RPC: 0 conn, 0 req/s, 0 µs
2024-03-05 10:49:56 UTC Syncing #5930 0xc530…ce9d 474.11 blk/s 0.2 tx/s 0.0 Mgas/s 0+ 1182 Qed LI:#7112 3/25 peers 2 MiB chain 2 MiB queue RPC: 0 conn, 0 req/s, 0 µs
2024-03-05 10:50:01 UTC Syncing #8458 0x63ee…be65 505.40 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 3226 Qed LI:#11684 3/25 peers 3 MiB chain 5 MiB queue RPC: 0 conn, 0 req/s, 0 µs
2024-03-05 10:50:06 UTC Syncing #10352 0xf609…52e3 379.12 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 5142 Qed LI:#15494 3/25 peers 3 MiB chain 8 MiB queue RPC: 0 conn, 0 req/s, 0 µsopenethereum --chain path/to/chainconfig/Volta.json --jsonrpc-cors METAMASK URL docker --version
docker-compose --version
curl --versionmkdir openethereum
cd openethereum
mkdir -p chain-data/chainscat > docker-compose.yaml << 'EOF'
version: '3.8'
services:
openethereum:
image: openethereum/openethereum:v3.3.5
restart: always
ports:
- 8545:8545
- 8546:8546
- 30303:30303
- 30303:30303/udp
command:
--jsonrpc-interface all --chain /config/chainspec.json
# Uncomment this if connecting local node to MetaMask
# --jsonrpc-cors chrome-extension://URL-OF-METAMASK
volumes:
- ./chain-data:/home/openethereum/.local/share/io.parity.ethereum/
- ./chainspec-volta.json:/config/chainspec.json:ro
# chainspec file should be changed if using EWC
# - ./chainspec-ewc.json:/config/chainspec.json:ro
EOFcurl -L -C - https://chain-download.energyweb.org/volta -o ./chain-data/chains/volta.tarcurl -L -C - https://chain-download.energyweb.org/ewc -o ./chain-data/chains/energywebchain.tarsudo tar -xvf ./chain-data/chains/volta.tar -C ./chain-data/chainscurl -L -C - https://chain-download.energyweb.org/ewc -o ./chain-data/chains/energywebchain.tarsudo chmod -R 777 chain-datadocker-compose up -ddocker-compose logs --tail 20 openethereumopenethereum_1 | 2024-03-05 10:54:30 UTC Starting OpenEthereum/v3.3.5-stable/x86_64-linux-musl/rustc1.59.0
openethereum_1 | 2024-03-05 10:54:30 UTC Keys path /home/openethereum/.local/share/io.parity.ethereum/keys/Volta
openethereum_1 | 2024-03-05 10:54:30 UTC DB path /home/openethereum/.local/share/io.parity.ethereum/chains/Volta/db/d94a0a739a3e416a
openethereum_1 | 2024-03-05 10:54:30 UTC State DB configuration: fast
openethereum_1 | 2024-03-05 10:54:30 UTC Operating mode: active
openethereum_1 | 2024-03-05 10:54:30 UTC Not preparing block; cannot sign.
openethereum_1 | 2024-03-05 10:54:30 UTC Configured for Volta using AuthorityRound engine
openethereum_1 | 2024-03-05 10:54:30 UTC Signal for switch to contract-based validator set.
openethereum_1 | 2024-03-05 10:54:30 UTC Initial contract validators: [0x36f67dd84e7327c10c7ead6c429a47189798fbdc, 0x20df7a4e8408add37c6a5c4afc1b1509924619fe, 0x77901f14183b1669c80e8c6137ff6721c9a26b25]
openethereum_1 | 2024-03-05 10:54:30 UTC Listening for new connections on 127.0.0.1:8546.
openethereum_1 | 2024-03-05 10:54:35 UTC Not preparing block; cannot sign.
openethereum_1 | 2024-03-05 10:54:35 UTC Public node URL: enode://b111a66d9d0cc942abe1c728d74e8109673a1dc80a2d50be8546993c51cecd6151f2c7e3322bb6a992adcd906af5f686b8d14d8c4373aafdd02c108aeb71ab07@172.28.0.2:30303
openethereum_1 | 2024-03-05 10:54:40 UTC Syncing #1450 0x4a2f…7898 144.03 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 73 Qed LI:#1524 2/25 peers 434 KiB chain 105 KiB queue RPC: 0 conn, 0 req/s, 0 µs
openethereum_1 | 2024-03-05 10:54:45 UTC Syncing #2097 0xdef1…082f 129.40 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 2601 Qed LI:#4699 2/25 peers 767 KiB chain 4 MiB queue RPC: 0 conn, 0 req/s, 0 µs
12021-11-03 15:33:42 UTC Syncing #14332274 0x2b0d...23c2 0.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed LI:#14332276 1/25 peers 72 KiB chain 0 bytes queue RPC: 0 conn, 0 req/s, 87 µscurl --data '{"method":"eth_syncing","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545{"jsonrpc":"2.0","result":{"currentBlock":"0xdab79f","highestBlock":"0xdac9d2","startingBlock":"0xdab172","warpChunksAmount":null,"warpChunksProcessed":null},"id":1}{"jsonrpc":"2.0","result":false,"id":1}














