@@ -3,11 +3,9 @@ import { ANVIL_CHAIN } from "../../../test/src/chains.js";
33import { TEST_CLIENT } from "../../../test/src/test-clients.js" ;
44import { TEST_ACCOUNT_A } from "../../../test/src/test-wallets.js" ;
55import { getContract } from "../../contract/contract.js" ;
6- import { getInstalledModules } from "../modules/__generated__/IModularCore/read/getInstalledModules.js" ;
7- import {
8- deployPublishedContract ,
9- } from "./deploy-published.js" ;
106import { readContract } from "../../transaction/read-contract.js" ;
7+ import { getInstalledModules } from "../modules/__generated__/IModularCore/read/getInstalledModules.js" ;
8+ import { deployPublishedContract } from "./deploy-published.js" ;
119
1210describe . runIf ( process . env . TW_SECRET_KEY ) (
1311 "deployref" ,
@@ -60,42 +58,46 @@ describe.runIf(process.env.TW_SECRET_KEY)(
6058 } , 120000 ) ;
6159
6260 it ( "should set ref contract dependencies" , async ( ) => {
63- const claimableModule = getContract ( {
64- client : TEST_CLIENT ,
65- chain : ANVIL_CHAIN ,
66- address : claimableModuleAddress ,
67- } ) ;
68- const fetchedMintFeeManagerAddress = await readContract ( {
69- contract : claimableModule ,
70- method : "function mintFeeManager() returns (address)" ,
71- } ) ;
72- expect ( fetchedMintFeeManagerAddress . toLowerCase ( ) ) . to . eq ( mintfeeManagerCoreAddress ) ;
61+ const claimableModule = getContract ( {
62+ client : TEST_CLIENT ,
63+ chain : ANVIL_CHAIN ,
64+ address : claimableModuleAddress ,
65+ } ) ;
66+ const fetchedMintFeeManagerAddress = await readContract ( {
67+ contract : claimableModule ,
68+ method : "function mintFeeManager() returns (address)" ,
69+ } ) ;
70+ expect ( fetchedMintFeeManagerAddress . toLowerCase ( ) ) . to . eq (
71+ mintfeeManagerCoreAddress ,
72+ ) ;
7373
74- const mintFeeManager = getContract ( {
75- client : TEST_CLIENT ,
76- chain : ANVIL_CHAIN ,
77- address : mintfeeManagerCoreAddress ,
78- } ) ;
79- const owner = await readContract ( {
80- contract : mintFeeManager ,
81- method : "function owner() returns (address)" ,
82- } ) ;
83- const modules = await getInstalledModules ( {
84- contract : mintFeeManager ,
85- } ) ;
86- const feeRecipient = await readContract ( {
87- contract : mintFeeManager ,
88- method : "function getfeeRecipient() returns (address)" ,
89- } ) ;
90- const fee = await readContract ( {
91- contract : mintFeeManager ,
92- method : "function getDefaultMintFee() returns (uint256)" ,
93- } ) ;
94- expect ( owner . toLowerCase ( ) ) . to . eq ( multisigAddress ) ;
95- expect ( modules . length ) . to . eq ( 1 ) ;
96- expect ( modules [ 0 ] ?. implementation . toLowerCase ( ) ) . to . eq ( mintfeeManagerModuleAddress ) ;
97- expect ( feeRecipient . toLowerCase ( ) ) . to . eq ( multisigAddress ) ;
98- expect ( fee ) . to . eq ( 5n ) ;
74+ const mintFeeManager = getContract ( {
75+ client : TEST_CLIENT ,
76+ chain : ANVIL_CHAIN ,
77+ address : mintfeeManagerCoreAddress ,
78+ } ) ;
79+ const owner = await readContract ( {
80+ contract : mintFeeManager ,
81+ method : "function owner() returns (address)" ,
82+ } ) ;
83+ const modules = await getInstalledModules ( {
84+ contract : mintFeeManager ,
85+ } ) ;
86+ const feeRecipient = await readContract ( {
87+ contract : mintFeeManager ,
88+ method : "function getfeeRecipient() returns (address)" ,
89+ } ) ;
90+ const fee = await readContract ( {
91+ contract : mintFeeManager ,
92+ method : "function getDefaultMintFee() returns (uint256)" ,
93+ } ) ;
94+ expect ( owner . toLowerCase ( ) ) . to . eq ( multisigAddress ) ;
95+ expect ( modules . length ) . to . eq ( 1 ) ;
96+ expect ( modules [ 0 ] ?. implementation . toLowerCase ( ) ) . to . eq (
97+ mintfeeManagerModuleAddress ,
98+ ) ;
99+ expect ( feeRecipient . toLowerCase ( ) ) . to . eq ( multisigAddress ) ;
100+ expect ( fee ) . to . eq ( 5n ) ;
99101 } ) ;
100102 } ,
101103) ;
0 commit comments