Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jesserc/gevm
/ functions
Functions
137 in github.com/Jesserc/gevm
⨍
Functions
137
◇
Types & classes
15
↓ 114 callers
Method
Pop
()
gevm/stack.go:29
↓ 72 callers
Method
deductGas
(gas uint64)
gevm/evm.go:86
↓ 60 callers
Method
Push
(value *uint256.Int)
gevm/stack.go:22
↓ 19 callers
Function
calcMemoryGasCost
calcMemoryCost calculates the gas cost for memory expansion in the EVM. The cost is based on the number of 32-byte words required to store the given s
gevm/common.go:19
↓ 16 callers
Method
Store
(offset uint64, value []byte)
gevm/memory.go:26
↓ 14 callers
Method
Len
()
gevm/memory.go:83
↓ 14 callers
Method
Run
()
gevm/evm.go:101
↓ 12 callers
Method
Access
(offset, size uint64)
gevm/memory.go:7
↓ 9 callers
Function
toWordSize
toWordSize returns the number of 32-byte words required to hold a given size in bytes. In the EVM, 1 word is equal to 32 bytes. The function ensures t
gevm/common.go:10
↓ 8 callers
Method
AddLog
(topics []common.Hash, data []byte)
gevm/log.go:18
↓ 6 callers
Function
calcLogGasCost
(topicCount, size, memExpansionCost uint64)
gevm/common.go:59
↓ 5 callers
Method
Load
(offset uint64)
gevm/memory.go:22
↓ 5 callers
Function
getData
getData returns a slice from the data based on the start and size and pads up to size with zero's. This function is overflow safe.
gevm/common.go:66
↓ 4 callers
Method
Store
(key int, value common.Hash)
gevm/storage.go:24
↓ 4 callers
Method
String
()
gevm/log.go:22
↓ 3 callers
Method
Get
Get does the same thing as Load, except that it doesn't mark the storage slot as 'warm'. It is used in the 'calcSstoreGasCost' function in 'common.go'
gevm/storage.go:35
↓ 3 callers
Method
Load
(key int)
gevm/storage.go:12
↓ 3 callers
Method
Load
(key int)
gevm/transient.go:11
↓ 3 callers
Function
NewTransientStorage
()
gevm/transient.go:26
↓ 3 callers
Method
Store
(key int, value common.Hash)
gevm/transient.go:18
↓ 3 callers
Method
Store32
(offset uint64, value []byte)
gevm/memory.go:54
↓ 2 callers
Method
Gas
()
gevm/opcodes.go:522
↓ 2 callers
Function
NewBlock
NewBlock creates a new block instance.
gevm/evm.go:68
↓ 2 callers
Function
NewEVM
(sender common.Address, gas, value, chainID, gasLimit uint64, code, calldata []byte, blockInfo *Block)
gevm/evm.go:157
↓ 2 callers
Function
NewLogRecord
()
gevm/log.go:35
↓ 2 callers
Function
NewMemory
()
gevm/memory.go:87
↓ 2 callers
Function
NewStack
()
gevm/stack.go:69
↓ 2 callers
Function
NewStorage
()
gevm/storage.go:39
↓ 2 callers
Method
Peek
()
gevm/stack.go:38
↓ 2 callers
Method
ToString
()
gevm/stack.go:46
↓ 2 callers
Function
calcSstoreGasCost
calcSstoreGasCost calculates the gas cost for the SSTORE operation in the EVM. This is a bit simplified compared to the actual implementation in Ethe
gevm/common.go:27
↓ 2 callers
Function
setupEVM
()
gevm/instructions_test.go:12
↓ 1 callers
Method
Clear
()
gevm/transient.go:22
↓ 1 callers
Method
Data
()
gevm/memory.go:79
↓ 1 callers
Method
DynamicGas
DynamicGas returns the gas cost for a given opcode.
gevm/evm.go:15
↓ 1 callers
Function
LogEVMLogs
(totalGasUsed uint64, evm *EVM)
gevm/evm.go:200
↓ 1 callers
Function
NewJumpTable
NewJumpTable creates and returns a new JumpTable for the EVM.
gevm/jump_table.go:7
↓ 1 callers
Method
addRefund
(refund uint64)
gevm/evm.go:146
↓ 1 callers
Method
continueExecution
continueExecution checks if the EVM should continue execution.
gevm/evm.go:94
↓ 1 callers
Function
dupN
(evm *EVM, n uint8)
gevm/instructions.go:534
↓ 1 callers
Function
generateDupNFunc
(index uint8)
gevm/instructions.go:918
↓ 1 callers
Function
generatePushNFunc
This is used in jump_table.go
gevm/instructions.go:906
↓ 1 callers
Function
generateSwapNFunc
(index uint8)
gevm/instructions.go:912
↓ 1 callers
Function
logEVMState
(evm *EVM, op Opcode, gasCost uint64, currentPC uint64)
gevm/evm.go:188
↓ 1 callers
Function
pushN
(evm *EVM, n uint64)
gevm/instructions.go:517
↓ 1 callers
Function
swapN
(evm *EVM, n uint8)
gevm/instructions.go:556
Method
Data
()
gevm/stack.go:65
Method
String
()
gevm/opcodes.go:221
Function
TestCalcLogGasCost
(t *testing.T)
gevm/common_test.go:66
Function
TestCalcMemoryGasCost
(t *testing.T)
gevm/common_test.go:43
Function
TestCalcSstoreGasCost
(t *testing.T)
gevm/storage_test.go:117
Function
TestEVMOperations
Table-driven tests for EVM operations
gevm/instructions_test.go:18
Function
TestGetData
(t *testing.T)
gevm/common_test.go:88
Function
TestLogRecord
(t *testing.T)
gevm/log_test.go:10
Function
TestMemory
(t *testing.T)
gevm/memory_test.go:10
Function
TestNewJumpTable
(t *testing.T)
gevm/jump_table_test.go:7
Function
TestOpcodeGas
(t *testing.T)
gevm/opcodes_test.go:27
Function
TestOpcodeString
(t *testing.T)
gevm/opcodes_test.go:9
Function
TestStack
(t *testing.T)
gevm/stack_test.go:10
Function
TestStorage
(t *testing.T)
gevm/storage_test.go:10
Function
TestToWordSize
(t *testing.T)
gevm/common_test.go:10
Function
TestTransientStorage
(t *testing.T)
gevm/transient_test.go:10
Function
_byte
(evm *EVM)
gevm/instructions.go:202
Function
_return
(evm *EVM)
gevm/instructions.go:758
Function
add
Arithmetic
gevm/instructions.go:18
Function
addmod
(evm *EVM)
gevm/instructions.go:75
Function
address
Ethereum environment (calldata, code, others) operations
gevm/instructions.go:264
Function
and
Bitwise Operations
gevm/instructions.go:174
Function
balance
This is a mocked version and doesn't behave exactly as it would in a real EVM. balance pushes a mocked balance value onto the stack.
gevm/instructions.go:273
Function
basefee
(evm *EVM)
gevm/instructions.go:485
Function
blockhash
blockhash pushes a mocked hash of the current block onto the stack. Normally, this would be the hash of one of the 256 most recent blocks given by a
gevm/instructions.go:447
Function
calldatacopy
(evm *EVM)
gevm/instructions.go:323
Function
calldataload
(evm *EVM)
gevm/instructions.go:312
Function
calldatasize
(evm *EVM)
gevm/instructions.go:305
Function
caller
This is a mocked version and doesn't behave exactly as it would in a real EVM. caller pushes a mocked address of the current transaction caller in a
gevm/instructions.go:293
Function
callvalue
(evm *EVM)
gevm/instructions.go:299
Function
chainid
(evm *EVM)
gevm/instructions.go:498
Function
codecopy
(evm *EVM)
gevm/instructions.go:349
Function
codesize
(evm *EVM)
gevm/instructions.go:342
Function
coinbase
coinbase pushes a block’s beneficiary address onto the stack.
gevm/instructions.go:464
Function
div
(evm *EVM)
gevm/instructions.go:39
Function
eq
(evm *EVM)
gevm/instructions.go:151
Function
exp
(evm *EVM)
gevm/instructions.go:91
Function
extcodecopy
This is a mocked version and doesn't behave exactly as it would in a real EVM. extcodecopy copies a zero-length mocked byte slice to memory.
gevm/instructions.go:397
Function
extcodesize
This is a mocked version and doesn't behave exactly as it would in a real EVM. extcodesize pushes a mocked code size (0) of an external account onto
gevm/instructions.go:387
Function
gas
remaining gas (after this instruction).
gevm/instructions.go:377
Function
gaslimit
(evm *EVM)
gevm/instructions.go:492
Function
gasprice
gasprice pushes a mocked gas price (0) onto the stack.
gevm/instructions.go:369
Function
gt
(evm *EVM)
gevm/instructions.go:129
Function
invalid
Execution control
gevm/instructions.go:743
Function
iszero
(evm *EVM)
gevm/instructions.go:162
Function
jump
Jump operations
gevm/instructions.go:703
Function
jumpdest
(evm *EVM)
gevm/instructions.go:737
Function
jumpi
(evm *EVM)
gevm/instructions.go:713
Function
keccak256
Hash function
gevm/instructions.go:231
Function
log0
Logging
gevm/instructions.go:768
Function
log1
(evm *EVM)
gevm/instructions.go:794
Function
log2
(evm *EVM)
gevm/instructions.go:821
Function
log3
(evm *EVM)
gevm/instructions.go:849
Function
log4
(evm *EVM)
gevm/instructions.go:877
next →
1–100 of 137, ranked by callers