File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ describe("deploy", () => {
1717 queryFilter : ( ) => Promise . resolve ( [ { args : [ ZeroAddress ] } ] ) ,
1818 filters : { CloneDeployed : "CloneDeployed" } ,
1919 deploy : ( ) => Promise . resolve ( { wait : ( ) => Promise . resolve ( receipt ) } )
20- } as unknown as IFactoryLike < unknown [ ] > ,
20+ } as unknown as IFactoryLike ,
2121 signer : { } as Signer ,
2222 args : [ ]
2323 }
Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ export const getProxyContract = async <T = BaseContract>({
3030 * @param args deploy proxy clone arguments
3131 * @returns clone contract
3232 */
33- export const deployProxyClone = async < C = BaseContract , T = unknown [ ] > ( {
33+ export const deployProxyClone = async < C = BaseContract , T extends unknown [ ] = [ ] > ( {
3434 factory,
3535 proxyFactory,
3636 signer,
3737 args
3838} : IDeployCloneArgs < T > ) : Promise < C > => {
39- const receipt = await proxyFactory . deploy ( args ) . then ( ( tx ) => tx . wait ( ) )
39+ const receipt = await proxyFactory . deploy ( ... args ) . then ( ( tx ) => tx . wait ( ) )
4040
4141 return getProxyContract < C > ( {
4242 factory,
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ import type { TypedContractMethod } from "../typechain-types/common"
55/**
66 * Type for the factory like contract
77 */
8- export type IFactoryLike < P extends unknown [ ] = [ ] > = Factory &
8+ export type IFactoryLike = Factory &
99 BaseContract & {
10- deploy : TypedContractMethod < P , [ ] , "nonpayable" >
10+ deploy : TypedContractMethod < unknown [ ] , unknown , "nonpayable" >
1111 }
1212
1313/**
1414 * Interface that represents deploy clone arguments
1515 */
16- export interface IDeployCloneArgs < T = unknown [ ] > {
16+ export interface IDeployCloneArgs < T extends unknown [ ] = unknown [ ] > {
1717 /**
1818 * Arguments for clone initialization
1919 */
@@ -27,7 +27,7 @@ export interface IDeployCloneArgs<T = unknown[]> {
2727 /**
2828 * Proxy contract factory
2929 */
30- proxyFactory : IFactoryLike < T [ ] >
30+ proxyFactory : IFactoryLike
3131
3232 /**
3333 * Ethereum signer
You can’t perform that action at this time.
0 commit comments