evm

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MonomerGenesisRootHash is the known root hash of the monomer ethereum state trie after all predeployed contracts are created.
	MonomerGenesisRootHash = common.HexToHash("0x5be0a68aae2d389cd9c9276ece59f483b97da7e99d2ff157923f4822dc107b6b")
	// MonomerEVMTxOriginAddress is the address used for executing transactions in the monomer EVM.
	MonomerEVMTxOriginAddress = common.HexToAddress("0x4300000000000000000000000000000000000000")
)

Functions

func CanTransfer

func CanTransfer(db vm.StateDB, addr common.Address, amount *uint256.Int) bool

CanTransfer is overridden to explicitly allow all transfers in the monomer EVM. This avoids needing to deal with account balances.

func NewEVM

func NewEVM(ethState vm.StateDB, header *monomer.Header) (*vm.EVM, error)

Types

type CallParams

type CallParams struct {
	Sender *common.Address
	Value  *big.Int
	Data   []byte
}

type MonomerContractExecuter

type MonomerContractExecuter struct {
	ABI *gethabi.ABI
	// contains filtered or unexported fields
}

func NewMonomerContractExecuter

func NewMonomerContractExecuter(evm *vm.EVM, abiJSON string, contractAddr common.Address) (*MonomerContractExecuter, error)

func (*MonomerContractExecuter) Call

func (e *MonomerContractExecuter) Call(params *CallParams) ([]byte, error)

Jump to

Keyboard shortcuts

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