1

We all know that the nonce of smart contract can be added 1 time when one subcontract is created using solidity. I'd like to know if the creation of subcontract is the only way to increase nonce. If not, is there other way to increase it?

INFO: The nonce I mentioned above is used to generate subcontract address. How is the address of an Ethereum contract computed?

1 Answers1

3

Yes, the contract nonce counts how many contract creation operations it's done (starting at 1, although it used to be 0) and a contract create operation is the only way to increase it.

However, the nonce increment happens before the create operation and remains even if the contract creation fails, and also if the child contract later suicides, so it is possible to increment the nonce without actually ending up with a corresponding child contract on the blockchain.

Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58