evmimpl

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 41 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evmimpl contains the implementation of the `evm` core contract.

The `evm` core contract is responsible for executing and storing:

See:

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPayingUnpayableMethod = coreerrors.Register("attempt to pay unpayable method %v")
)
View Source
var Processor = evm.Contract.Processor(nil,
	evm.FuncSendTransaction.WithHandler(restricted(applyTransaction)),
	evm.FuncCallContract.WithHandler(restricted(callContract)),

	evm.FuncRegisterERC20NativeToken.WithHandler(registerERC20NativeToken),
	evm.FuncRegisterERC20NativeTokenOnRemoteChain.WithHandler(restricted(registerERC20NativeTokenOnRemoteChain)),

	evm.FuncRegisterERC20ExternalNativeToken.WithHandler(registerERC20ExternalNativeToken),
	evm.FuncRegisterERC721NFTCollection.WithHandler(registerERC721NFTCollection),

	evm.FuncNewL1Deposit.WithHandler(newL1Deposit),

	evm.FuncGetERC20ExternalNativeTokenAddress.WithHandler(viewERC20ExternalNativeTokenAddress),
	evm.FuncGetERC721CollectionAddress.WithHandler(viewERC721CollectionAddress),
	evm.FuncGetChainID.WithHandler(getChainID),
)

Functions

func AddDummyTxWithTransferEvents added in v1.4.0

func AddDummyTxWithTransferEvents(
	ctx isc.Sandbox,
	toAddress common.Address,
	assets *isc.Assets,
	txData []byte,
	reuseCurrentTxContext bool,
)

func MintBlock added in v1.0.3

func MintBlock(evmPartition kv.KVStore, chainInfo *isc.ChainInfo, blockTimestamp time.Time)

MintBlock "mints" the Ethereum block after all requests in the ISC block have been processed. IMPORTANT: Must only be called from the ISC VM

func Nonce added in v1.0.3

func Nonce(evmPartition kv.KVStoreReader, addr common.Address) uint64

func SetInitialState added in v1.0.3

func SetInitialState(evmPartition kv.KVStore, evmChainID uint16, createBaseTokenMagicWrap bool)

SetInitialState initializes the evm core contract and the Ethereum genesis block on a newly created ISC chain.

Types

type StateAccess added in v1.0.3

type StateAccess struct {
	// contains filtered or unexported fields
}

func NewStateAccess added in v1.0.3

func NewStateAccess(store kv.KVStoreReader) *StateAccess

func (*StateAccess) Nonce added in v1.0.3

func (sa *StateAccess) Nonce(addr common.Address) uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL