-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Upgrade the Solidity compiler to simplify pre-deploy contract code #495
Copy link
Copy link
Closed
Labels
C-featureCategory: featuresCategory: features
Description
Our predeploys are currently written with an extremely error prone pattern using the SafeExecutionManagerWrapper. An example can be found here:
optimism/packages/contracts/contracts/optimistic-ethereum/OVM/predeploys/OVM_DeployerWhitelist.sol
Lines 78 to 89 in 35b99b0
| Lib_SafeExecutionManagerWrapper.safeSSTORE( | |
| KEY_INITIALIZED, | |
| Lib_Bytes32Utils.fromBool(true) | |
| ); | |
| Lib_SafeExecutionManagerWrapper.safeSSTORE( | |
| KEY_OWNER, | |
| Lib_Bytes32Utils.fromAddress(_owner) | |
| ); | |
| Lib_SafeExecutionManagerWrapper.safeSSTORE( | |
| KEY_ALLOW_ARBITRARY_DEPLOYMENT, | |
| Lib_Bytes32Utils.fromBool(_allowArbitraryDeployment) | |
| ); |
This (anti) pattern was particularly tricky when implementing RLP transactions because we need to compile REVERT and that proved difficult for the RLP contracts. This change is therefore blocking RLP.
Describe the solution you'd like
Implement kall which allows contracts to call low level execution manager functions when compiled with the normal OVM compiler.
TODO:
- Update
solcto includekall- Exposekallto user ASM solidity#22 - Update predeploys to use
kalland test them in theintegration-testsvs in thecontractspackage. - [WIP] feat: Have predeploys use OVM solc only #475
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-featureCategory: featuresCategory: features