-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathAggregationModePaymentServiceUpgrader.s.sol
More file actions
40 lines (31 loc) · 1.26 KB
/
AggregationModePaymentServiceUpgrader.s.sol
File metadata and controls
40 lines (31 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;
import {AggregationModePaymentService} from "../../src/core/AggregationModePaymentService.sol";
import "forge-std/Script.sol";
import "forge-std/StdJson.sol";
contract AggregationModePaymentServiceUpgrader is Script {
function run(
string memory alignedLayerDeploymentFilePath
) external returns (address, address) {
string memory aligned_deployment_file = vm.readFile(
alignedLayerDeploymentFilePath
);
vm.startBroadcast();
AggregationModePaymentService aggregationModePaymentServiceProxy =
AggregationModePaymentService(payable(
stdJson.readAddress(
aligned_deployment_file,
".addresses.aggregationModePaymentService"
)
));
AggregationModePaymentService newAggregationModePaymentServiceImplementation =
new AggregationModePaymentService();
// Not link the new implementation to the proxy
// Because this must be executed in the multisig
vm.stopBroadcast();
return (
address(aggregationModePaymentServiceProxy),
address(newAggregationModePaymentServiceImplementation)
);
}
}