How to use the typechain/dist/TypeChain.TypeChain function in typechain

To help you get started, we’ve selected a few typechain examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github smartcontractkit / chainlink / belt / src / services / compilers / ethers.ts View on Github external
function compiler(
  { artifactsDir, contractAbstractionDir }: config.App,
  cwd: string,
  subDir: string,
): TypeChain {
  return new TypeChain({
    cwd,
    rawConfig: {
      files: join(artifactsDir, subDir, '**', '*.json'),
      outDir: join(contractAbstractionDir, 'ethers', subDir),
      target: 'ethers-v4',
    },
  })
}