Skip to content

Commit

Permalink
Fix zora sepolia safe connection
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Feb 13, 2024
1 parent 16e71e0 commit 084a40e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 50 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"type": "module",
"dependencies": {
"@safe-global/protocol-kit": "^2.0.0",
"@safe-global/protocol-kit": "^3.0.0",
"@safe-global/safe-deployments": "^1.32.0",
"@zoralabs/zorb": "^0.1.0",
"ethers": "^6.7.1",
Expand Down
56 changes: 14 additions & 42 deletions src/chains.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
import { ContractNetworksConfig } from "@safe-global/protocol-kit";
import * as chains from "viem/chains";

// const defaultL2Addresses = {
// multiSendAddress: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
// safeMasterCopyAddress: "0x3E5c63644E683549055b9Be8653de26E0B4CD36E",
// safeProxyFactoryAddress: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
// multiSendCallOnlyAddress: "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D",
// fallbackHandlerAddress: "0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd",
// createCallAddress: "0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4",
// signMessageLibAddress: "0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2",
// safeSingletonAddress: "0x",
// simulateTxAccessorAddress: "0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da",
// };
const defaultL2Addresses = {
multiSendAddress: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
safeProxyFactoryAddress: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
multiSendCallOnlyAddress: "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D",
fallbackHandlerAddress: "0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd",
createCallAddress: "0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4",
signMessageLibAddress: "0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2",
// renamed from safeMasterCopyAddress
safeSingletonAddress: "0x3E5c63644E683549055b9Be8653de26E0B4CD36E",
simulateTxAccessorAddress: "0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da",
};

// Example how to add new networks before they are merged and released from `safe-global/safe-deployments` package.
export const contractNetworks: ContractNetworksConfig = {
// // ZORA mainnet
// [`${chains.zora.id}`]: defaultL2Addresses,
};

const pgn = {
id: 424 as const,
name: "PGN",
network: "pgn",
nativeCurrency: {
decimals: 18,
name: "Ether",
symbol: "ETH",
},
rpcUrls: {
default: {
http: ["https://rpc.publicgoods.network"],
webSocket: ["wss://rpc.publicgoods.network"],
},
public: {
http: ["https://rpc.publicgoods.network"],
webSocket: ["wss://rpc.publicgoods.network"],
},
},
blockExplorers: {
etherscan: {
name: "Explorer",
url: "https://explorer.publicgoods.network",
},
default: { name: "Explorer", url: "https://explorer.publicgoods.network" },
},
// ZORA sepolia
[`${chains.zoraSepolia.id}`]: defaultL2Addresses,
};

export const allowedNetworks: { [chainId: number]: chains.Chain } = {
Expand All @@ -68,7 +40,7 @@ Object.keys(contractNetworks).map((network) => {
return;
}
const viemChain = Object.values(chains).find(
(chain) => chain.id.toString() === network,
(chain) => chain.id.toString() === network
);

if (!viemChain) {
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39"
integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==

"@noble/hashes@1.3.3", "@noble/hashes@^1.3.2":
"@noble/hashes@1.3.3", "@noble/hashes@^1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699"
integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==
Expand Down Expand Up @@ -1200,13 +1200,13 @@
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.5.0.tgz#748970e066839e33ed8c935061e370c4ab050517"
integrity sha512-8kdW+brNhI/NzJ4fxDufuJUjepzINqJKLGHuxyAtpPG9bMbn8P5mtaCcbOm0EzLJ+atg+kF9dwg8jpclkVqx5w==

"@safe-global/protocol-kit@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@safe-global/protocol-kit/-/protocol-kit-2.0.0.tgz#9d7cd6299dc9728c5c5d229a45b73a3b07ec4af7"
integrity sha512-alnSxNZKC1ssKrFG5ytluu9kNKGwBifb1xhOyCqwMnm72JksbCEo0UWlNvaeCiYMwhYvMyS++mfxcLAsV/8Gfw==
"@safe-global/protocol-kit@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@safe-global/protocol-kit/-/protocol-kit-3.0.0.tgz#9db15a214bf307af81b082eab329b33642d5acd8"
integrity sha512-0x/VqxWQvjUpkK9VeO/llfYMNoUV/Zngq3PKD8mC3H40v/KzOa2jUSgwxkTiRJRxH1cjuwAG+tXcdVluk73Wfw==
dependencies:
"@noble/hashes" "^1.3.2"
"@safe-global/safe-deployments" "^1.28.0"
"@noble/hashes" "^1.3.3"
"@safe-global/safe-deployments" "^1.32.0"
ethereumjs-util "^7.1.5"
ethers "^6.7.1"
semver "^7.5.4"
Expand Down

0 comments on commit 084a40e

Please sign in to comment.