1

Simple question about create2 failure.

Does create2 increase the nonce of the computed contract’s deployment address ? Or does the first nonce increment operation happens after the first call to the deployed address ?

1
  • I would like a code reference from an actual implementation. Oct 4 '19 at 20:15
1

Both CREATE and CREATE2 opcodes execute the same create in geth.

Following EIP158 the nonce is set to 1 before executing the constructor.

if evm.chainRules.IsEIP158 {
    evm.StateDB.SetNonce(address, 1)
}

...

ret, err := run(evm, contract, nil, false)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.