JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44
  • Score
    100M100P100Q63371F
  • License ISC

Solidity Smart Contract specification generation tool based on Foundry tests and slang

Package Exports

  • @0xcompose/sspec
  • @0xcompose/sspec/bin/src/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@0xcompose/sspec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sspec

sspec comes from Solidity SPECification. Often smart contract repos lack detailed of even general description of what repo and smart contracts in it are doing. Only AIs can understand what's going (not always). So for sake of development and review simplicity this tool was created.

This is a re-imagined of scopelint's spec command, which generated specification for source smart contracts based on test files and test names.

Such functionality helps not only understanding your own suites of tests, but also review other's repos.

Built using slang.

Foundry Test Naming According to sspec

There are three valid naming conventions for unit testing (according to foundry best practice):

  1. SourceContractName.t.sol, where test contract is named SourceContractNameTest
  2. SourceContractName.sourceFunctionName.t.sol, where test contract is named SourceFunctionName with pascal case
  3. SourceContractName.FeatureName.t.sol, where test contract is named FeatureName. It is not required to be actual feature, feature can be anything, including integration tests