Skip to content

Commit f8b54c6

Browse files
committed
feat: add activationBlockOffset to deploy config
1 parent 3292356 commit f8b54c6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

contracts/deploy/500_configure_keypers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ const { configure_keypers } = require("../lib/configure-keypers.js");
22

33
module.exports = async function (hre) {
44
var keyperAddrs = await hre.getKeyperAddresses();
5-
await configure_keypers(keyperAddrs);
5+
await configure_keypers(keyperAddrs, hre.deployConf.activationBlockOffset);
66
};

contracts/hardhat.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ extendEnvironment((hre) => {
8383
keypers: null,
8484
collator: null,
8585
fundValue: "",
86+
activationBlockOffset: 30,
8687
};
8788
}
8889

contracts/scripts/change-keypers.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ async function main() {
2727
}
2828

2929
const keyperSetIndex = parseInt(process.env.KEYPER_SET_INDEX);
30-
31-
// TODO can we get access to the hre in a script like this?
32-
// TODO use a different json file to determine the keyper changes
3330
const deployConf = JSON.parse(fs.readFileSync(process.env.DEPLOY_CONF));
3431

3532
const newKeyperSet = deployConf.keypers?.at(keyperSetIndex);
@@ -45,8 +42,9 @@ async function main() {
4542
const bankSigner = await ethers.getSigner(bank);
4643

4744
const fundValue = hre.deployConf.fundValue;
45+
const activationBlockOffset = hre.deployConf.activationBlockOffset;
4846
await fund(newKeyperSet, bankSigner, fundValue);
49-
await configure_keypers(newKeyperSet, 30);
47+
await configure_keypers(newKeyperSet, activationBlockOffset);
5048
}
5149

5250
main()

docker/config.example/node-deploy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
],
1414
"decryptors": ["0x0000000000000000000000000000000000000000"],
1515
"collator": "0x2E135FE171fB6351026B75aF688a7F9689B66B87",
16-
"fundValue": "1000"
16+
"fundValue": "1000",
17+
"activationBlockOffset": "30"
1718
}

0 commit comments

Comments
 (0)