Exception during contract deployment
We're randomly getting the following exception when calling DeployContractAndWaitForReceiptAsync {"Contract code not deployed successfully"} at Nethereum.RPC.TransactionReceipts.TransactionReceiptPollingService.<PollForContractAddressAsync>d__13.MoveNext() at Nethereum.RPC.TransactionReceipts.TransactionReceiptPollingService.<ValidateDeploymentTransactionReceipt>d__12.MoveNext() at Nethereum.Contracts.DeploymentHandlers.DeploymentTransactionReceiptPollHandler`1.<SendTransactionAsync>d__3.MoveNext()
Note, the TransactionReceipt included in the exception does have a ContractAddress.
Occurs in our local test environment running Geth in dev mode (geth --http --http.api eth,net,web3,debug --dev --dev.period 2 --keystore
Hi!
We are getting same error.
Despite the fact that contract was actually deployed, but slow node sync (it is a guess), NEthereum throws an exception for successful contract deployment. It occurs randomly, if our provider returns ethCode with actual deployed bytecode, then everything is ok. If it returns 0x then we get an error. But it was actually deployed. So we need to figure out what is the proper way to handle such cases, when contract was deployed but not synced yet across all nodes.
Here is the smart contract that was deployed: https://sepolia.etherscan.io/address/0x04a8719a4a2e437099edbc057bb2e45ee08858fd#code
- Bytecode is not
0x - Alchemy returns
0xtop result on screen 2 - NEthereum throws error
Screen 1
Screen 2