ask-lang / ask-lang/ask

Non payable message in Ask! ?

Open
#249 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
31
Forks
3
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `@message` example and the generated `metadata.json` shown in the issue; determine how message modifiers currently affect the `payable` metadata. The issue asks whether messages can be made non-payable, so done means establishing a supported way to express that and verifying the generated metadata reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, wasm
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.