diff --git a/certora/specs/NativeTokenRefund.spec b/certora/specs/NativeTokenRefund.spec index 04a59890d..9eef6cf4a 100644 --- a/certora/specs/NativeTokenRefund.spec +++ b/certora/specs/NativeTokenRefund.spec @@ -41,7 +41,7 @@ rule nativeTokenRefundIsSentToRefundReceiver( // and adding pre-requirements is tricky // also, it shouldn't be the safe itself require refundReceiver != 0 && refundReceiver != currentContract; - // // We're being optimistic about the delegatecall and in the munged contracts the actuall call was removed + // // We're being optimistic about the delegatecall and in the munged contracts the actual call was removed // // So it's possible the gas used to be 0 in the munged contracts, so no refund would be sent (a counterexample) // require operation == Enum.Operation.Call; diff --git a/test/accessors/SimulateTxAccessor.spec.ts b/test/accessors/SimulateTxAccessor.spec.ts index 37d54e02f..ae8b10bc4 100644 --- a/test/accessors/SimulateTxAccessor.spec.ts +++ b/test/accessors/SimulateTxAccessor.spec.ts @@ -53,8 +53,8 @@ describe("SimulateTxAccessor", () => { const accessorAddress = await accessor.getAddress(); const tx = await buildContractCall(safe, "getOwners", [], 0); const simulationData = accessor.interface.encodeFunctionData("simulate", [tx.to, tx.value, tx.data, tx.operation]); - const acccessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); - const simulation = accessor.interface.decodeFunctionResult("simulate", acccessibleData); + const accessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); + const simulation = accessor.interface.decodeFunctionResult("simulate", accessibleData); expect(safe.interface.decodeFunctionResult("getOwners", simulation.returnData)[0]).to.be.deep.eq([user1.address]); expect(simulation.success).to.be.true; expect(simulation.estimate).to.be.lte(10000n); @@ -69,8 +69,8 @@ describe("SimulateTxAccessor", () => { const userBalance = await hre.ethers.provider.getBalance(user2.address); const tx = await buildContractCall(interactor, "sendAndReturnBalance", [user2.address, ethers.parseEther("1")], 0, true); const simulationData = accessor.interface.encodeFunctionData("simulate", [tx.to, tx.value, tx.data, tx.operation]); - const acccessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); - const simulation = accessor.interface.decodeFunctionResult("simulate", acccessibleData); + const accessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); + const simulation = accessor.interface.decodeFunctionResult("simulate", accessibleData); expect(interactor.interface.decodeFunctionResult("sendAndReturnBalance", simulation.returnData)[0]).to.be.deep.eq( userBalance + ethers.parseEther("1"), ); @@ -85,8 +85,8 @@ describe("SimulateTxAccessor", () => { const accessorAddress = await accessor.getAddress(); const tx = await buildContractCall(interactor, "sendAndReturnBalance", [user2.address, ethers.parseEther("1")], 0, true); const simulationData = accessor.interface.encodeFunctionData("simulate", [tx.to, tx.value, tx.data, tx.operation]); - const acccessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); - const simulation = accessor.interface.decodeFunctionResult("simulate", acccessibleData); + const accessibleData = await simulator.simulate.staticCall(accessorAddress, simulationData); + const simulation = accessor.interface.decodeFunctionResult("simulate", accessibleData); expect(simulation.returnData).to.be.deep.eq( "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f5472616e73666572206661696c65640000000000000000000000000000000000", ); diff --git a/test/core/Safe.Execution.spec.ts b/test/core/Safe.Execution.spec.ts index 4a9e2e5d5..c5445577a 100644 --- a/test/core/Safe.Execution.spec.ts +++ b/test/core/Safe.Execution.spec.ts @@ -271,7 +271,7 @@ describe("Safe", () => { if (hre.network.zksync) { // This test fails in zksync because of (allegedly) enormous gas cost differences // a call to useGas(8) costs ~400k gas in evm but ~28m gas in zksync. - // I suspect the gas cost difference to play a role but the zksync docs do not mention any numbers so i cant confirm this: + // I suspect the gas cost difference to play a role but the zksync docs do not mention any numbers so i can't confirm this: // https://docs.zksync.io/zk-stack/concepts/fee-mechanism // From zkSync team: // Update: in-memory node when in standalone mode assumes very high l1 gas price resulting in a very high gas consumption, @@ -333,7 +333,7 @@ describe("Safe", () => { if (hre.network.zksync) { // This test fails in zksync because of (allegedly) enormous gas cost differences // a call to useGas(8) costs ~400k gas in evm but ~28m gas in zksync. - // I suspect the gas cost difference to play a role but the zksync docs do not mention any numbers so i cant confirm this: + // I suspect the gas cost difference to play a role but the zksync docs do not mention any numbers so i can't confirm this: // https://docs.zksync.io/zk-stack/concepts/fee-mechanism // From zkSync team: // Update: in-memory node when in standalone mode assumes very high l1 gas price resulting in a very high gas consumption, diff --git a/test/core/Safe.Setup.spec.ts b/test/core/Safe.Setup.spec.ts index 06c72df9d..50eb651da 100644 --- a/test/core/Safe.Setup.spec.ts +++ b/test/core/Safe.Setup.spec.ts @@ -231,14 +231,14 @@ describe("Safe", () => { /* solhint-enable no-inline-assembly */ } }`; - const testIntializer = await deployContractFromSource(user1, source); - const testIntializerAddress = await testIntializer.getAddress(); - const initData = testIntializer.interface.encodeFunctionData("init", ["0x42baddad"]); + const testInitializer = await deployContractFromSource(user1, source); + const testInitializerAddress = await testInitializer.getAddress(); + const initData = testInitializer.interface.encodeFunctionData("init", ["0x42baddad"]); await expect( template.setup( [user1.address, user2.address, user3.address], 2, - testIntializerAddress, + testInitializerAddress, initData, AddressOne, AddressZero, @@ -247,7 +247,7 @@ describe("Safe", () => { ), ) .to.emit(template, "SafeSetup") - .withArgs(safeMsgSender, [user1.address, user2.address, user3.address], 2, testIntializerAddress, AddressOne); + .withArgs(safeMsgSender, [user1.address, user2.address, user3.address], 2, testInitializerAddress, AddressOne); await expect(await template.domainSeparator()).to.be.eq(calculateSafeDomainSeparator(templateAddress, await chainId())); await expect(await template.getOwners()).to.be.deep.eq([user1.address, user2.address, user3.address]); await expect(await template.getThreshold()).to.eq(2n); @@ -272,14 +272,14 @@ describe("Safe", () => { require(false, "Computer says nah"); } }`; - const testIntializer = await deployContractFromSource(user1, source); - const testIntializerAddress = await testIntializer.getAddress(); - const initData = testIntializer.interface.encodeFunctionData("init", ["0x42baddad"]); + const testInitializer = await deployContractFromSource(user1, source); + const testInitializerAddress = await testInitializer.getAddress(); + const initData = testInitializer.interface.encodeFunctionData("init", ["0x42baddad"]); await expect( template.setup( [user1.address, user2.address, user3.address], 2, - testIntializerAddress, + testInitializerAddress, initData, AddressZero, AddressZero, diff --git a/test/libraries/SafeToL2Setup.spec.ts b/test/libraries/SafeToL2Setup.spec.ts index 23d724ad1..1353032a4 100644 --- a/test/libraries/SafeToL2Setup.spec.ts +++ b/test/libraries/SafeToL2Setup.spec.ts @@ -231,7 +231,7 @@ describe("SafeToL2Setup", () => { signers: [user1], safeToL2SetupLib, } = await setupTests(); - const safeSingeltonAddress = await safeSingleton.getAddress(); + const safeSingletonAddress = await safeSingleton.getAddress(); const safeL2SingletonAddress = await safeL2.getAddress(); const safeToL2SetupCall = safeToL2SetupLib.interface.encodeFunctionData("setupToL2", [safeL2SingletonAddress]); @@ -247,12 +247,12 @@ describe("SafeToL2Setup", () => { ]); const safeAddress = await proxyFactory.createProxyWithNonce.staticCall(safeSingleton.target, setupData, 0); - await expect(proxyFactory.createProxyWithNonce(safeSingeltonAddress, setupData, 0)).to.not.emit( + await expect(proxyFactory.createProxyWithNonce(safeSingletonAddress, setupData, 0)).to.not.emit( safeToL2SetupLib.attach(safeAddress), "ChangedMasterCopy", ); const singletonInStorage = await hre.ethers.provider.getStorage(safeAddress, ethers.zeroPadValue("0x00", 32)); - expect(sameHexString(singletonInStorage, ethers.zeroPadValue(safeSingeltonAddress, 32))).to.be.true; + expect(sameHexString(singletonInStorage, ethers.zeroPadValue(safeSingletonAddress, 32))).to.be.true; }); }); }); diff --git a/tests_deprecated/utils/execution.js b/tests_deprecated/utils/execution.js index f457c1f71..487f0e66b 100644 --- a/tests_deprecated/utils/execution.js +++ b/tests_deprecated/utils/execution.js @@ -32,7 +32,7 @@ let estimateBaseGas = function(safe, to, value, data, operation, txGasEstimate, let baseGasEstimate = calcDataGasCosts(payload) + signatureCost + (nonce > 0 ? 5000 : 20000) baseGasEstimate += 1500 // 1500 -> hash generation costs baseGasEstimate += 1000 // 1000 -> Event emission - return baseGasEstimate + 32000; // Add aditional gas costs (e.g. base tx costs, transfer costs) + return baseGasEstimate + 32000; // Add additional gas costs (e.g. base tx costs, transfer costs) } let executeTransactionWithSigner = async function(signer, safe, subject, accounts, to, value, data, operation, executor, opts) {