safe-global / safe-wallet-web

Safe{Wallet} – smart contract wallet for Ethereum (ex-Gnosis Safe multisig)
https://app.safe.global
GNU General Public License v3.0
327 stars 392 forks source link

feat: Execute transaction through role #3756

Closed jfschwarz closed 2 months ago

jfschwarz commented 2 months ago

📢 PR is superseded by #3768


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

Alternatively, 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:
image
Connected with role member wallet, permission checks fail:
image

(Status can be any value from the Roles mods' Status enum)

Checklist

github-actions[bot] commented 2 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

jfschwarz commented 2 months ago

I have read the CLA Document and I hereby sign the CLA

jfschwarz commented 2 months ago

superseded by #3768