core/vm: fix regression

This commit is contained in:
Marius van der Wijden 2025-02-22 22:30:08 +01:00
parent 97bb2a5d5a
commit c015dc8b71
1 changed files with 3 additions and 3 deletions

View File

@ -532,7 +532,7 @@ func (evm *EVM) create(caller common.Address, code []byte, gas uint64, value *ui
contract.IsDeployment = true
contract.Gas = gas
ret, err = evm.initNewContract(contract, address, isInitcodeEOF)
ret, err = evm.initNewContract(contract, input, address, isInitcodeEOF)
if err != nil && (evm.chainRules.IsHomestead || err != ErrCodeStoreOutOfGas) {
evm.StateDB.RevertToSnapshot(snapshot)
if err != ErrExecutionReverted {
@ -544,8 +544,8 @@ func (evm *EVM) create(caller common.Address, code []byte, gas uint64, value *ui
// initNewContract runs a new contract's creation code, performs checks on the
// resulting code that is to be deployed, and consumes necessary gas.
func (evm *EVM) initNewContract(contract *Contract, address common.Address, isInitcodeEOF bool) ([]byte, error) {
ret, err := evm.interpreter.Run(contract, nil, false, contract.IsDeployment)
func (evm *EVM) initNewContract(contract *Contract, input []byte, address common.Address, isInitcodeEOF bool) ([]byte, error) {
ret, err := evm.interpreter.Run(contract, input, false, contract.IsDeployment)
if err != nil {
return ret, err
}