File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed
contracts/scripts/proof_aggregator_service Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ forge script script/deploy/AlignedProofAggregationServiceDeployer.s.sol \
1919 --broadcast \
2020 --verify \
2121 --etherscan-api-key $ETHERSCAN_API_KEY \
22- --sig " run(string memory batcherConfigPath, string memory outputPath)"
22+ --sig " run(string memory configPath, string memory outputPath)" \
23+ --via-ir
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # TODO
3+ # cd to the directory of this script so that this can be run from anywhere
4+ parent_path=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " ; pwd -P )
5+
6+ cd " $parent_path "
7+
8+ cd ../
9+
10+ # Save the output to a variable to later extract the address of the new deployed contract
11+ forge_output=$( forge script script/upgrade/ProofAggregatorServiceUpgrader.s.sol \
12+ $EXISTING_DEPLOYMENT_INFO_PATH \
13+ $OUTPUT_PATH \
14+ --rpc-url $RPC_URL \
15+ --private-key $PRIVATE_KEY \
16+ --broadcast \
17+ --verify \
18+ --etherscan-api-key $ETHERSCAN_API_KEY \
19+ --sig " run(string memory alignedLayerDeploymentFilePath)" )
20+
21+ echo " $forge_output "
22+
23+ # Extract the proof aggregator service values from the output
24+ proof_aggregator_service_proxy=$( echo " $forge_output " | awk ' /0: address/ {print $3}' )
25+ proof_aggregator_service_implementation=$( echo " $forge_output " | awk ' /1: address/ {print $3}' )
26+
27+ # Use the extracted value to replace the batcher payment service values in alignedlayer_deployment_output.json and save it to a temporary file
28+ jq --arg proof_aggregator_service_implementation " $proof_aggregator_service_implementation " ' .addresses.alignedProofAggregationServiceImplementation = $proof_aggregator_service_implementation' $OUTPUT_PATH > " $OUTPUT_PATH .temp"
29+
30+ # Replace the original file with the temporary file
31+ mv " $OUTPUT_PATH .temp" $OUTPUT_PATH
32+
33+ # Delete the temporary file
34+ rm -f " $OUTPUT_PATH .temp"
35+
36+ data=$( cast calldata " upgradeTo(address)" $batcher_payment_service_implementation )
37+
38+ echo " The new Proof Aggregator Service Implementation is $batcher_payment_service_implementation "
You can’t perform that action at this time.
0 commit comments