Skip to content

Commit 5086ffe

Browse files
committed
Use instances encodeFunctionData in DelegatedManagerFactory tests
1 parent 5321ec0 commit 5086ffe

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

test/factories/delegatedManagerFactory.spec.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "module-alias/register";
22

3-
import { BigNumber, ContractTransaction, utils as ethersUtils } from "ethers";
3+
import { BigNumber, ContractTransaction } from "ethers";
44
import { Address, Account } from "@utils/types";
55
import { ADDRESS_ZERO, ZERO } from "@utils/constants";
66
import {
@@ -103,17 +103,12 @@ describe("DelegatedManagerFactory", () => {
103103

104104
// Helper function to generate bytecode packets for factory initialization call
105105
async function generateBytecode(setToken: Address, manager: Address): Promise<string[]> {
106-
const iFace = new ethersUtils.Interface([
107-
"function initialize(address,address)",
108-
"function initializeExtension(address,address)"
109-
]);
110-
111-
const moduleBytecode = iFace.encodeFunctionData("initialize", [
106+
const moduleBytecode = setV2Setup.issuanceModule.interface.encodeFunctionData("initialize", [
112107
setToken,
113108
await getRandomAddress()
114109
]);
115110

116-
const extensionBytecode = iFace.encodeFunctionData("initializeExtension", [
111+
const extensionBytecode = mockIssuanceExtension.interface.encodeFunctionData("initializeExtension", [
117112
setToken,
118113
manager
119114
]);

0 commit comments

Comments
 (0)