:mod:`ethereum.vm.stack` ======================== .. py:module:: ethereum.vm.stack Ethereum Virtual Machine (EVM) Stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. contents:: Table of Contents :backlinks: none :local: Introduction ------------ Implementation of the stack operators for the EVM. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: ethereum.vm.stack.pop ethereum.vm.stack.push Module Details --------------- pop ~~~ .. function:: pop(stack: List[ethereum.base_types.U256]) -> ethereum.base_types.U256 :noindexentry: Pops the top item off of `stack`. :param stack: EVM stack. :returns: **value** -- The top element on the stack. :rtype: `U256` :raises StackUnderflowError: If `stack` is empty. .. undocinclude:: /../src/ethereum/vm/stack.py :language: python :lines: 21-43 push ~~~~ .. function:: push(stack: List[ethereum.base_types.U256], value: ethereum.base_types.U256) -> None :noindexentry: Pushes `value` onto `stack`. :param stack: EVM stack. :param value: Item to be pushed onto `stack`. :raises StackOverflowError: If `len(stack)` is `1024`. .. undocinclude:: /../src/ethereum/vm/stack.py :language: python :lines: 46-66