Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message on transfer to smart contract #143

Open
kroggen opened this issue Oct 15, 2020 · 0 comments
Open

Better error message on transfer to smart contract #143

kroggen opened this issue Oct 15, 2020 · 0 comments

Comments

@kroggen
Copy link
Member

kroggen commented Oct 15, 2020

When making a simple transfer to a smart contract by using a transaction of type TRANSFER:

The transfer fails (as expected) if the contract does not have a payable and default function.

But the error message is strange as the engine treats the transaction of type TRANSFER as a transaction of type CALL:

https://testnet.aergoscan.io/transaction/Fu7eCFB6BnA7xKtuhYjtGkHfzBfZUah7p7iCeCpeqbXs?receipt=json&payload=formatted

"result": "not found function: "

Proposal

If the transaction is of type TRANSFER then the engine:

  • Could return a proper error message, like "the contract does not have a default payable function"
  • Could ignore the payload (maybe)
@kroggen kroggen changed the title Allow transfer to smart contract Better error message on transfer to smart contract Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant