Skip to content

Commit

Permalink
feat: complete contract utils args type (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
VGLoic authored Feb 15, 2022
1 parent 7a73f20 commit b21aa81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/contract-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Interface, JsonFragment } from "@ethersproject/abi";
import { Fragment, Interface, JsonFragment } from "@ethersproject/abi";
import { BigNumber } from "@ethersproject/bignumber";
import { Transaction } from "@ethersproject/transactions";
import { ContractReceipt } from "@ethersproject/contracts";
Expand All @@ -25,7 +25,7 @@ export class ContractUtils {
private mockManager: MockManager;
private contractInterface: Interface;

constructor(mockManager: MockManager, abi: readonly JsonFragment[]) {
constructor(mockManager: MockManager, abi: readonly (string | JsonFragment | Fragment)[]) {
this.mockManager = mockManager;
this.contractInterface = new Interface(abi);
}
Expand Down
4 changes: 2 additions & 2 deletions src/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsonFragment } from "@ethersproject/abi";
import { Fragment, JsonFragment } from "@ethersproject/abi";
import { MetaMaskProvider } from "./metamask";
import { WalletConnectProvider } from "./wallet-connect";
import { Provider } from "./provider";
Expand Down Expand Up @@ -66,7 +66,7 @@ export function setupEthTesting(options: SetupOptions = defaultSetupOptions) {
mockManager.mockRequest("eth_requestAccounts", accounts, { triggerCallback: completedTriggerCallback });
};

const generateContractUtils = (abi: JsonFragment[]) =>
const generateContractUtils = (abi: (string | JsonFragment | Fragment)[]) =>
new ContractUtils(mockManager, abi);

return {
Expand Down

0 comments on commit b21aa81

Please sign in to comment.