TypeChain
TypeChain copied to clipboard
🔌 TypeScript bindings for Ethereum smart contracts
I have some code which attempts to get the contract name by checking `contractInstance.constructor._json.contractName` and this executes fine, but can't compile with TypeChain, throwing error `Property '_json' does not exist...
'Overrides' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled. ```console compile:~ $ Error: test__factory.ts:12:52 - error TS1444: 'Overrides' is a...
When I run the command `npx typechain --discriminate-types --target ethers-v5 out/**/*.json --show-stack-traces` I get this following stack trace... ``` 55 | 56 | > 57 | export interface print_bytes[]_array_EventObject {arg0:...
`@typechain/starknet.js` -> `@typechain/starknet`
Use ```typescript import type * as factories from "./factories"; export type { factories }; ``` instead of ```typescript export * as factories from "./factories"; ``` A workaround because [api-exporter](https://api-extractor.com/) does...
LayerZero uses a function in solidity called "send" (here: https://layerzero.gitbook.io/docs/guides/master/how-to-send-a-message) This fails to compile with TypeChain because ``` types/truffle-contracts/ILayerZeroEndpoint.d.ts:15:18 - error TS2430: Interface 'ILayerZeroEndpointInstance' incorrectly extends interface 'ContractInstance'. Types of...
In the first few lines of the generated `index.d.ts`, the folders are exported as a pair of `import` and `export`. For example: ``` typescript import type * as chainlink from...
When trying to import a contract factory, the following generated line throws an error: ``` ... export * as factories from "./factories"; ... ``` I think it may be related...
``` 'PromiseOrValue' is declared but never used. ``` with `"@typechain/ethers-v5": "10.1.0"` / `"typechain": "8.1.0"`
The method doc is: https://trufflesuite.com/docs/truffle/reference/contract-abstractions/#mycontractsetnetworknetwork_id ``` "truffle": "5.5.15", "@typechain/truffle-v5": "workspace:^8.0.0", "typechain": "workspace:^8.0.0", ```