Skip to content

Commit

Permalink
fix(contractFactory): wrong prop type
Browse files Browse the repository at this point in the history
  • Loading branch information
MilGard91 committed Apr 20, 2022
1 parent 34a9779 commit 598bcd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/contract/contractFactory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'minimalistic-assert';

import { Account } from '../account';
import { Provider, defaultProvider } from '../provider';
import { AccountInterface } from '../account';
import { ProviderInterface, defaultProvider } from '../provider';
import { Abi, CompiledContract, RawCalldata } from '../types';
import { BigNumberish } from '../utils/number';
import { Contract } from './default';
Expand All @@ -11,11 +11,11 @@ export class ContractFactory {

compiledContract: CompiledContract;

providerOrAccount: Provider | Account;
providerOrAccount: ProviderInterface | AccountInterface;

constructor(
compiledContract: CompiledContract,
providerOrAccount: Provider | Account = defaultProvider,
providerOrAccount: ProviderInterface | AccountInterface = defaultProvider,
abi: Abi = compiledContract.abi // abi can be different from the deployed contract ie for proxy contracts
) {
this.abi = abi;
Expand Down Expand Up @@ -59,7 +59,7 @@ export class ContractFactory {
*
* @param providerOrAccount - new Provider or Account to attach to
*/
connect(providerOrAccount: Provider | Account): ContractFactory {
connect(providerOrAccount: ProviderInterface | AccountInterface): ContractFactory {
this.providerOrAccount = providerOrAccount;
return this;
}
Expand Down

0 comments on commit 598bcd0

Please sign in to comment.