Commit 75d8dcd3 authored by Mark Tyneway's avatar Mark Tyneway

l2geth: remove layer of indirection with state manager

This PR removes the assignment of a pointer to the
state manager abi and just directly uses it instead.
There is an assumption that the state manager abi exists,
but this check happens at startup time, when the abis are
pulled from the state dump.
parent 1574f946
---
'@eth-optimism/l2geth': patch
---
Remove layer of indirection in `callStateManager`
......@@ -34,10 +34,7 @@ var funcs = map[string]stateManagerFunction{
}
func callStateManager(input []byte, evm *EVM, contract *Contract) (ret []byte, err error) {
rawabi := evm.Context.OvmStateManager.ABI
abi := &rawabi
method, err := abi.MethodById(input)
method, err := evm.Context.OvmStateManager.ABI.MethodById(input)
if err != nil {
return nil, fmt.Errorf("cannot find method id %s: %w", input, err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment