@@ -23,8 +23,12 @@ describe('Wallet Factory', function () {
2323 const StartupWalletImpl = await ethers . getContractFactory ( 'StartupWalletImpl' )
2424 const startupWalletImpl = await StartupWalletImpl . deploy ( latestWalletImplLocator . address )
2525
26+ // Deploy ImmutableSigner contract for use in MainModuleMock deployments
27+ const ImmutableSigner = await ethers . getContractFactory ( 'ImmutableSigner' )
28+ const immutableSigner = await ImmutableSigner . deploy ( owner . address , owner . address , owner . address )
29+
2630 const MainModule = await ethers . getContractFactory ( 'MainModuleMockV1' )
27- const mainModuleV1 = await MainModule . deploy ( factory . address , startupWalletImpl . address )
31+ const mainModuleV1 = await MainModule . deploy ( factory . address , startupWalletImpl . address , immutableSigner . address )
2832
2933 await latestWalletImplLocator . changeWalletImplementation ( mainModuleV1 . address )
3034
@@ -41,7 +45,8 @@ describe('Wallet Factory', function () {
4145 mainModuleV1,
4246 startupWalletImpl,
4347 salt,
44- latestWalletImplLocator
48+ latestWalletImplLocator,
49+ immutableSigner
4550
4651 }
4752 }
@@ -132,7 +137,7 @@ describe('Wallet Factory', function () {
132137
133138
134139 it ( 'Should be able to upgrade implementation contracts' , async function ( ) {
135- const { factory, startupWalletImpl } = await loadFixture ( setupStartupFixture )
140+ const { factory, startupWalletImpl, immutableSigner } = await loadFixture ( setupStartupFixture )
136141
137142 const acc = ethers . Wallet . createRandom ( )
138143 const salt = encodeImageHash ( 1 , [ { weight : 1 , address : acc . address } ] )
@@ -151,7 +156,7 @@ describe('Wallet Factory', function () {
151156
152157 //console.log("Deploy MainModuleMockV2")
153158 const MainModuleV2 = await ethers . getContractFactory ( 'MainModuleMockV2' )
154- const mainModuleV2 = await MainModuleV2 . deploy ( factory . address , startupWalletImpl . address )
159+ const mainModuleV2 = await MainModuleV2 . deploy ( factory . address , startupWalletImpl . address , immutableSigner . address )
155160
156161 // console.log("Upgrade wallet proxy to using MainModuleMockV2")
157162 const networkId = ( await ethers . provider . getNetwork ( ) ) . chainId
@@ -201,10 +206,10 @@ describe('Wallet Factory', function () {
201206
202207
203208 it ( 'Deploying using upgrade should work' , async function ( ) {
204- const { factory, startupWalletImpl, latestWalletImplLocator } = await loadFixture ( setupStartupFixture )
209+ const { factory, startupWalletImpl, latestWalletImplLocator, immutableSigner } = await loadFixture ( setupStartupFixture )
205210
206211 const MainModuleV2 = await ethers . getContractFactory ( 'MainModuleMockV2' )
207- const mainModuleV2 = await MainModuleV2 . deploy ( factory . address , startupWalletImpl . address )
212+ const mainModuleV2 = await MainModuleV2 . deploy ( factory . address , startupWalletImpl . address , immutableSigner . address )
208213
209214 await latestWalletImplLocator . changeWalletImplementation ( mainModuleV2 . address )
210215
0 commit comments