Skip to content

Commit 4a07834

Browse files
committed
prettier and add zk chains
1 parent f5dada2 commit 4a07834

File tree

7 files changed

+761
-497
lines changed

7 files changed

+761
-497
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"license": "MIT",
55
"type": "module",
66
"dependencies": {
7-
"@safe-global/protocol-kit": "^3.0.0",
8-
"@safe-global/safe-deployments": "^1.33.0",
7+
"@safe-global/protocol-kit": "^3.1.1",
8+
"@safe-global/safe-deployments": "^1.37.14",
99
"@zoralabs/zorb": "^0.1.0",
10+
"buffer": "^6.0.3",
1011
"ethers": "^6.7.1",
1112
"formik": "^2.4.5",
1213
"lodash": "^4.17.21",
@@ -16,7 +17,7 @@
1617
"react-router-dom": "^6.20.0",
1718
"reshaped": "^2.6.0",
1819
"toastify-js": "^1.12.0",
19-
"viem": "^2.9.23",
20+
"viem": "^2.21.43",
2021
"yup": "^1.3.2"
2122
},
2223
"scripts": {

src/app/NewSafeProposal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ const EditProposal = ({
320320
setProposal(proposal);
321321
}
322322
},
323-
[setProposal]
323+
[setProposal],
324324
);
325325

326326
const defaultActions = proposal || DEFAULT_PROPOSAL;
@@ -399,7 +399,7 @@ export const NewSafeProposal = () => {
399399
setIsEditing(true);
400400
evt.preventDefault();
401401
},
402-
[setIsEditing]
402+
[setIsEditing],
403403
);
404404

405405
return (

src/chains.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { ContractNetworksConfig } from "@safe-global/protocol-kit";
2+
import { ContractNetworkConfig } from "@safe-global/protocol-kit/dist/src/types";
23
import * as chains from "viem/chains";
34

4-
const defaultL2Addresses = {
5+
const defaultL2Addresses: ContractNetworkConfig = {
56
multiSendAddress: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
67
safeProxyFactoryAddress: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
78
multiSendCallOnlyAddress: "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D",
@@ -13,12 +14,26 @@ const defaultL2Addresses = {
1314
simulateTxAccessorAddress: "0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da",
1415
};
1516

17+
const zkAddresses: ContractNetworkConfig = {
18+
multiSendAddress: "0x0dFcccB95225ffB03c6FBB2559B530C2B7C8A912",
19+
safeProxyFactoryAddress: "0xDAec33641865E4651fB43181C6DB6f7232Ee91c2",
20+
multiSendCallOnlyAddress: "0xf220D3b4DFb23C4ade8C88E526C1353AbAcbC38F",
21+
fallbackHandlerAddress: "0x2f870a80647BbC554F3a0EBD093f11B4d2a7492A",
22+
createCallAddress: "0xcB8e5E438c5c2b45FbE17B02Ca9aF91509a8ad56",
23+
signMessageLibAddress: "0x357147caf9C0cCa67DfA0CF5369318d8193c8407",
24+
// renamed from safeMasterCopyAddress
25+
safeSingletonAddress: "0x1727c2c531cf966f902E5927b98490fDFb3b2b70",
26+
simulateTxAccessorAddress: "0x4191E2e12E8BC5002424CE0c51f9947b02675a44",
27+
};
28+
1629
// Example how to add new networks before they are merged and released from `safe-global/safe-deployments` package.
1730
export const contractNetworks: ContractNetworksConfig = {
1831
[`${chains.zoraSepolia.id}`]: defaultL2Addresses,
1932
[`${chains.blastSepolia.id}`]: defaultL2Addresses,
2033
[`${chains.optimismSepolia.id}`]: defaultL2Addresses,
2134
[`${chains.blast.id}`]: defaultL2Addresses,
35+
[`${chains.zksyncSepoliaTestnet.id}`]: zkAddresses,
36+
[`${chains.zksync.id}`]: zkAddresses,
2237
};
2338

2439
export const allowedNetworks: { [chainId: number]: chains.Chain } = {
@@ -36,6 +51,8 @@ export const allowedNetworks: { [chainId: number]: chains.Chain } = {
3651
[chains.optimismSepolia.id]: chains.optimismSepolia,
3752
[chains.blastSepolia.id]: chains.blastSepolia,
3853
[chains.blast.id]: chains.blast,
54+
[chains.zkSync.id]: chains.zkSync,
55+
[chains.zkSyncSepoliaTestnet.id]: chains.zkSyncSepoliaTestnet,
3956
};
4057

4158
Object.keys(contractNetworks).map((network) => {

src/components/SetOwnerModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const RemoveOwnerModalContent = ({
114114
{
115115
ownerAddress: target,
116116
threshold: threshold,
117-
}
117+
},
118118
);
119119
if (!removeOwnerTx || !safeInformation) {
120120
return;

src/hooks/useSetParamsFromQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ export const useRedirectToProposalWithNewParams = () => {
4646
}
4747
setParams(params);
4848
},
49-
[setParams, networkId, safeAddress, pathname, navigate]
49+
[setParams, networkId, safeAddress, pathname, navigate],
5050
);
5151
};

src/hooks/useUpdateProposalViaQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Proposal } from "../schemas/proposal";
33
import { useRedirectToProposalWithNewParams } from "./useSetParamsFromQuery";
44

55
export type AddAction = (
6-
newAction: NonNullable<Proposal["actions"]>[0]
6+
newAction: NonNullable<Proposal["actions"]>[0],
77
) => void;
88

99
export type UpdateProposal = {
@@ -24,7 +24,7 @@ export const useUpdateProposalInQuery = ({
2424
nonce: proposal?.nonce,
2525
});
2626
},
27-
[proposal, setParams]
27+
[proposal, setParams],
2828
);
2929

3030
return {

0 commit comments

Comments
 (0)