espresso-sequencer icon indicating copy to clipboard operation
espresso-sequencer copied to clipboard

1328 update prover permissions on the light client contract via openzeppelin defender and safe wallets

Open alysiahuggins opened this issue 1 year ago • 0 comments

Closes #1328

Open Questions/TODOs

  • TODO: It currently depends on a SEPOLIA_RPC_URL and Sepolia Deployments of the Safe Account/ Multisig Wallet and the Light Client Contract
  • OQ: The steps required to test require manual UI interaction e.g. creating a mutlsig wallet, setting up an open zeppelin account. It's not trivial to test with a forked/private network because the Safe SDK requires mainnet or supported testnets (learn more about this in the Readme)
  • TODO: Socialise the use of multisig wallets, determine the threshold and owners

This PR:

  • provides the ability to enable/disable permissioned prover mode on the light client contract via a multisig wallet
  • it uses the SafeSDK to accomplish the above
  • this code can be extended to perform any admin/multisig wallet only tasks
  • the ability to deploy a smart contract to a live network without requiring a license (as was previously the case with OpenZeppelin but fixed with https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades/pull/43)

This PR does not:

  • provide a local testing environment for openzeppelin/safe interactions

Key places to review:

  • ./contracts/script/multisigTransactionProposals/safeSDK (the files in here are newly added)
  • feedback on the workflow required to get this to work and how it can be improved despite the limitation of not being able to use forked/private networks

How to test this PR:

  • see the readme (./contracts/script/multisigTransactionProposals/README.md)

Things tested

  • util functions in utils.ts via yarn jest
  • approving (set permissioned prover and disable permissioned prover) transactions via a multisig wallet. You can see the transactions on sepolia here e.g. this transaction https://sepolia.etherscan.io/tx/0xddbc669b95b7ad0d2a6045d06ebba6bbf32e05f4aeffb936814094a2a6c7b2d1 is where one of the multisig signers, 0xB22167f12C232e825D26ffbb3780E024c506664E, sent a transaction via the safe multisig account 0xc56fA6505d10bF322e01327e22479DE78C3Bf1cE, so that 0xc56fA6505d10bF322e01327e22479DE78C3Bf1cE can be set as the permissioned prover.

Safe account and multisig wallet has been used interchangeably.

alysiahuggins avatar May 13 '24 14:05 alysiahuggins