dethcrypto / dethcrypto/TypeChain

Unable to pass .bin files to `@typechain/ethers-v5` target

Open
#753 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

I want to generate typings for my contract using `@typechain/ethers-v5` target from .abi and .bin files using runTypeChain function, but it fails to detect bytecode and doesn't generate correct factory(no deploy function).

```ts
const allFiles = glob(cwd, [`artifacts/*.abi`]);

await runTypeChain({
cwd,
filesToProcess: allFiles,
allFiles,
outDir: 'artifacts',
target: 'ethers-v5',
});
```

Looking into ether-v5 package code I see that it does support parsing .bin files to it. However before the execution reaches that package, TypeChain throws an `MalformedAbiError: Not a json` error because it expects all passed files in both `filesToProcess` and `allFiles` to be a valid json.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.