Skip to content

Commit

Permalink
chore: fix param typo (#907)
Browse files Browse the repository at this point in the history
Signed-off-by: fanqiaojun <[email protected]>
  • Loading branch information
fanqiaojun authored Jan 22, 2025
1 parent e9b7de9 commit 1d12d35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/utils/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const getZkSyncBytecodeHashFromDeployerCallHeader = (proxyCreationCode: s
export const calculateProxyAddress = async (
factory: SafeProxyFactory,
singleton: string,
inititalizer: string,
initializer: string,
nonce: number | string,
zkSync: boolean = false,
) => {
const salt = ethers.solidityPackedKeccak256(["bytes32", "uint256"], [ethers.solidityPackedKeccak256(["bytes"], [inititalizer]), nonce]);
const salt = ethers.solidityPackedKeccak256(["bytes32", "uint256"], [ethers.solidityPackedKeccak256(["bytes"], [initializer]), nonce]);
const factoryAddress = await factory.getAddress();
const proxyCreationCode = await factory.proxyCreationCode();

Expand All @@ -47,26 +47,26 @@ export const calculateProxyAddress = async (
export const calculateProxyAddressWithCallback = async (
factory: SafeProxyFactory,
singleton: string,
inititalizer: string,
initializer: string,
nonce: number | string,
callback: string,
zkSync: boolean = false,
) => {
const saltNonceWithCallback = ethers.solidityPackedKeccak256(["uint256", "address"], [nonce, callback]);
return calculateProxyAddress(factory, singleton, inititalizer, saltNonceWithCallback, zkSync);
return calculateProxyAddress(factory, singleton, initializer, saltNonceWithCallback, zkSync);
};

export const calculateChainSpecificProxyAddress = async (
factory: SafeProxyFactory,
singleton: string,
inititalizer: string,
initializer: string,
nonce: number | string,
chainId: BigNumberish,
zkSync: boolean = false,
) => {
const salt = ethers.solidityPackedKeccak256(
["bytes32", "uint256", "uint256"],
[ethers.solidityPackedKeccak256(["bytes"], [inititalizer]), nonce, chainId],
[ethers.solidityPackedKeccak256(["bytes"], [initializer]), nonce, chainId],
);
const factoryAddress = await factory.getAddress();
const proxyCreationCode = await factory.proxyCreationCode();
Expand Down
2 changes: 1 addition & 1 deletion test/core/Safe.Setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe("Safe", () => {
await expect(template.setup([], 0, AddressZero, "0x", AddressZero, AddressZero, 0, AddressZero)).to.be.revertedWith("GS202");
});

it("should set fallback handler and call sub inititalizer", async () => {
it("should set fallback handler and call sub initializer", async () => {
const {
template,
signers: [user1, user2, user3],
Expand Down

0 comments on commit 1d12d35

Please sign in to comment.