From 56c7f7046a1edfccd980681c7464536d39bdb5b7 Mon Sep 17 00:00:00 2001 From: Marcos Nicolau Date: Fri, 19 Dec 2025 17:03:45 -0300 Subject: [PATCH] feat: deploy agg mode payment service contract --- Makefile | 4 ++ .../deploy_agg_mode_payment_service.sh | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 contracts/scripts/deploy_agg_mode_payment_service.sh diff --git a/Makefile b/Makefile index 7374089d3..5e5ece37f 100644 --- a/Makefile +++ b/Makefile @@ -997,6 +997,10 @@ upgrade_proof_aggregator: ## Upgrade ProofAggregator contract. Parameters: NETWO @echo "Upgrading ProofAggregator Contract on $(NETWORK) network..." @. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_proof_aggregator.sh +deploy_agg_mode_payment_service: + @echo "Deploying Agg Mode Payment Service contract on $(NETWORK) network..." + @. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_agg_mode_payment_service.sh + __SP1_FFI__: ## build_sp1_macos: @cd operator/sp1/lib && cargo build $(RELEASE_FLAG) diff --git a/contracts/scripts/deploy_agg_mode_payment_service.sh b/contracts/scripts/deploy_agg_mode_payment_service.sh new file mode 100644 index 000000000..f48f7a6ba --- /dev/null +++ b/contracts/scripts/deploy_agg_mode_payment_service.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# ENV VARIABLES +# +# PROOF_AGGREGATOR_DEPLOY_CONFIG_PATH: Path to the proof aggregator deploy config file +# - Holesky Stage: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json +# - Holesky Prod: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.json +# - Sepolia: ./script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json +# +# PROOF_AGGREGATOR_OUTPUT_PATH: Path to the proof aggregator output file +# - Holesky Stage: ./script/output/holesky/proof_aggregation_service_deployment_output.stage.json +# - Holesky Prod: ./script/output/holesky/proof_aggregation_service_deployment_output.json +# - Sepolia: ./script/output/sepolia/proof_aggregation_service_deployment_output.json +# +# RPC_URL: The RPC URL to connect to the Ethereum network +# +# PRIVATE_KEY: The private key to use for the deployment +# +# ETHERSCAN_API_KEY: The Etherscan API key to use for verification +# + +# cd to the directory of this script so that this can be run from anywhere +parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) +# At this point we are in contracts/scripts +cd "$parent_path" + +# At this point we are in contracts +cd ../ + +# Deploy agg mode payment service contract +forge script script/deploy/AggregationModePaymentServiceDeployer.s.sol \ + $PROOF_AGGREGATOR_DEPLOY_CONFIG_PATH \ + $PROOF_AGGREGATOR_OUTPUT_PATH \ + --rpc-url $RPC_URL \ + --private-key $PRIVATE_KEY \ + --broadcast \ + --verify \ + --etherscan-api-key $ETHERSCAN_API_KEY \ + --slow \ + --sig "run(string configPath, string outputPath)" \ + --via-ir