aergoio / aergo

aergo blockchain kernel
http://docs.aergo.io
MIT License
214 stars 45 forks source link

txns of type NORMAL should not call contracts #241

Closed kroggen closed 5 months ago

kroggen commented 1 year ago

These changes are intended to be implemented on hardfork V4:

To transfer native Aergo tokens to a smart contract for a function that is not named "default" or that requires arguments, we must use a transaction with type CALL

kroggen commented 1 year ago

Tests to be added:

On hardfork_version >= 4

Should work:

Should fail:

Then repeat the above using NORMAL type

On hardfork_version < 4

Should fail:

The same for NORMAL type

Should work:

The same for NORMAL type

hayarobi commented 6 months ago

@ultrafellen Do you agree with this policy?