Neo: Send neo/gas to a contract address without onNEP17payment defined successfully

Created on 1 Mar 2021  路  5Comments  路  Source: neo-project/neo

Describe the bug

deploy a contract without onNEP17payment defined and send neo/gas to the contact address immediately so that they are dealt with in one block.

To Reproduce
Steps to reproduce the behavior:

  1. Start a CN and NN.
  2. Deploy the contract and send neo to the contract address.
  3. make above two tx into one block.
  4. send neo to the contract address successfully, which should throw exception.

df8fc3e836042f8ee5edaec0b2fb398

Most helpful comment

Because the contract is not deployed.

All 5 comments

If the contract deployment tx and send neo to the contract address tx is in one block, it will not throw exception, and send neo will be successful.

I think that it's the same that send neo to a predicted smart contract address, isn't it?... if the smart contract it's wrong could be like a burn, for me it's something expected

make above two tx into one block.

Which is the first one in the block? If the transfer is the first, it should succeed. Otherwise, if the deployment is the first, the transfer should fail.

make above two tx into one block.

Which is the first one in the block? If the transfer is the first, it should succeed. Otherwise, if the deployment is the first, the transfer should fail.

If the transfer is the first, it should succeed. why?

Because the contract is not deployed.

It's the same to send to unknown address @cloud8little

Was this page helpful?
0 / 5 - 0 ratings

Related issues

igormcoelho picture igormcoelho  路  4Comments

canesin picture canesin  路  3Comments

vncoelho picture vncoelho  路  3Comments

igormcoelho picture igormcoelho  路  3Comments

erikzhang picture erikzhang  路  4Comments