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

[Multichain] Epic: Multichain Safes with same address #4120

Draft
wants to merge 18 commits into
base: dev
Choose a base branch
from

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Aug 28, 2024

DISCLAIMER

DO NOT MERGE THIS PR BEFORE THE USED CONTRACTS ARE FULLY AUDITED AND OFFICIALLY DEPLOYED

How is this Epic about?

This epic enables users to create Safes with the same address across L1 and L2 networks.
This involves

  • a new Safe creation flow that creates Safes with the correct masterCopy (L1 or L2) during the setup call.
  • a new migration for incompatible L1 Safes on L2 chains
  • design changes to the sidebar to group Safes by address and then by chains
  • a new network selector which allows deploying a opened Safe on a new chain and to switch between deployed chains
  • Action to re-deploy a Safe with the same address

How to test it

See the individual users stories acceptance criteria

Screenshots

tbd

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

- Sidebar groups Safes with the same address and shows them first.
- New designs for safe groups
Copy link

github-actions bot commented Aug 28, 2024

Copy link

github-actions bot commented Aug 28, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Aug 28, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 978.37 KB (🟡 +38.84 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Eighteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 511 B (🟢 -24.37 KB) 978.87 KB
/address-book 26.1 KB (🟡 +2 B) 1004.47 KB
/apps/open 54.73 KB (-1 B) 1.01 MB
/balances 30.67 KB (🟡 +2 B) 1009.04 KB
/home 60.24 KB (🟡 +28 B) 1.01 MB
/new-safe/advanced-create 36.53 KB (🟡 +1.39 KB) 1014.9 KB
/new-safe/create 35.79 KB (🟡 +1.38 KB) 1014.16 KB
/new-safe/load 16.42 KB (🟡 +3 B) 994.79 KB
/settings/notifications 27.03 KB (-1 B) 1005.4 KB
/settings/setup 35.98 KB (-1 B) 1014.35 KB
/transactions 73.52 KB (-2 B) 1.03 MB
/transactions/history 73.49 KB (-2 B) 1.03 MB
/transactions/messages 39.16 KB (🟡 +1 B) 1017.53 KB
/transactions/msg 29.51 KB (🟡 +1 B) 1007.88 KB
/transactions/queue 31.26 KB (-1 B) 1009.63 KB
/transactions/tx 21.06 KB (-1 B) 999.43 KB
/welcome 6.77 KB (🟢 -1 B) 985.14 KB
/welcome/accounts 379 B (🟢 -1 B) 978.74 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

github-actions bot commented Aug 28, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
77.91% (-0.33% 🔻)
12309/15798
🔴 Branches
58% (-0.29% 🔻)
3179/5481
🟡 Functions
65.11% (-0.26% 🔻)
1933/2969
🟡 Lines
79.38% (-0.37% 🔻)
11113/14000
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / useSafeCreationData.ts
100% 90.32% 100% 100%
🟢
... / multiChainSafe.ts
80% 88.46% 92.31% 80%
🟢
... / useCompatibleNetworks.ts
100% 100% 100% 100%
🔴
... / index.tsx
38.1% 0% 0% 39.02%
🟢
... / MigrateToL2Information.tsx
80% 0% 0% 100%
🟡
... / ChangeOwnerSetupWarning.tsx
50% 0% 0% 62.5%
🔴
... / useIsMultichainSafe.ts
45.45% 100% 0% 50%
🔴
... / useAllSafesGrouped.ts
23.81% 0% 0% 27.78%
🔴
... / useAllSafes.ts
50% 17.24% 37.5% 55.56%
🟢
... / utils.ts
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / transaction-guards.ts
67.62% (-1.65% 🔻)
30.77% (-3.1% 🔻)
67.74% (-0.05% 🔻)
68.24% (-2.43% 🔻)
🟢
... / deployments.ts
95.24% (-4.76% 🔻)
100%
90% (-10% 🔻)
96.88% (-3.13% 🔻)
🟢
... / safeCoreSDK.ts
92.31% (-3.61% 🔻)
84.62% (-7.05% 🔻)
100%
93.48% (-4.2% 🔻)
🔴
... / utils.ts
37.5% (+0.11% 🔼)
28.85% (-5.53% 🔻)
21.74% (+0.31% 🔼)
38.1% (+0.1% 🔼)
🟢 src/store/common.ts
88.89% (-11.11% 🔻)
50%
75% (-25% 🔻)
84.62% (-15.38% 🔻)
🟢
... / txHistorySlice.ts
89.29% (-1.62% 🔻)
57.14% (-15.58% 🔻)
50% (-10% 🔻)
91.67% (-1.19% 🔻)
🟡
... / addedSafesSlice.ts
65.52% (+2.36% 🔼)
75% (+25% 🔼)
33.33% (-8.33% 🔻)
68.18% (+0.44% 🔼)
🔴
... / undeployedSafesSlice.ts
38.46% (+1.32% 🔼)
33.33%
30% (-7.5% 🔻)
42.86% (-1.14% 🔻)
🔴
... / dispatch.ts
37.19% (-0.63% 🔻)
32.26% (-3.04% 🔻)
25%
36.22% (-0.68% 🔻)
🔴
... / SafeTxProvider.tsx
28.95% (+0.38% 🔼)
0%
40% (-4.44% 🔻)
29.41% (+0.25% 🔼)
🟢
... / index.tsx
86.05% (-1.45% 🔻)
37.14% (-1.09% 🔻)
42.86% (-7.14% 🔻)
85.37% (-1.48% 🔻)
🟢
... / index.tsx
95.45% (-4.55% 🔻)
50% (-16.67% 🔻)
100%
95.24% (-4.76% 🔻)
🟢
... / useTxPendingStatuses.ts
82.86% (-1.69% 🔻)
65% (-5% 🔻)
75%
92.22% (-1.46% 🔻)
🟢
... / index.ts
94.74% (-0.72% 🔻)
75% (+8.33% 🔼)
100% 100%
🟡
... / index.tsx
72.73% (-10.61% 🔻)
0% 0%
70% (-10% 🔻)
🟡
... / index.tsx
61.59% (-4.48% 🔻)
47.17% (+2.17% 🔼)
58.82% (-2.71% 🔻)
62.02% (-4.02% 🔻)
🟡
... / index.ts
60% (-4.29% 🔻)
31.82% (-9.36% 🔻)
18.18% (-1.82% 🔻)
60.81% (-4.76% 🔻)
🟢
... / utils.ts
91.67% (-8.33% 🔻)
85.71% (-14.29% 🔻)
75% (-25% 🔻)
95.24% (-4.76% 🔻)

Test suite run success

1524 tests passing in 206 suites.

Report generated by 🧪jest coverage report action from 938d524

Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@schmanu schmanu changed the title Epic: Multichain Safes with same address [Multichain] Epic: Multichain Safes with same address Sep 9, 2024
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

schmanu and others added 3 commits September 12, 2024 16:29
* feat: SetupToL2 during Safe creation

* feat: use setupToL2 when relaying safe creation

* Feat: add network selector to safe setup

* feat: deploy CF safes on selected networks

* feat: require at least on network to be selected

* fix: creation overview network styles

* Fix: only show wrong chain warning when relevant

* fix: unit tests for ReviewStep and relay creation

* fix: load safe cypress tests

* remove unecessary check in safe creation

* feat: simplify mnemonic safe name

* fix: network multiselector chip styles

* fix: update safe name unit test

* refactor: change multiselector to uncontrolled component with RHF

* fix: remove references to pay later option when it is not available

* feat: exclude xksync from multichain and only offer chains of the same version

* fix: dont allow older safes to be deployed as multichain group

* only allow selecting a single network in the advanced safe creation flow

* fix: check across chains for the next available saltNonce

* fix: wrong chain warning on activation flow

* allow CF deployment for m/n safes

* feat: show success modal on multichain safe creation

* fix: only allow networks with canonical 1.4.1 deployments to be multichain safes

* fix: dismiss CF creation modal in cypress tests

* feat: modify fee info text for multi chain safe creation

* fix: remove unecessary promise.all and account for undefined numberOfOwners in setup hints

* fix: remove unused code and use router.replace for network multi selector

* refactor: move setup contract address to constants.ts

* fix: check chains are compatible with first selected network and wrap multiselector functions in useCallbacl

* fix: remove commented code

---------

Co-authored-by: James Mealy <james@safe.global>
…chain safe [SW-150] (#4151)

* feat: add warning when adding or removing an owner to multichain safes

* fix: change owner to signer in text and fix typos

* feat: use current chain name in warning message
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

usame-algan and others added 2 commits September 16, 2024 10:22
…-171] (#4163)

* fix: Hide header network selector on non-safe routes

* fix: Failing import export data e2e test

* fix: Move MenuItem component back to be a function and fix e2e test

* fix: Revert NetworkInput refactor

* fix: Failing load_safe e2e test
Copy link

github-actions bot commented Sep 16, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

schmanu and others added 3 commits September 17, 2024 15:49
…d mastercopy versions [SW-167] (#4161)



Co-authored-by: schmanu <manu@safe.global>
…tiaccounts (#4125)

- Redesigns how sub-items are displayed under multi-accounts.
- Adds context menu for multi accounts offering renaming and adding a new network
- Some UX fixes around the context menu
Copy link

github-actions bot commented Sep 17, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

usame-algan and others added 3 commits September 17, 2024 18:29
…4180)

* fix: Network selector links and visual style

* fix: Update dependency arrays
* fix: Show zksync network but disabled

* fix: Show message if zksync safe is open

* fix: Adjust tests for useReplayableNetworks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants