@@ -63,6 +63,32 @@ contract DeployProtocolAdapterProxyTest is RiscZeroRouterFixture, DeploymentsFix
6363 script.run ({isProduction: false });
6464 }
6565
66+ function test_predict_matches_the_addresses_run_deploys () public {
67+ _deployRiscZeroRouter ();
68+
69+ DeployProtocolAdapterProxy script = new DeployProtocolAdapterProxy ();
70+
71+ (address predictedProxy , address predictedImplementation ) = script.predict ({isProduction: false });
72+ (address proxy , address implementation ,,) = script.run ({isProduction: false });
73+
74+ assertEq (proxy, predictedProxy, "staging: prediction differs from the deployed proxy " );
75+ assertEq (
76+ implementation, predictedImplementation, "staging: prediction differs from the deployed implementation "
77+ );
78+
79+ (address predictedProductionProxy ,) = script.predict ({isProduction: true });
80+ (address productionProxy ,,,) = script.run ({isProduction: true });
81+
82+ assertEq (productionProxy, predictedProductionProxy, "production: prediction differs from the deployed proxy " );
83+ }
84+
85+ function test_environmentName_names_the_environments () public {
86+ DeployProtocolAdapterProxy script = new DeployProtocolAdapterProxy ();
87+
88+ assertEq (script.environmentName ({isProduction: false }), "staging " , "staging environment name differs " );
89+ assertEq (script.environmentName ({isProduction: true }), "production " , "production environment name differs " );
90+ }
91+
6692 /// @notice Runs the deploy script for the environment and checks that the proxy lands at the predicted
6793 /// deterministic address, delegates to a deployed implementation, and is initialized with the environment owner.
6894 /// @param isProduction Whether to deploy the production or the staging environment proxy.
0 commit comments