@typechain/ethers-v5
Advanced tools
Comparing version 8.0.0 to 8.0.1
# @typechain/ethers-v5 | ||
## 8.0.1 | ||
### Patch Changes | ||
- b989dff: Fix structs generated as arrays | ||
## 8.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -43,8 +43,13 @@ "use strict"; | ||
else { | ||
if (options.useStructs) { | ||
if (evmType.structName) { | ||
if (evmType.structName) { | ||
if (options.useStructs) { | ||
return evmType.structName + common_1.STRUCT_INPUT_POSTFIX + '[]'; | ||
} | ||
else { | ||
return `(${generateInputType({ ...options, useStructs: true }, evmType.itemType)})`; | ||
} | ||
} | ||
return `(${generateInputType({ ...options, useStructs: true }, evmType.itemType)})[]`; | ||
else { | ||
return `(${generateInputType({ ...options, useStructs: true }, evmType.itemType)})[]`; | ||
} | ||
} | ||
@@ -56,6 +61,4 @@ case 'boolean': | ||
case 'tuple': | ||
if (options.useStructs) { | ||
if (evmType.structName) { | ||
return evmType.structName + common_1.STRUCT_INPUT_POSTFIX; | ||
} | ||
if (evmType.structName && options.useStructs) { | ||
return evmType.structName + common_1.STRUCT_INPUT_POSTFIX; | ||
} | ||
@@ -87,8 +90,13 @@ return generateTupleType(evmType, generateInputType.bind(null, { ...options, useStructs: true })); | ||
else { | ||
if (options.useStructs) { | ||
if (evmType.structName) { | ||
if (evmType.structName) { | ||
if (options.useStructs) { | ||
return evmType.structName + common_1.STRUCT_OUTPUT_POSTFIX + '[]'; | ||
} | ||
else { | ||
return `(${generateOutputType({ ...options, useStructs: true }, evmType.itemType)})`; | ||
} | ||
} | ||
return `(${generateOutputType({ ...options, useStructs: true }, evmType.itemType)})[]`; | ||
else { | ||
return `(${generateOutputType({ ...options, useStructs: true }, evmType.itemType)})[]`; | ||
} | ||
} | ||
@@ -100,6 +108,4 @@ case 'boolean': | ||
case 'tuple': | ||
if (options.useStructs) { | ||
if (evmType.structName) { | ||
return evmType.structName + common_1.STRUCT_OUTPUT_POSTFIX; | ||
} | ||
if (evmType.structName && options.useStructs) { | ||
return evmType.structName + common_1.STRUCT_OUTPUT_POSTFIX; | ||
} | ||
@@ -106,0 +112,0 @@ return generateOutputComplexType(evmType.components, { ...options, useStructs: true }); |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"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
73551
848