@typechain/ethers-v5
Advanced tools
Comparing version 8.0.1 to 8.0.2
# @typechain/ethers-v5 | ||
## 8.0.2 | ||
### Patch Changes | ||
- ba4c18a: Fix support for constructors with structs | ||
## 8.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -175,4 +175,12 @@ "use strict"; | ||
function codegenCommonContractFactory(contract, abi) { | ||
var _a; | ||
const constructorStructs = []; | ||
(_a = contract.constructor[0]) === null || _a === void 0 ? void 0 : _a.inputs.forEach(({ type }) => { | ||
const { structName } = type; | ||
if (structName) { | ||
constructorStructs.push(structName + common_1.STRUCT_INPUT_POSTFIX); | ||
} | ||
}); | ||
const header = ` | ||
import type { ${contract.name}, ${contract.name}Interface } from "../${contract.name}"; | ||
import type { ${[contract.name, contract.name + 'Interface', ...constructorStructs].join(', ')} } from "../${contract.name}"; | ||
@@ -179,0 +187,0 @@ const _abi = ${JSON.stringify(abi, null, 2)}; |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "8.0.1", | ||
"version": "8.0.2", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74320
856