sol-ts-generator

Generate typescript type definitions from Ethereum smart contracts ABI that will allow you to write static typed Typescript tests in your Truffle projects

Usage no npm install needed!

<script type="module">
  import solTsGenerator from 'https://cdn.skypack.dev/sol-ts-generator';
</script>

README

Generate Typescript type definitions from Solidity

Generate typescript type definitions from Ethereum smart contracts ABI that will allow you to write static typed Typescript tests in your Truffle projects

Background

Inspired by the amazing work of Bloom and TypeChain

I decided to turn those ideas into a simple package

For a sample project check this boilerplate

Install

npm install sol-ts-generator

Options

Usage: sol-ts-generator [options]

Options:
   --outDir, output directory to write the type definitions; default is "./types" [string]
   --glob, pattern to get existing abi code; default is "./build/contracts/*.json" [string]

Commands

npm test

npm run build