@typechain/ethers-v6
Advanced tools
Comparing version
@@ -10,3 +10,3 @@ "use strict"; | ||
import { ethers } from 'ethers' | ||
import { FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase} from "@nomiclabs/hardhat-ethers/types"; | ||
import { FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase} from "@nomicfoundation/hardhat-ethers/types"; | ||
@@ -22,5 +22,13 @@ import * as Contracts from "." | ||
${contracts | ||
.map((n) => `getContractAt(name: '${n}', address: string, signer?: ethers.Signer): Promise<Contracts.${n}>`) | ||
.map((n) => `getContractAt(name: '${n}', address: string | ethers.Addressable, signer?: ethers.Signer): Promise<Contracts.${n}>`) | ||
.join('\n')} | ||
${contracts | ||
.map((n) => `deployContract(name: '${n}', signerOrOptions?: ethers.Signer | FactoryOptions): Promise<Contracts.${n}>`) | ||
.join('\n')} | ||
${contracts | ||
.map((n) => `deployContract(name: '${n}', args: any[], signerOrOptions?: ethers.Signer | FactoryOptions): Promise<Contracts.${n}>`) | ||
.join('\n')} | ||
// default types | ||
@@ -33,3 +41,3 @@ getContractFactory( | ||
abi: any[], | ||
bytecode: ethers.utils.BytesLike, | ||
bytecode: ethers.BytesLike, | ||
signer?: ethers.Signer | ||
@@ -39,5 +47,14 @@ ): Promise<ethers.ContractFactory>; | ||
nameOrAbi: string | any[], | ||
address: string, | ||
address: string | ethers.Addressable, | ||
signer?: ethers.Signer | ||
): Promise<ethers.Contract>; | ||
deployContract( | ||
name: string, | ||
signerOrOptions?: ethers.Signer | FactoryOptions | ||
): Promise<ethers.Contract>; | ||
deployContract( | ||
name: string, | ||
args: any[], | ||
signerOrOptions?: ethers.Signer | FactoryOptions | ||
): Promise<ethers.Contract>; | ||
} | ||
@@ -44,0 +61,0 @@ } |
@@ -36,5 +36,4 @@ "use strict"; | ||
${codegenConfig.discriminateTypes ? `contractName: '${contract.name}';\n` : ``} | ||
connect(runner?: ContractRunner | null): BaseContract; | ||
attach(addressOrName: AddressLike): this; | ||
deployed(): Promise<this>; | ||
connect(runner?: ContractRunner | null): ${contract.name}; | ||
waitForDeployment(): Promise<this>; | ||
@@ -41,0 +40,0 @@ interface: ${contract.name}Interface; |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain", |
@@ -1,4 +0,1 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { | ||
@@ -5,0 +2,0 @@ FunctionFragment, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
96481
0.82%1279
0.87%