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)
| 281 | // |
| 282 | // origin pushes a mocked address (evm.Sender) of the transaction origin onto the stack. |
| 283 | func 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 | // |