Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the TEE contracts to use the upgradeable proxy pattern. The main contracts (EspressoTEEVerifier, EspressoSGXTEEVerifier, EspressoNitroTEEVerifier, and TEEHelper) are converted to use OpenZeppelin's upgradeable contracts with TransparentUpgradeableProxy pattern. Authorization is now centralized through a TEE verifier address instead of individual contract owners.
Changes:
- Contracts converted to use upgradeable initialization pattern with
initialize()functions instead of constructors - Storage moved to namespaced storage slots to avoid storage collisions
- Authorization changed from owner-based to TEE verifier-based for helper contracts
- Tests updated to deploy contracts via proxy and test initialization behavior
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/TEEHelper.t.sol | New test file for TEEHelper upgradeable initialization |
| test/MultiSigTransfer.t.sol | Updated deployment to use proxies and removed individual helper ownership tests |
| test/EspressoTEEVerifier.t.sol | Updated to deploy via proxy with placeholder addresses and test passthrough admin functions |
| test/EspressoSGXTEEVerifier.t.sol | Updated to use proxy deployment and test TEE verifier authorization |
| test/EspressoNitroTEEVerifier.t.sol | Updated to use proxy deployment and test TEE verifier authorization |
| src/interface/ITEEHelper.sol | Added authorization errors and TEE verifier events/functions |
| src/interface/IEspressoTEEVerifier.sol | Added admin passthrough functions and error for invalid verifier |
| src/TEEHelper.sol | Converted to upgradeable with namespaced storage and TEE verifier authorization |
| src/EspressoTEEVerifier.sol | Converted to upgradeable and added admin passthrough functions |
| src/EspressoSGXTEEVerifier.sol | Converted to upgradeable with TEE verifier authorization |
| src/EspressoNitroTEEVerifier.sol | Converted to upgradeable with TEE verifier authorization |
| scripts/MultiSigTransfer.s.sol | Simplified to only handle TEE verifier ownership (helpers no longer independently owned) |
| remappings.txt | Added mapping for upgradeable contracts |
| lib/openzeppelin-contracts-upgradeable | Updated to v5.5.0 |
| foundry.lock | Updated lock file with new versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jjeangal
left a comment
There was a problem hiding this comment.
Overall looks good to me! My only general comment would be with regards to function and variables naming to have a better initial understanding.
|
Do we need to update the deployment scripts ? |
|
|
I will work on it, in another PR! |
I will just add it to all contracts shouldnt be an issue! |
Description
Espresso TEE Verifiercontract directly and removes the need to add owners in the SGX and nitro contract directly