Skip to content

Commit 2c3bfc6

Browse files
committed
contracts: Allow to specify deployment keyper set index via env var
The keyperset index from the deployment json file can now be given via the `KEYPER_SET_INDEX` env variable.
1 parent 06c0a57 commit 2c3bfc6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

contracts/hardhat.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ extendEnvironment((hre) => {
8787
};
8888
}
8989

90-
hre.getKeyperAddresses = async function (index = 0) {
90+
hre.getKeyperAddresses = async function (index = -1) {
91+
if (index === -1) {
92+
index = parseInt(process.env.KEYPER_SET_INDEX ?? 0, 10);
93+
}
9194
const keypers = hre.deployConf.keypers?.at(index);
9295
if (keypers === undefined) {
9396
const { keyper0, keyper1, keyper2 } = await hre.getNamedAccounts();

docker/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ services:
5151
- ./config:/config
5252
environment:
5353
DEPLOY_CONF: /config/node-deploy.json
54+
KEYPER_SET_INDEX: 0
5455
depends_on:
5556
geth:
5657
condition: service_healthy

0 commit comments

Comments
 (0)