|
8 | 8 | - [Network Upgrade Transactions](#network-upgrade-transactions) |
9 | 9 | - [L1Block Deployment](#l1block-deployment) |
10 | 10 | - [L1Block Proxy Update](#l1block-proxy-update) |
| 11 | + - [GasPriceOracle Deployment](#gaspriceoracle-deployment) |
| 12 | + - [GasPriceOracle Proxy Update](#gaspriceoracle-proxy-update) |
| 13 | + - [GasPriceOracle Enable Jovian](#gaspriceoracle-enable-jovian) |
11 | 14 |
|
12 | 15 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> |
13 | 16 |
|
@@ -125,3 +128,117 @@ Verify `sourceHash`: |
125 | 128 | cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Jovian: L1Block Proxy Update")) |
126 | 129 | # 0x08447273a4fbce97bc8c515f97ac74efc461f6a4001553712f31ebc11288bad2 |
127 | 130 | ``` |
| 131 | + |
| 132 | +### GasPriceOracle Deployment |
| 133 | +<!-- Generated with: ./scripts/run_gen_predeploy_docs.sh --optimism-repo-path ../optimism |
| 134 | + --fork-name Jovian --contract-name GasPriceOracle --from-address 0x4210000000000000000000000000000000000006 |
| 135 | + --from-address-nonce 0 --git-commit-hash 134edb32991f408a3354caf3de8a68145437cfc9 |
| 136 | + --eth-rpc-url https://optimism.rpc.subquery.network/public |
| 137 | + --proxy-address 0x420000000000000000000000000000000000000F --copy-contract-bytecode true --> |
| 138 | + |
| 139 | +The `GasPriceOracle` contract is deployed. |
| 140 | + |
| 141 | +A deposit transaction is derived with the following attributes: |
| 142 | + |
| 143 | +- `from`: `0x4210000000000000000000000000000000000006` |
| 144 | +- `to`: `null` |
| 145 | +- `mint`: `0` |
| 146 | +- `value`: `0` |
| 147 | +- `nonce`: `0` |
| 148 | +- `gasLimit`: `1756783` |
| 149 | +- `data`: `0x0x608060405234801561001057600080...` ([full bytecode](../../../specs/static/bytecode/jovian-gas-price-oracle-deployment.txt)) |
| 150 | +- `sourceHash`: `0xd939cca6eca7bd0ee0c7e89f7e5b5cf7bf6f7afe7b6966bb45dfb95344b31545`, |
| 151 | + computed with the "Upgrade-deposited" type, with `intent = "Jovian: GasPriceOracle Deployment"` |
| 152 | + |
| 153 | +This results in the Jovian GasPriceOracle contract being deployed to |
| 154 | +`0x3Ba4007f5C922FBb33C454B41ea7a1f11E83df2C`, to verify: |
| 155 | + |
| 156 | +```bash |
| 157 | +cast compute-address --nonce=0 0x4210000000000000000000000000000000000006 |
| 158 | +Computed Address: 0x3Ba4007f5C922FBb33C454B41ea7a1f11E83df2C |
| 159 | +``` |
| 160 | + |
| 161 | +Verify `sourceHash`: |
| 162 | + |
| 163 | +```bash |
| 164 | +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Jovian: GasPriceOracle Deployment")) |
| 165 | +# 0xd939cca6eca7bd0ee0c7e89f7e5b5cf7bf6f7afe7b6966bb45dfb95344b31545 |
| 166 | +``` |
| 167 | + |
| 168 | +Verify `data`: |
| 169 | + |
| 170 | +```bash |
| 171 | +git checkout 134edb32991f408a3354caf3de8a68145437cfc9 |
| 172 | +make build-contracts |
| 173 | +jq -r ".bytecode.object" packages/contracts-bedrock/forge-artifacts/GasPriceOracle.sol/GasPriceOracle.json |
| 174 | +``` |
| 175 | + |
| 176 | +This transaction MUST deploy a contract with the following code hash |
| 177 | +`0xa7fd95526766fc3ba40ed64aa1b55ad051cb2930df64e11c4a848b81d3a8deaf`. |
| 178 | + |
| 179 | +To verify the code hash: |
| 180 | + |
| 181 | +```bash |
| 182 | +git checkout 134edb32991f408a3354caf3de8a68145437cfc9 |
| 183 | +make build-contracts |
| 184 | +cast k $(jq -r ".deployedBytecode.object" packages/contracts-bedrock/forge-artifacts/GasPriceOracle.sol/GasPriceOracle.json) |
| 185 | +``` |
| 186 | + |
| 187 | +### GasPriceOracle Proxy Update |
| 188 | + |
| 189 | +This transaction updates the GasPriceOracle Proxy ERC-1967 |
| 190 | +implementation slot to point to the new GasPriceOracle deployment. |
| 191 | + |
| 192 | +A deposit transaction is derived with the following attributes: |
| 193 | + |
| 194 | +- `from`: `0x0000000000000000000000000000000000000000` |
| 195 | +- `to`: `0x420000000000000000000000000000000000000F` (GasPriceOracle Proxy) |
| 196 | +- `mint`: `0` |
| 197 | +- `value`: `0` |
| 198 | +- `gasLimit`: `50,000` |
| 199 | +- `data`: `0x3659cfe60000000000000000000000003ba4007f5c922fbb33c454b41ea7a1f11e83df2c` |
| 200 | +- `sourceHash`: `0x46b597e2d8346ed7749b46734074361e0b41a0ab9af7afda5bb4e367e072bcb8` |
| 201 | + computed with the "Upgrade-deposited" type, with `intent = "Jovian: GasPriceOracle Proxy Update"` |
| 202 | + |
| 203 | +Verify data: |
| 204 | + |
| 205 | +```bash |
| 206 | +cast concat-hex $(cast sig "upgradeTo(address)") $(cast abi-encode "upgradeTo(address)" 0x3Ba4007f5C922FBb33C454B41ea7a1f11E83df2C) |
| 207 | +# 0x3659cfe60000000000000000000000003ba4007f5c922fbb33c454b41ea7a1f11e83df2c |
| 208 | +``` |
| 209 | + |
| 210 | +Verify `sourceHash`: |
| 211 | + |
| 212 | +```bash |
| 213 | +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Jovian: GasPriceOracle Proxy Update")) |
| 214 | +# 0x46b597e2d8346ed7749b46734074361e0b41a0ab9af7afda5bb4e367e072bcb8 |
| 215 | +``` |
| 216 | + |
| 217 | +### GasPriceOracle Enable Jovian |
| 218 | + |
| 219 | +This transaction informs the GasPriceOracle to start using the Jovian operator fee formula. |
| 220 | + |
| 221 | +A deposit transaction is derived with the following attributes: |
| 222 | + |
| 223 | +- `from`: `0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001` (Depositer Account) |
| 224 | +- `to`: `0x420000000000000000000000000000000000000F` (Gas Price Oracle Proxy) |
| 225 | +- `mint`: `0` |
| 226 | +- `value`: `0` |
| 227 | +- `gasLimit`: `90,000` |
| 228 | +- `data`: `0xb3d72079` |
| 229 | +- `sourceHash`: `0xe836db6a959371756f8941be3e962d000f7e12a32e49e2c9ca42ba177a92716c`, |
| 230 | + computed with the "Upgrade-deposited" type, with `intent = "Jovian: Gas Price Oracle Set Jovian"` |
| 231 | + |
| 232 | +Verify data: |
| 233 | + |
| 234 | +```bash |
| 235 | +cast sig "setJovian()" |
| 236 | +# 0xb3d72079 |
| 237 | +``` |
| 238 | + |
| 239 | +Verify `sourceHash`: |
| 240 | + |
| 241 | +```bash |
| 242 | +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Jovian: Gas Price Oracle Set Jovian")) |
| 243 | +# 0xe836db6a959371756f8941be3e962d000f7e12a32e49e2c9ca42ba177a92716c |
| 244 | +``` |
0 commit comments