Skip to content

Commit

Permalink
Update the UI with sepolia chains and blast.
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Feb 28, 2024
1 parent 56c993b commit 07567ea
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"dependencies": {
"@safe-global/protocol-kit": "^2.0.0",
"@safe-global/safe-deployments": "^1.32.0",
"@safe-global/safe-deployments": "^1.33.0",
"@zoralabs/zorb": "^0.1.0",
"ethers": "^6.7.1",
"formik": "^2.4.5",
Expand All @@ -16,7 +16,7 @@
"react-router-dom": "^6.20.0",
"reshaped": "^2.6.0",
"toastify-js": "^1.12.0",
"viem": "^1.19.5",
"viem": "^2.7.16",
"yup": "^1.3.2"
},
"scripts": {
Expand Down
33 changes: 31 additions & 2 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,43 @@ const defaultL2Addresses = {
fallbackHandlerAddress: "0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd",
createCallAddress: "0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4",
signMessageLibAddress: "0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2",
safeSingletonAddress: "0x",
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 = {
[`${chains.zoraSepolia.id}`]: defaultL2Addresses,
[`${chains.blastSepolia.id}`]: defaultL2Addresses,
[`${chains.optimismSepolia.id}`]: defaultL2Addresses,
};

// const blastSepolia = {
// id: 168587773 as const,
// name: "Blast Sepolia",
// network: "blast-sepolia",
// nativeCurrency: {
// decimals: 18,
// name: "Ether",
// symbol: "ETH",
// },
// rpcUrls: {
// default: {
// http: ["https://sepolia.blast.io"],
// },
// public: {
// http: ["https://sepolia.blast.io"],
// },
// },
// blockExplorers: {
// etherscan: {
// name: "Explorer",
// url: "https://testnet.blastscan.io",
// },
// default: { name: "Explorer", url: "https://testnet.blastscan.io" },
// },
// };

export const allowedNetworks: { [chainId: number]: chains.Chain } = {
[chains.zora.id]: chains.zora,
[chains.zoraTestnet.id]: chains.zoraTestnet,
Expand All @@ -31,6 +59,7 @@ export const allowedNetworks: { [chainId: number]: chains.Chain } = {
[chains.sepolia.id]: chains.sepolia,
[chains.optimism.id]: chains.optimism,
[chains.optimismSepolia.id]: chains.optimismSepolia,
[chains.blastSepolia.id]: chains.blastSepolia,
};

Object.keys(contractNetworks).map((network) => {
Expand All @@ -39,7 +68,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
27 changes: 17 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1224,13 +1224,20 @@
web3-core "^1.10.3"
web3-utils "^1.10.3"

"@safe-global/safe-deployments@^1.28.0", "@safe-global/safe-deployments@^1.32.0":
"@safe-global/safe-deployments@^1.28.0":
version "1.32.0"
resolved "https://registry.yarnpkg.com/@safe-global/safe-deployments/-/safe-deployments-1.32.0.tgz#3632194d883aa07bd446a6e530e825ba022c9b76"
integrity sha512-7RXmnBrUzJ9+Iat74yx3Gel0kygmsaWjJhqr+0Fy8mkP5ly/6dTZ/2ize1pv3j9Yal04NTOqXbaJG4JnbTANQw==
dependencies:
semver "^7.3.7"

"@safe-global/safe-deployments@^1.33.0":
version "1.33.0"
resolved "https://registry.yarnpkg.com/@safe-global/safe-deployments/-/safe-deployments-1.33.0.tgz#5fc33354e752d02fa06b3ab1c1060ba23f484038"
integrity sha512-G9qGMsha6idMnDuk98dE//inQL09w97hcQ5ZTdSWIHCzJ9mFdN0K4DH2afjZOwdt+Y4g8gZmY3z+kR38MPEToQ==
dependencies:
semver "^7.3.7"

"@scure/base@~1.1.0", "@scure/base@~1.1.2":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f"
Expand Down Expand Up @@ -1685,10 +1692,10 @@
"@types/tinycolor2" "^1.4.3"
tinycolor2 "^1.4.2"

abitype@0.9.8:
version "0.9.8"
resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c"
integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==
abitype@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.0.tgz#237176dace81d90d018bebf3a45cb42f2a2d9e97"
integrity sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==

abortcontroller-polyfill@^1.1.9, abortcontroller-polyfill@^1.7.5:
version "1.7.5"
Expand Down Expand Up @@ -5783,17 +5790,17 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

viem@^1.19.5:
version "1.19.5"
resolved "https://registry.yarnpkg.com/viem/-/viem-1.19.5.tgz#e1c9d52f889ad870e3533afa96e000da3004a7b7"
integrity sha512-lcWP9ErivUKVRpnDgI6mly27iWibJN1jZW2yUGuwU2CjfVHs7DJCyA5ityL+n/B+Oss4bllzQkWtJiBAHqaX2g==
viem@^2.7.16:
version "2.7.16"
resolved "https://registry.yarnpkg.com/viem/-/viem-2.7.16.tgz#99e66bbec661b2284bc32061474f20a90381bdcb"
integrity sha512-yOPa9yaoJUm44m0Qe3ugHnkHol3QQlFxN3jT+bq+lQip7X7cWdPfmguyfLWX2viCXcmYZUDiQdeFbkPW9lw11Q==
dependencies:
"@adraffy/ens-normalize" "1.10.0"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@scure/bip32" "1.3.2"
"@scure/bip39" "1.2.1"
abitype "0.9.8"
abitype "1.0.0"
isows "1.0.3"
ws "8.13.0"

Expand Down

0 comments on commit 07567ea

Please sign in to comment.