package
1.4.0-rc.2
Repository: https://github.com/iotaledger/wasp.git
Documentation: pkg.go.dev

# README

EVM support

This package and subpackages contain the code for the evm core contract, which allows to execute Ethereum VM (EVM) code on top of the ISC chain, thus adding support for Ethereum smart contracts.

Installing @iscmagic contracts

The @iscmagic contracts are installable via NPM with

npm install --save @iota/iscmagic

After installing @iota/iscmagic you can use the functions by importing them as you normally would.

import "@iota/iscmagic/ISC.sol"
...
...

JSON-RPC

The Wasp node provides a JSON-RPC service at /chain/<isc-chainid>/evm/jsonrpc. This will allow you to connect any standard Ethereum tool, like Metamask. You can check the Metamask connection parameters for any given ISC chain in the Dashboard.

Complete example using wasp-cluster

  1. Start a test cluster:

    wasp-cluster start -d
    
  2. In a different terminal, initialize a private key and request some iotas from the faucet:

    wasp-cli init
    wasp-cli request-funds
    
  3. Deploy an ISC chain with an arbitrary Ethereum chain ID (which should be different from any standard Ethereum chain IDs -- see https://chainlist.org):

    wasp-cli chain deploy --chain=mychain --evm-chainid 1234
    
  4. Send some base tokens from your L1 account to any Ethereum account on L2 (e.g. to cover for gas fees):

    wasp-cli chain deposit 0xa1b2c3d4... base:1000000
    
  5. Visit the Wasp dashboard (<URL>/wasp/dashboard when using node-docker-setup), go to Chains, then to your ISC chain, scroll down and you will find the EVM section with the JSON-RPC URL for Metamask or any other Ethereum tool.

You can now deploy an EVM contract like you would on Ethereum.

For more information check out the docs.

# Packages

Package emulator contains the implementation of the EVMEmulator and subcomponents.
Package evmimpl contains the implementation of the `evm` core contract.
package evmnames provides the names of EVM core contract functions and fields.
Package evmtest contains solo tests for the evm core contract.
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

IOTA -- get it?.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
int32.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
uint32.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NFTID.
No description provided by the author
No description provided by the author
No description provided by the author
uint8.
string.
string.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
FuncCallContract is the entry point called by an evmOffLedgerCallRequest in order to process a view call or gas estimation (e.g.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FuncSendTransaction is the main entry point, called by an evmOffLedgerTxRequest in order to process an Ethereum tx (e.g.

# Structs

This hack is so that the ERC721 tokenURI view function returns the NFT name and description for explorers.