go-ethereum/core/vm/stack.libevm.go
Arran Schlosberg df1338920b
feat: vm.MutableStack wrapper (#31)
* feat: `vm.MutableStack` wrapper

* refactor: use `require.Empty()`
2024-09-18 12:29:39 -04:00

14 lines
361 B
Go

package vm
import "github.com/holiman/uint256"
// A MutableStack embeds a Stack to expose unexported mutation methods.
type MutableStack struct {
*Stack
}
// Push pushes a value to the stack.
func (s MutableStack) Push(d *uint256.Int) { s.Stack.push(d) }
// Pop pops a value from the stack.
func (s MutableStack) Pop() uint256.Int { return s.Stack.pop() }