archethic-foundation / archethic-foundation/archethic-node
Wasm contract manifest should be more strict
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Is your feature request related to a problem?
Wasm manifest is an object to describe the functions and the behaviour of a contract.
This spec will be often used by third party apps to determine which functions or actions a contract expose.
But based on the contract some value may or may not be present which make the manifest more complex to handle.
### Describe the solution you'd like
Hence to be easier to parse and get the needed values, the structure should always be the same and should always have all the possible keys.
For example a public functions without argument should add the "inputs" key in the spec with an empty map
```json
"functions": {
"getState": {
"type": "publicFunction",
"inputs:" {}
}
}
```
This allows third party app to parse and get the inputs of a functions even if there is no inputs.
### Additional context
_No response_
### Epic
_No response_
Contributor guide
Research direction
Start by locating the Wasm contract manifest generation or serialization entry point and any existing manifest-related tests. Ensure every supported manifest key is emitted consistently, including an empty inputs map for public functions without arguments, then verify the resulting manifest structure against the example in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, wasm
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100