File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,6 @@ contract AlignedLayerUpgrader is Script {
8080 )
8181 );
8282
83- vm.startBroadcast ();
84-
85- alignedLayerProxyAdmin.upgrade (
86- TransparentUpgradeableProxy (
87- payable (address (alignedLayerServiceManager))
88- ),
89- address (alignedLayerServiceManagerImplementation)
90- );
91-
92- vm.stopBroadcast ();
93-
9483 return (
9584 address (alignedLayerServiceManager),
9685 address (alignedLayerServiceManagerImplementation)
Original file line number Diff line number Diff line change @@ -21,13 +21,26 @@ forge_output=$(forge script script/upgrade/AlignedLayerUpgrader.s.sol \
2121echo " $forge_output "
2222
2323# Extract the alignedLayerServiceManagerImplementation value from the output
24+ aligned_layer_service_manager=$( echo " $forge_output " | awk ' /0: address/ {print $3}' )
2425new_aligned_layer_service_manager_implementation=$( echo " $forge_output " | awk ' /1: address/ {print $3}' )
2526
2627# Use the extracted value to replace the alignedLayerServiceManagerImplementation value in alignedlayer_deployment_output.json and save it to a temporary file
27- jq --arg new_aligned_layer_service_manager_implementation " $new_aligned_layer_service_manager_implementation " ' .addresses.alignedLayerServiceManagerImplementation = $new_aligned_layer_service_manager_implementation' " script/output/holesky/alignedlayer_deployment_output.json " > " script/output/holesky/alignedlayer_deployment_output.temp.json"
28+ jq --arg new_aligned_layer_service_manager_implementation " $new_aligned_layer_service_manager_implementation " ' .addresses.alignedLayerServiceManagerImplementation = $new_aligned_layer_service_manager_implementation' $OUTPUT_PATH > " script/output/holesky/alignedlayer_deployment_output.temp.json"
2829
2930# Replace the original file with the temporary file
30- mv " script/output/holesky/alignedlayer_deployment_output.temp.json" " script/output/holesky/alignedlayer_deployment_output.json "
31+ mv " script/output/holesky/alignedlayer_deployment_output.temp.json" $OUTPUT_PATH
3132
3233# Delete the temporary file
3334rm -f " script/output/holesky/alignedlayer_deployment_output.temp.json"
35+
36+ data=$( cast calldata " upgrade(address, address)" $aligned_layer_service_manager $new_aligned_layer_service_manager_implementation )
37+
38+ if [ -z $MULTISIG ]; then
39+ proxy_admin=$( jq -r ' .addresses.alignedLayerProxyAdmin' $OUTPUT_PATH )
40+ cast send $proxy_admin $data \
41+ --rpc-url $RPC_URL \
42+ --private-key $PRIVATE_KEY
43+ else
44+ echo " To send the transaction using multisig use this calldata"
45+ echo $data
46+ fi
You can’t perform that action at this time.
0 commit comments