dethcrypto / dethcrypto/TypeChain
[Bug] Type 'Contract' is not assignable to type 'SomeContract'.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
I followed the official web3 example, but for some reason it throws a bunch of errors for me, because my case-scenario has deploy and send chained to the instance.

If I do it with this approach, then I don't have the deployed contract stored for the future interaction.
```ts
let factory: FactoryContext
// ... later on
factory = new web3.eth.Contract(FactoryArtifact.abi) as unknown as FactoryContext
await factory.deploy({ ... }}.send({ ... })
// ... later on
expect(factory.options.address).toBeTruthy() // error (undefined)
```
So I had to `@ts-ignore` the line, for now. Is there a solution to this that's not documented, because I'm struggling to find the way?
Contributor guide
Assessment
This issue has not been assessed yet.