The EVM
class in this module provides functionality related to the Ethereum Virtual Machine (EVM). It extends the IRuntime
interface from the '@kyve/core' package and provides methods to fetch and format blockchain data.
- Fetching specific blockchain data items
- Formatting fetched data
- Setting network settings
- Generating authorization headers for Coinbase Cloud endpoints
The name
and version
properties are defined from the package.json file.
This method takes a Node
and a key
as parameters and returns a Promise
that resolves to a DataItem
. This method is responsible for:
- Setting up the network settings
- Generating authorization headers for Coinbase Cloud endpoints
- Setting up the web3 provider
- Fetching the blockchain data item
- Formatting and returning the fetched data
This method takes a key
as a parameter and returns a Promise
that resolves to a string. It's responsible for determining the next key.
This method takes a value
as a parameter and returns a Promise
that resolves to a string. It formats the fetched value.
This private method takes a Node
as a parameter and returns a Promise
that resolves to an object. It's responsible for generating the required authorization headers for Coinbase Cloud endpoints.
Please refer to the documentation in the respective methods for more details on their usage.
@kyve/core
: This package is used for the 'IRuntime' interface and 'DataItem' and 'Node' types.ethers
: This package provides the Ethereum JavaScript API and is used for setting up the web3 provider.
- Name:
EVM Runtime Module
- Version: As defined in package.json
Before you can use the EVM runtime module, you need to install the required dependencies in your project.
npm install @kyve/core ethers