@typechain/ethers-v5
Advanced tools
Comparing version 6.0.2 to 6.0.3
# @typechain/ethers-v5 | ||
## 6.0.3 | ||
### Patch Changes | ||
- 8528c8f: Allow passing `from` as part of the overrides to contract call | ||
- 5a1cb26: Prefer imports from `ethers` namespace to avoid mixing incompatible versions | ||
## 6.0.2 | ||
@@ -4,0 +11,0 @@ |
@@ -25,3 +25,5 @@ "use strict"; | ||
${overloadedName !== null && overloadedName !== void 0 ? overloadedName : fn.name}(${types_1.generateInputTypes(fn.inputs)}${!options.isStaticCall && !typechain_1.isConstant(fn) && !typechain_1.isConstantFn(fn) | ||
? `overrides?: ${isPayable(fn) ? 'PayableOverrides' : 'Overrides'}` | ||
? `overrides?: ${isPayable(fn) | ||
? 'PayableOverrides & { from?: string | Promise<string> }' | ||
: 'Overrides & { from?: string | Promise<string> }'}` | ||
: 'overrides?: CallOverrides'}): ${(_a = options.overrideOutput) !== null && _a !== void 0 ? _a : `Promise<${options.isStaticCall || fn.stateMutability === 'pure' || fn.stateMutability === 'view' | ||
@@ -28,0 +30,0 @@ ? types_1.generateOutputTypes(!!options.returnResultObject, fn.outputs) |
@@ -17,4 +17,3 @@ "use strict"; | ||
const template = ` | ||
import { ethers, EventFilter, Signer, BigNumber, BigNumberish, PopulatedTransaction } from 'ethers'; | ||
import { ${contractImports.join(', ')} } from '@ethersproject/contracts'; | ||
import { ethers, EventFilter, Signer, BigNumber, BigNumberish, PopulatedTransaction, ${contractImports.join(', ')} } from 'ethers'; | ||
import { BytesLike } from '@ethersproject/bytes'; | ||
@@ -125,3 +124,5 @@ import { Listener, Provider } from '@ethersproject/providers'; | ||
const constructorArgs = (contract.constructor && contract.constructor[0] ? types_1.generateInputTypes(contract.constructor[0].inputs) : '') + | ||
`overrides?: ${((_a = contract.constructor[0]) === null || _a === void 0 ? void 0 : _a.stateMutability) === 'payable' ? 'PayableOverrides' : 'Overrides'}`; | ||
`overrides?: ${((_a = contract.constructor[0]) === null || _a === void 0 ? void 0 : _a.stateMutability) === 'payable' | ||
? 'PayableOverrides & { from?: string | Promise<string> }' | ||
: 'Overrides & { from?: string | Promise<string> }'}`; | ||
const constructorArgNamesWithoutOverrides = contract.constructor && contract.constructor[0] ? generateParamNames(contract.constructor[0].inputs) : ''; | ||
@@ -141,5 +142,4 @@ const constructorArgNames = constructorArgNamesWithoutOverrides | ||
return ` | ||
import { ${ethersImports.join(', ')} } from "ethers"; | ||
import { ${[...ethersImports, ...ethersContractImports].join(', ')} } from "ethers"; | ||
import { Provider, TransactionRequest } from '@ethersproject/providers'; | ||
import { ${ethersContractImports.join(', ')} } from "@ethersproject/contracts"; | ||
@@ -146,0 +146,0 @@ import type { ${contract.name} } from "../${contract.name}"; |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain", |
Sorry, the diff of this file is not supported yet
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
52162
587