Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasm contract manifest should be more strict #1630

Open
Neylix opened this issue Jan 10, 2025 · 0 comments
Open

Wasm contract manifest should be more strict #1630

Neylix opened this issue Jan 10, 2025 · 0 comments
Labels
enhancements smart contracts Involve smart contracts

Comments

@Neylix
Copy link
Member

Neylix commented Jan 10, 2025

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

"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

@Neylix Neylix added enhancements smart contracts Involve smart contracts labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements smart contracts Involve smart contracts
Projects
None yet
Development

No branches or pull requests

1 participant