UNPKG

818 BTypeScriptView Raw
1import { providers, ContractFactory, Signer, Wallet, Contract } from 'ethers';
2import { ContractJSON } from './ContractJSON';
3declare type Newable<T> = {
4 new (...args: any): T;
5};
6declare type ContractFactoryOrJSON = Newable<ContractFactory> | ContractJSON;
7declare type ContractTypeOf<T> = T extends Newable<infer U> ? (U extends ContractFactory ? ReturnType<U['deploy']> : never) : Contract;
8declare type DeployArgumentsOf<T> = T extends Newable<infer U> ? (U extends ContractFactory ? Parameters<U['deploy']> : never) : any[];
9export declare function deployContract<T extends ContractFactoryOrJSON>(wallet: Wallet | Signer, factoryOrContractJson: T, args?: DeployArgumentsOf<T>, overrideOptions?: providers.TransactionRequest): Promise<ContractTypeOf<T>>;
10export {};
11//# sourceMappingURL=deployContract.d.ts.map
\No newline at end of file