MCPcopy Create free account
hub / github.com/Jesserc/gevm / origin

Function origin

gevm/instructions.go:283–288  ·  view source on GitHub ↗

This is a mocked version and doesn't behave exactly as it would in a real EVM. origin pushes a mocked address (evm.Sender) of the transaction origin onto the stack.

(evm *EVM)

Source from the content-addressed store, hash-verified

281//
282// origin pushes a mocked address (evm.Sender) of the transaction origin onto the stack.
283func origin(evm *EVM) {
284 // We're using evm.Sender because this is a mocked version, but evm.sender may not always be the same as tx.origin in real world cases.
285 evm.Stack.Push(uint256.MustFromHex(evm.Sender.Hex()))
286 evm.PC++
287 evm.deductGas(2)
288}
289
290// This is a mocked version and doesn't behave exactly as it would in a real EVM.
291//

Callers

nothing calls this directly

Calls 2

PushMethod · 0.80
deductGasMethod · 0.80

Tested by

no test coverage detected