Skip to content

Commit c89a33c

Browse files
committed
Run log 10 Oct 25 - deposit SSV to clusters
1 parent 6e8c657 commit c89a33c

File tree

4 files changed

+344
-222
lines changed

4 files changed

+344
-222
lines changed

contracts/scripts/runlogs/2025_10.s.sol

Lines changed: 124 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,131 @@ import { SetupMainnet } from "./utils/Setup.sol";
88

99
import { CrossChain } from "./utils/Addresses.sol";
1010

11+
import { Cluster } from "contracts/contracts/interfaces/ISSVNetwork.sol";
12+
import { Mainnet } from "./utils/Addresses.sol";
13+
1114
// Foundry
1215
import { console } from "forge-std/console.sol";
1316

1417
contract Runlogs_2025_10_Mainnet is SetupMainnet {
15-
function run() public {
16-
_2025_10_01();
17-
//_2025_10_02();
18-
}
19-
20-
// ------------------------------------------------------------------
21-
// Oct 3, 2025 - Yield Forward to Computed Merkl Pool Booster
22-
// ------------------------------------------------------------------
23-
function _2025_10_01() internal {
24-
bytes memory campaignData =
25-
hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
26-
27-
vm.startBroadcast(strategist);
28-
29-
console.log("-----");
30-
console.log("strategist address", address(strategist));
31-
console.log("poolBoosterFactoryMerkl address", address(poolBoosterFactoryMerkl));
32-
33-
address poolBoosterAddress = poolBoosterFactoryMerkl.computePoolBoosterAddress({
34-
_campaignType: 45,
35-
_ammPoolAddress: CrossChain.MORPHO_BLUE,
36-
_campaignDuration: 7 days,
37-
campaignData: campaignData,
38-
_salt: uint256(keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1")))
39-
});
40-
41-
console.log("computed address", poolBoosterAddress);
42-
43-
// Run yield forward
44-
oeth.delegateYield(CrossChain.MORPHO_BLUE, poolBoosterAddress);
45-
vm.stopBroadcast();
46-
}
47-
48-
// ------------------------------------------------------------------
49-
// Oct 3+ TODO, 2025 - Create Merkl Pool Booster once Central Registry governance passes
50-
// ------------------------------------------------------------------
51-
function _2025_10_02() internal {
52-
bytes memory campaignData =
53-
hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
54-
55-
vm.startBroadcast(strategist);
56-
// Create the pool booster
57-
poolBoosterFactoryMerkl.createPoolBoosterMerkl({
58-
_campaignType: 45, // Incentivise Borrow rate of OETH/USDC
59-
_ammPoolAddress: CrossChain.MORPHO_BLUE,
60-
_campaignDuration: 7 days,
61-
campaignData: campaignData,
62-
_salt: uint256(keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1")))
63-
});
64-
65-
vm.stopBroadcast();
66-
}
67-
}
18+
function run() public {
19+
// _2025_10_01();
20+
//_2025_10_02();
21+
_2025_10_07();
22+
}
23+
24+
// ------------------------------------------------------------------
25+
// Oct 3, 2025 - Yield Forward to Computed Merkl Pool Booster
26+
// ------------------------------------------------------------------
27+
function _2025_10_01() internal {
28+
bytes
29+
memory campaignData = hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
30+
31+
vm.startBroadcast(strategist);
32+
33+
console.log("-----");
34+
console.log("strategist address", address(strategist));
35+
console.log(
36+
"poolBoosterFactoryMerkl address",
37+
address(poolBoosterFactoryMerkl)
38+
);
39+
40+
address poolBoosterAddress = poolBoosterFactoryMerkl
41+
.computePoolBoosterAddress({
42+
_campaignType: 45,
43+
_ammPoolAddress: CrossChain.MORPHO_BLUE,
44+
_campaignDuration: 7 days,
45+
campaignData: campaignData,
46+
_salt: uint256(
47+
keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1"))
48+
)
49+
});
50+
51+
console.log("computed address", poolBoosterAddress);
52+
53+
// Run yield forward
54+
oeth.delegateYield(CrossChain.MORPHO_BLUE, poolBoosterAddress);
55+
vm.stopBroadcast();
56+
}
57+
58+
// ------------------------------------------------------------------
59+
// Oct 3+ TODO, 2025 - Create Merkl Pool Booster once Central Registry governance passes
60+
// ------------------------------------------------------------------
61+
function _2025_10_02() internal {
62+
bytes
63+
memory campaignData = hex"b8fef900b383db2dbbf4458c7f46acf5b140f26d603a6d1829963f241b82510e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
64+
65+
vm.startBroadcast(strategist);
66+
// Create the pool booster
67+
poolBoosterFactoryMerkl.createPoolBoosterMerkl({
68+
_campaignType: 45, // Incentivise Borrow rate of OETH/USDC
69+
_ammPoolAddress: CrossChain.MORPHO_BLUE,
70+
_campaignDuration: 7 days,
71+
campaignData: campaignData,
72+
_salt: uint256(
73+
keccak256(abi.encodePacked("Merkl Morpho PB OETH/USDC v1"))
74+
)
75+
});
76+
77+
vm.stopBroadcast();
78+
}
79+
80+
// ------------------------------------------------------------------
81+
// Oct 7, 2025 - Deposit 400 SSV to the second SSV cluster and
82+
// 200 SSV to the third SSV cluster
83+
// ------------------------------------------------------------------
84+
function _2025_10_07() internal {
85+
vm.startBroadcast(strategist);
86+
87+
console.log("-----");
88+
console.log("strategist address", address(strategist));
89+
console.log("SSV token address", address(ssv));
90+
console.log("SSV Network address", address(ssvNetwork));
91+
92+
uint256 ssvDepositAmount = 600 * 1e18; // 600 SSV
93+
94+
ssv.approve(address(ssvNetwork), ssvDepositAmount);
95+
96+
uint64[] memory operatorIds = new uint64[](4);
97+
operatorIds[0] = 752;
98+
operatorIds[1] = 753;
99+
operatorIds[2] = 754;
100+
operatorIds[3] = 755;
101+
102+
// Get the SSV Cluster data from the following Hardhat task
103+
// npx hardhat getClusterInfo --operatorids 752,753,754,755 --network mainnet --owner 0x4685dB8bF2Df743c861d71E6cFb5347222992076
104+
ssvNetwork.deposit(
105+
Mainnet.NATIVE_STAKING_STRATEGY_2,
106+
operatorIds,
107+
400 * 1e18, // 400 SSV,
108+
Cluster({
109+
validatorCount: 500,
110+
networkFeeIndex: 97648369159,
111+
index: 9585132,
112+
active: true,
113+
balance: 1066288969170302776597
114+
})
115+
);
116+
117+
operatorIds[0] = 338;
118+
operatorIds[1] = 339;
119+
operatorIds[2] = 340;
120+
operatorIds[3] = 341;
121+
122+
// npx hardhat getClusterInfo --operatorids 338,339,340,341 --network mainnet --owner 0xE98538A0e8C2871C2482e1Be8cC6bd9F8E8fFD63
123+
ssvNetwork.deposit(
124+
Mainnet.NATIVE_STAKING_STRATEGY_3,
125+
operatorIds,
126+
200 * 1e18, // 200 SSV,
127+
Cluster({
128+
validatorCount: 436,
129+
networkFeeIndex: 226592732593,
130+
index: 0,
131+
active: true,
132+
balance: 419059922731900000000
133+
})
134+
);
135+
136+
vm.stopBroadcast();
137+
}
138+
}

contracts/scripts/runlogs/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,58 @@
11
# How to use foundry runlogs?
22

33
## 1. Ensure all dependencies are installed
4+
45
At the root of the repo run:
6+
57
```bash
68
forge soldeer install
79
cd contract
810
yarn install
911
```
1012

1113
## 2. Execute runlogs
14+
1215
In the `contracts` folder run:
16+
1317
```bash
1418
forge script Runlogs_2025_08_Mainnet
1519
```
20+
1621
> Note: adjust the year, month and chain accordingly.
1722
1823
This generates 2 files (that are `broadcast-ready` for execution) under `contracts/broadcast`:
24+
1925
- run-latest.json
2026
- run-1755456667783.json (with the timestamp corresponding to the execution time)
2127

2228
## 3. Convert runlogs into Safe-compatible JSON
29+
2330
Since these transactions are meant to be executed from the Safe, it is not possible to use `cast`.
2431

25-
To convert a `broadcast-ready` into a Safe-compatible JSON file, use the forge script: `scripts/runlogs/utils/BroadcastConvertor.sol`.
32+
To convert a `broadcast-ready` into a Safe-compatible JSON file, use the forge script: `scripts/runlogs/utils/BroadcastConvertor.sol`.
2633

2734
In the `contracts` folder run:
35+
2836
```bash
29-
forge script BroadcastConvertor --sig "run(string)" contracts/broadcast/2025_09.sol/146/dry-run/
37+
forge script BroadcastConvertor --sig "run(string)" contracts/broadcast/2025_09.s.sol/146/dry-run/
3038
```
39+
3140
> Note adjust the input accordingly:
3241
> first the path to the run file, but stop at the dry-run folder.
3342
3443
This creates, by default, a file named `run-latest-safe.json` in the same location as the input file, ready to be imported into the Safe UI.
3544

3645
### Timelock targeted ?
46+
3747
If on the script, the address used inside `startBroadcast()` is a `Timelock`:
38-
- the Safe-compatible JSON will be adjusted to target the `scheduleBatch` and `executeBatch` functions on the `Timelock` contract.
39-
- two files will be generated: `run-latest-schedule` and `run-latest-execute`.
4048

49+
- the Safe-compatible JSON will be adjusted to target the `scheduleBatch` and `executeBatch` functions on the `Timelock` contract.
50+
- two files will be generated: `run-latest-schedule` and `run-latest-execute`.
4151

4252
## 4. How generates Safe JSON in just one command?
53+
4354
In the `contracts` folder:
55+
4456
```makefile
4557
make script
4658
or

0 commit comments

Comments
 (0)