Skip to content

Commit

Permalink
Fix typos (#880)
Browse files Browse the repository at this point in the history
Hello, I fix some typos to improve clarity and correctness.

Thank you very much.

Signed-off-by: calciumbe <[email protected]>
  • Loading branch information
calciumbe authored Jan 2, 2025
1 parent 3e8aa81 commit 721acb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions test/accessors/SimulateTxAccessor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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"),
);
Expand All @@ -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",
);
Expand Down
6 changes: 3 additions & 3 deletions test/libraries/SafeToL2Setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand All @@ -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;
});
});
});

0 comments on commit 721acb1

Please sign in to comment.