How to use the typechain/shared.getFilename 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 ethereum-ts / TypeChain / packages / typechain-target-truffle / lib / index.ts View on Github external
transformFile(file: TFileDesc): TFileDesc | void {
    const abi = extractAbi(file.contents);
    const isEmptyAbi = abi.length === 0;
    if (isEmptyAbi) {
      return;
    }

    const name = getFilename(file.path);

    const contract = parse(abi, name);

    this.contracts.push(contract);
  }