package
0.0.0-20210127022441-ac8b7ceb0103
Repository: https://github.com/gavinxu520/go-ethereum-analysis.git
Documentation: pkg.go.dev

# Packages

Package runtime provides a basic execution model for executing EVM code.

# Functions

NewContract returns a new contract environment for the execution of EVM.
NewEVM returns a new EVM.
NewEVMInterpreter returns a new instance of the Interpreter.
NewMemory returns a new memory memory model.
NewStructLogger returns a new logger.
No description provided by the author
No description provided by the author
RunPrecompiledContract runs and evaluates the output of a precompiled contract.
StringToOp finds the opcode whose name is stored in `str`.
WriteLogs writes vm logs in a readable format to the given writer.
WriteTrace writes a formatted trace to the given writer.

# Constants

1 == 0x01.
8.
0x30 == 48.
0x16.
0x31 == 49.
0x40 == 64.
0x1a == 26.
0xf1 这个一个执行码对应的 execute 中会再次调用EVM.Call() 函数,使得Call函数形成 【间接递归】.
0xf2.
0x37.
0x35.
0x36.
0x33.
0x34.
0x39.
0x38.
0x41.
0xf0 == 15 * 16 == 240.
0xf5.
0xf4.
0x44.
4.
0xb1.
0x80 == 128.
0x89.
0x8a == 138.
0x8b.
0x8c.
0x8d.
0x8e.
0x8f.
0x81.
0x82.
0x83.
0x84.
0x85.
0x86.
0x87.
0x88.
0x14.
10 == 0x0a.
0x3c.
0x3f == 63.
0x3b.
0x5a == 90.
Gas costs.
Gas costs.
超低级.
低级.
0x45 == 69.
.
0x3a == 58.
基础级.
Gas costs.
高级.
Gas costs.
0x11 == 17.
0x15.
0x56.
0x5b == 91.
0x57.
0xa0 == 160.
0xa1 == 161.
0xa2.
0xa3.
0xa4 == 164.
0x10 == 16.
0x51.
6.
0x59.
0x52.
0x53.
2.
9.
0x19.
0x43.
0x17.
0x32.
0x58.
0x50 == 80.
0xb0 == 176.
0x60 == 96.
0x69.
0x6a == 106.
0x6b.
0x6c.
0x6d.
0x6e.
0x6f.
0x70 == 112.
0x71.
0x72.
0x61.
0x73.
0x74.
0x75.
0x76.
0x77.
0x78.
0x79.
0x7a == 122.
0x7b.
0x7c.
0x62.
0x7d.
0x7e.
0x7f.
0x63.
0x64.
0x65.
0x66.
0x67.
0x68.
0xf3.
0x3e.
0x3d.
0xfd == 253.
0x1d == 29.
5.
0xff == 255.
0x13.
32.
0x1b.
0x1c.
11 == 0x0b.
0x54.
0x12.
7.
0x55.
0xfa == 250.
0 == 0x00.
3.
0xb2 == 178.
0x90 == 144.
0x99.
0x9a == 154.
0x9b.
0x9c.
0x9d.
0x9e.
0x9f == 159.
0x91.
0x92.
0x93.
0x94.
0x95.
0x96.
0x97.
0x98.
0x42.
0x18.

# Variables

部署合约时 code 消耗的gas 太多.
合约地址冲突.
超过最大通话深度.
余额不足,无法转移.
没有兼容的 执行器.
gas 不足.
日志数达到指定限制.
PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum contracts used in the Byzantium release.
PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum contracts used in the Frontier and Homestead releases.

# Structs

Config are the configuration options for the Interpreter.
Context provides the EVM with auxiliary information.
Contract represents an ethereum contract in the state database.
EVM is the Ethereum Virtual Machine base object and provides the necessary tools to run a contract on the given state with the provided context.
EVMInterpreter represents an EVM interpreter.
LogConfig are the configuration options for structured logger the EVM.
Memory implements a simple memory model for the ethereum virtual machine.* 自定义一个简单的 内存结构 */ evm的内存结构.
No description provided by the author
No description provided by the author
Stack is an object for basic stack operations.
StructLog is emitted to the EVM each cycle and lists information about the current internal state prior to the execution of the statement.
StructLogger is an EVM state logger and implements Tracer.

# Interfaces

CallContext provides a basic interface for the EVM calling conventions.
ContractRef is a reference to the contract's backing object.
Interpreter is used to run Ethereum based contracts and will utilise the passed environment to query external sources for state information.
PrecompiledContract is the basic interface for native Go contracts.
StateDB is an EVM database for full state querying.
Tracer is used to collect execution traces from an EVM transaction execution.

# Type aliases

AccountRef implements ContractRef.
No description provided by the author
No description provided by the author
OpCode is an EVM opcode 定义EVM的执行码.
Storage represents a contract's storage.
No description provided by the author