Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example code and comments #17

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"build": "tsc && vite build --base=/smol-safe/",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"prettier": "prettier src/ --write",
"deploy": "yarn build && gh-pages -d dist"
},
"devDependencies": {
Expand All @@ -42,6 +43,7 @@
"os-browserify": "^0.3.0",
"parcel": "^2.9.2",
"path-browserify": "^1.0.0",
"prettier": "^3.2.4",
"stream-browserify": "^3.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.3.2",
Expand Down
40 changes: 13 additions & 27 deletions src/chains.ts
Original file line number Diff line number Diff line change
@@ -1,37 +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 baseL2Addresses = {
multiSendAddress: "0x998739BFdAAdde7C933B942a68053933098f9EDa",
safeMasterCopyAddress: "0x69f4D1788e39c87893C980c06EdF4b7f686e2938",
safeProxyFactoryAddress: "0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC",
multiSendCallOnlyAddress: "0xA1dabEF33b3B82c7814B6D82A79e50F4AC44102B",
fallbackHandlerAddress: "0x017062a1dE2FE6b99BE3d9d37841FeD19F573804",
createCallAddress: "0xB19D6FFc2182150F8Eb585b79D4ABcd7C5640A9d",
signMessageLibAddress: "0x98FFBBF51bb33A056B08ddf711f289936AafF717",
safeSingletonAddress: "0x",
simulateTxAccessorAddress: "0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da",
};
// const defaultL2Addresses = {
// multiSendAddress: "0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761",
// safeMasterCopyAddress: "0x3E5c63644E683549055b9Be8653de26E0B4CD36E",
// safeProxyFactoryAddress: "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
// multiSendCallOnlyAddress: "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D",
// fallbackHandlerAddress: "0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd",
// createCallAddress: "0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4",
// signMessageLibAddress: "0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2",
// safeSingletonAddress: "0x",
// 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,
// arbitrium sepolia
// [`${chains.arbitrumSepolia.id}`]: baseL2Addresses,
// sepolia testnet
// [`${chains.sepolia.id}`]: sepoliaAddresses,
};

const pgn = {
Expand Down Expand Up @@ -63,6 +48,7 @@ const pgn = {
};

export const allowedNetworks: { [chainId: number]: chains.Chain } = {
[chains.zora.id]: chains.zora,
[chains.zoraTestnet.id]: chains.zoraTestnet,
[chains.zoraSepolia.id]: chains.zoraSepolia,
[chains.arbitrumGoerli.id]: chains.arbitrumGoerli,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4875,6 +4875,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283"
integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==

process@^0.11.10:
version "0.11.10"
resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz"
Expand Down
Loading