Closed jfschwarz closed 2 months ago
✅ Deploy successful!
Storybook: https://exec_through_role--walletweb.review.5afe.dev/storybook/
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 |
Report generated by eslint-plus-action
This analysis was generated by the Next.js Bundle Analysis action. 🤖
Page | Size (compressed) |
---|---|
global |
950.36 KB (🟡 +295 B) |
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!
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/apps/open |
50.93 KB (🟡 +33 B) |
1001.29 KB |
/transactions |
73.93 KB (🟡 +33 B) |
1 MB |
/transactions/history |
73.89 KB (🟡 +33 B) |
1 MB |
/transactions/messages |
34.77 KB (🟡 +33 B) |
985.13 KB |
/transactions/queue |
29.17 KB (🟡 +33 B) |
979.53 KB |
/transactions/tx |
18.92 KB (🟡 +33 B) |
969.28 KB |
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.
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 79.41% (-0.04% 🔻) |
11468/14442 |
🔴 | Branches | 58.51% (+0.1% 🔼) |
2758/4714 |
🟡 | Functions | 66.63% (+0.07% 🔼) |
1843/2766 |
🟢 | Lines | 80.78% (-0.06% 🔻) |
10349/12812 |
1441 tests passing in 198 suites.
Report generated by 🧪jest coverage report action from 822271d74d476cea8d1626b0dabcd07fd2a86152
Hey @jfschwarz, great addition! A few suggestions to improve the texts:
Execute without confirmations
As a member of the eth_wrapping
role you can execute this transaction immediately without confirmations from other owners.
Button label: Execute
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 |
Report generated by eslint-plus-action
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 |
Report generated by eslint-plus-action
Congrats, your important contribution to this open-source project has earned you a GitPOAP!
GitPOAP: 2024 Safe Contributor:
Head to gitpoap.io & connect your GitHub account to mint!
Learn more about GitPOAPs here.
What it solves
With SEP-14 the community voted to implement role-based access control in Safe{Wallet} based on the Zodiac Roles Modifier.
How this PR fixes it
This PR allows role members to use Safe{Wallet} to execute transaction from the Safe using their role. For this purpose, a new section has been added to the transaction sign/execute form, which only shows up if the connected wallet is a member of any role enabled on the Safe.
How to test it
assignRoles
functionAlternatively, send me your EOA address so I can assign a role in my Sepolia test setup to it.
Screenshots
A new card appears in the transaction sign/execute form only if the Safe has a Roles mod enabled and the connected wallet account is a role member.
Connected with role member wallet, permission checks pass:
Connected with role member wallet, permission checks fail:
(Status can be any value from the Roles mods' Status enum)
Checklist
Implementation details
In any of the following cases, nothing will be rendered and no extra network requests will be made:
Otherwise we perform a fetch request against the official role subgraph for each enabled module, checking if the module is a Roles v2 mod and retrieving its role configuration (permissions and members).
We only render the new card, if the connected wallet has any roles assigned. (There can be multiple Roles mods enabled on the Safe. An address can have multiple roles assigned on each mod.)
Next step is checking if the current transaction is allowed for any role assigned to the connected wallet address:
If any assigned role allows the call, we enable the "Execute" button. Otherwise we show the failing permission check status for the role most likely to be meant for the given transaction, "most likely" being defined by the following order: