EOSIO / EOSIO/ricardian-template-toolkit

Static analysis tool for Ricardian contracts and clauses

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
45
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I think it would be very helpful to have a static analysis tool that given only an ABI does its best to validate all Ricardian contracts and clauses contained within.

At a minimum it would do the following for each Ricardian contract:

- Enforce the title length limit of 50 characters.
- Ensure the metadata section is properly formatted and includes all necessary fields.
- Verify that the summary string can be properly parsed and no unsupported Handlebar helpers are used.
- Verify that the body can be properly parsed and no unsupported Handlebar helpers are used.

It should also verify that each Ricardian clause can be properly parsed and no unsupported Handlebar helpers are used.

This would really help with automatically checking for common errors like missing curly braces or using unsupported helpers (say due to a typo).

The tool could go even further and ensure all referenced variables are valid, which it can determine via the struct definitions contained in the ABI.

The goal would be to integrate such a tool into the CICD process of EOSIO smart contract repositories to catch certain classes of errors in Ricardians early and automatically.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by mapping the toolkit's existing Ricardian contract and clause rendering from an ABI, then define the validation and CI/CD integration scope. Done should cover the listed title, metadata, parsing, helper, and variable checks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.