Skip to content

Commit 9d4c5f5

Browse files
committed
Update aggregator and syrup module deployment scripts; add verify-args generation
1 parent a52b8e3 commit 9d4c5f5

File tree

6 files changed

+100
-11
lines changed

6 files changed

+100
-11
lines changed

config/chains.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
"v2LPStaking": true
6464
},
6565
"deployed": {
66-
"_updatedAt": "2026-01-03T04:57:42.507Z",
67-
"aggregator": "0xda13ca59c0806c6093cf07e6f29b379e31adc181",
66+
"_updatedAt": "2026-01-13T12:41:42.267Z",
67+
"aggregator": "0x9975bc2fa6590620aeee87bd7e7e4bec0001095c",
6868
"walletQuick": "0xc52f200f29ac8f37d23ee00a31e6cdafdbd71506",
6969
"algebraIntegralV4": "0xacd0d266d504ebbdf4ccd141673a8bd9630b97c8",
7070
"liquidityManagers": "0x22729e385310f035b54866c270d9f0b2cf0b6d64",
7171
"v2LPStaking": "0x559781f2b6d8b9499626317d68858f99e45437be",
72-
"syrupStaking": "0x4ab15a06d1d5ca5d3e9d495b6f82fbc5b9e99555"
72+
"syrupStaking": "0x4e0acd3980a601821b9724586cd3da81cdc7f33a"
7373
}
7474
},
7575
"ethereum": {

scripts/deploy/base-syrup-module.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,27 @@ async function main() {
191191

192192
const aggregatorAddress = BASE_CONFIG.deployed.aggregator;
193193

194-
console.log("\n1️⃣ Verify the contract on Basescan:\n");
195-
console.log(` pnpm exec hardhat verify --network base ${syrupModule.address} \\`);
196-
console.log(` "${OWNER_ADDRESS}" \\`);
197-
console.log(` "${factoryAddress}" \\`);
198-
console.log(` "[]"\n`);
194+
// Generate verify-args file
195+
const verifyArgsDir = path.join(__dirname, "..", "..", "verify-args");
196+
fs.mkdirSync(verifyArgsDir, { recursive: true });
197+
const verifyArgsFile = path.join(verifyArgsDir, "base-syrup-module.js");
198+
fs.writeFileSync(verifyArgsFile, `/**
199+
* Constructor arguments for SyrupStakingModule on Base
200+
* Generated: ${new Date().toISOString()}
201+
* Contract: ${syrupModule.address}
202+
*/
203+
module.exports = [
204+
"${OWNER_ADDRESS}", // owner
205+
"${factoryAddress}", // factory
206+
[] // legacyPools
207+
];
208+
`);
209+
console.log(`📄 Created: verify-args/base-syrup-module.js\n`);
210+
211+
console.log("1️⃣ Verify the contract on Basescan:\n");
212+
console.log(` pnpm exec hardhat verify --network base \\`);
213+
console.log(` --constructor-args-path verify-args/base-syrup-module.js \\`);
214+
console.log(` ${syrupModule.address}\n`);
199215

200216
console.log("2️⃣ Update the BaseAggregator to use this module:\n");
201217
console.log(` Aggregator Address: ${aggregatorAddress}`);

scripts/deploy/redeploy-aggregator.ts

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,35 @@ async function main() {
171171
}, null, 2));
172172
console.log(`📄 Backup: ${backupFile}`);
173173

174+
// Generate verify-args file
175+
const verifyArgsDir = path.join(__dirname, "..", "..", "verify-args");
176+
fs.mkdirSync(verifyArgsDir, { recursive: true });
177+
const verifyArgsFile = path.join(verifyArgsDir, `${chainKey}-aggregator.js`);
178+
179+
fs.writeFileSync(verifyArgsFile, `/**
180+
* Constructor arguments for ${chainKey === "polygon" ? "Polygon" : "Base"}Aggregator
181+
* Generated: ${new Date().toISOString()}
182+
* Contract: ${aggregator.address}
183+
*/
184+
module.exports = [
185+
"${OWNER}", // owner
186+
${Object.entries(modules).map(([name, addr]) => ` "${addr}", // ${name}`).join("\n")}
187+
];
188+
`);
189+
console.log(`📄 Created: verify-args/${chainKey}-aggregator.js`);
190+
174191
console.log("");
175192
console.log("=".repeat(60));
176193
console.log("🎯 NEXT STEPS:");
177-
console.log(` 1. Verify contract on explorer`);
178-
console.log(` 2. Test in Snapshot playground: ${aggregator.address}`);
179-
console.log(` 3. Update Snapshot strategy`);
194+
console.log("");
195+
console.log("1️⃣ Verify contract:");
196+
console.log(` pnpm exec hardhat verify --network ${chainKey} \\`);
197+
console.log(` --constructor-args-path verify-args/${chainKey}-aggregator.js \\`);
198+
console.log(` ${aggregator.address}`);
199+
console.log("");
200+
console.log(`2️⃣ Test in Snapshot playground: ${aggregator.address}`);
201+
console.log("");
202+
console.log(`3️⃣ Update Snapshot strategy`);
180203
}
181204

182205
main().catch((e) => {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"domain": {
3+
"name": "snapshot",
4+
"version": "0.1.4"
5+
},
6+
"primaryType": "Space",
7+
"types": {
8+
"Space": [
9+
{ "name": "from", "type": "address" },
10+
{ "name": "space", "type": "string" },
11+
{ "name": "timestamp", "type": "uint64" },
12+
{ "name": "settings", "type": "string" }
13+
]
14+
},
15+
"message": {
16+
"from": "",
17+
"space": "",
18+
"timestamp": 1768308837,
19+
"settings": ""
20+
}
21+
}

verify-args/base-aggregator.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Constructor arguments for BaseAggregator
3+
* Generated: 2026-01-13T12:41:42.268Z
4+
* Contract: 0x9975bc2fa6590620aeee87bd7e7e4bec0001095c
5+
*/
6+
module.exports = [
7+
"0xDA1077c4b0dd6da1BDF166F30aa4BDbF517d637b", // owner
8+
"0xc52f200f29ac8f37d23ee00a31e6cdafdbd71506", // walletQuick
9+
"0x4e0acd3980a601821b9724586cd3da81cdc7f33a", // syrupStaking
10+
"0xacd0d266d504ebbdf4ccd141673a8bd9630b97c8", // algebraIntegralV4
11+
"0x22729e385310f035b54866c270d9f0b2cf0b6d64", // liquidityManagers
12+
"0x559781f2b6d8b9499626317d68858f99e45437be", // v2LPStaking
13+
];

verify-args/base-syrup-module.cjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Constructor arguments for SyrupStakingModule on Base
3+
* ISSUE with "[]" empty list
4+
*
5+
* Usage:
6+
* pnpm exec hardhat verify --network base \
7+
* --constructor-args-path verify-args/base-syrup-module.js \
8+
* <CONTRACT_ADDRESS>
9+
*
10+
* Current deployed: 0x4e0acd3980a601821b9724586cd3da81cdc7f33a
11+
*/
12+
module.exports = [
13+
"0xDA1077c4b0dd6da1BDF166F30aa4BDbF517d637b", // owner (Governance Safe)
14+
"0x4880c9ff216ae69Cb1Fc717575d824314Ed862a9", // factory (StakingRewardsFactory)
15+
[] // legacyPools (empty array for Base)
16+
];

0 commit comments

Comments
 (0)