athenavm / athena

Athena monorepo
https://www.athenavm.org/
Apache License 2.0
21 stars 2 forks source link

`payable` template methods #202

Open lrettig opened 3 weeks ago

lrettig commented 3 weeks ago

As in EVM, a template method should be declared payable in order to receive incoming coins. If a non-payable method is the target of a CALL that includes a nonzero amount, that call should immediately fail. We likely want to use a macro for this, to make the DevEx straightforward.

Note: any method can be declared payable; this also applies to fallback (#203) and receive (#204)