Commit c383eb88 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: bugfix in deploy config parsing

```bash
jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json
0x8062AbC286f5e7D9428a0Ccb9AbD71e50d93b935

cast admin $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json)
0x543ba4aadbab8f9025686bd03993043599c6fb04

cast implementation $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json)
0x42f0bd8313ad456a38061308857b2383fe2c72a0

jq -r .address < deployments/mainnet/ProtocolVersions.json
0x42F0bD8313ad456A38061308857b2383fe2c72a0

cast call $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json) 'recommended()'
0x0000000000000000000000000000000000000003000000010000000000000000

cast call $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json) 'required()'
0x0000000000000000000000000000000000000003000000010000000000000000

go run op-chain-ops/cmd/protocol-version/main.go decode 0x0000000000000000000000000000000000000003000000010000000000000000
v3.1.0
```
parent 5dee68b4
...@@ -91,18 +91,13 @@ contract DeployConfig is Script { ...@@ -91,18 +91,13 @@ contract DeployConfig is Script {
eip1559Denominator = stdJson.readUint(_json, "$.eip1559Denominator"); eip1559Denominator = stdJson.readUint(_json, "$.eip1559Denominator");
eip1559Elasticity = stdJson.readUint(_json, "$.eip1559Elasticity"); eip1559Elasticity = stdJson.readUint(_json, "$.eip1559Elasticity");
systemConfigStartBlock = stdJson.readUint(_json, "$.systemConfigStartBlock"); systemConfigStartBlock = stdJson.readUint(_json, "$.systemConfigStartBlock");
requiredProtocolVersion = stdJson.readUint(_json, "$.requiredProtocolVersion");
recommendedProtocolVersion = stdJson.readUint(_json, "$.recommendedProtocolVersion");
if (block.chainid == Chains.LocalDevnet || block.chainid == Chains.GethDevnet) { if (block.chainid == Chains.LocalDevnet || block.chainid == Chains.GethDevnet) {
faultGameAbsolutePrestate = stdJson.readUint(_json, "$.faultGameAbsolutePrestate"); faultGameAbsolutePrestate = stdJson.readUint(_json, "$.faultGameAbsolutePrestate");
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth"); faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration"); faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
requiredProtocolVersion = stdJson.readUint(_json, "$.requiredProtocolVersion");
recommendedProtocolVersion = stdJson.readUint(_json, "$.recommendedProtocolVersion");
}
if (block.chainid == Chains.Goerli || block.chainid == Chains.Sepolia) {
requiredProtocolVersion = stdJson.readUint(_json, "$.requiredProtocolVersion");
recommendedProtocolVersion = stdJson.readUint(_json, "$.recommendedProtocolVersion");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment