In Ask! message is payable even if there's no modifiers. For example, ``` @message({ mutates: true }) flip(): void { this.data.flag = !this.data.flag; let event = new FlipEvent(this.data.flag); // @ts-ignore env().emitEvent(event); } ``` This will generate metadata.json payable true, and it is actually payable. ``` "messages": [ { "mutates": true, "payable": true, "args": [], "docs": [], "label": "flip", "selector": "0x633aa551" } ] ``` Is there a way to specify message to be non-payable?
Activity
[-]Non payable function in Ask! ?[/-][+]Non payable message in Ask! ?[/+]yjhmelody commentedon Feb 6, 2023
Some things need to be considered first when support non-payable.
The logic of checking
non-payableneed to make sureBalancetype first in decorator.So we need to make sure the abstract level of
Balancetype.BTW, the ability of
payableis super class ofnon-payblein actually.shunsukew commentedon Feb 6, 2023
I see,
I raised the PR #250, but there were some considerations and this line is intentional to
stop users from using
payable: false?shunsukew commentedon Feb 7, 2023
I missed TODO comment in the source code for some reason, I recognize it intentional and non-payable hasn't not supported yet.