-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Background
What problems do you aim to solve? How does it serve the mission of a user owned internet?
Public smart contracts function are required to return responsevalues that can have a success value or error value. It is common practise to return unsigned integer values as error codes. This project is about standardizing these codes and make error code more accessible to users and developers.
Project Overview
What solution are you providing? Who will it serve?
The project is about collecting all sorts of error codes and bring them into a structure, maybe similar to http status code 4xx and 5xx. This can be used by explorer, apps and other protocols to handle contract call errors in a more human friendly way.
Scope
What are the components or technical specs of the project? What will the final deliverable look like? How will you measure success?
The outcome should be a table of error codes and description of the meaning together with a recommended error message. Furthermore, a SIP should be written and pushed to ratification. The SIP would contain the error code description as well as a trait that converts error codes into error messages.
Budget and Milestones
What grant amount are you seeking? How long will the project take in hours? If more than 20, please break down the project into milestones, with a clear output (e.g., low-fi mockup, MVP with two features) and include the estimated work hours for each milestone.
Total Grant Request: $3000
M1: Propose standard
- Collection of all error code in native function + error codes in the wild with some kind of categorization
- Clarity trait definition
- An example to serve to justify the design choices.
- A Stacks Governance SIP proposal.
- Feedback from developer community.
- Detailed explanation for how contract developers, explorer and apps would make use of this standard.
- Detailed plan for how you plan to document and help the community coalesce around your token standard: Website, documentation, example code, videos, office hours, etc.
M2:
In the rollout phase, the team will finalize feedback gathering from community, document final decisions and produce materials intended to help the Stacks community adopt the standard.
- Complete activities described in propose phase such as documentation.
- Help new developers or integrators adopt your standard, serving as a “point-person” for help, questions, or evolving the standard as needed.
- Share a completion report with the Stacks community summarizing the project and what future efforts, if any, might look like.
Recommended Team
Who is building this? What relevant experience do you bring to this project? Are there skills sets you are missing that you are seeking from the community? Please share links to previous work.
This project will require expertise with smart contracts, Clarity, and the Stacks community.
Risks
What dependencies or obstacles do you anticipate? What contingency plans do you have in place?
With Stacks 2.1, Clarity could have a better support for error types #33 that could make part of this proposal irrelevant.
Community and Supporting Materials
Do you have previous projects, code commits, or experiences that are relevant to this application? What community feedback or input have you received? How do you plan to share your plan to the community over time and as the final deliverable?
There is discussion about handline error codes at
clarity-lang/reference#33, https://forum.stacks.org/t/sip-9-and-sip-10-transfer-signature-difference/11852 and a long thread in discord https://discord.com/channels/621759717756370964/713087894260023377/822054695451099166