dethcrypto / dethcrypto/TypeChain

How to use zksync-ethers with typechain?

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

Description

typechain generate `__factory` files and export in `index.ts`, and factory extend ContractFactory in ethers, like this:
```typescript
export class TimelockController__factory extends ContractFactory {
```
however, I should use ContractFactory from zksync-ethers in the second argument of `handleDeploy`. Clearly mismatch the type. like below:
```typescript
return this.multiProvider.handleDeploy(
chain,
new TimelockController__factory(),
// delay, [proposers], [executors], admin
[
timelockConfig.delay,
[timelockConfig.roles.proposer],
[timelockConfig.roles.executor],
ethers.constants.AddressZero,
],
);
```

Should I use a wrapper to make the typechain generated factory compatible with zksync-ethers or there're other standardized way to handle such cases?

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.