-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathconfig.js
More file actions
39 lines (34 loc) · 1.11 KB
/
config.js
File metadata and controls
39 lines (34 loc) · 1.11 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
'use strict';
import { InputVerifier, KMSVerifier } from '../../lib/internal.js';
import { parseCommonOptions } from '../utils.js';
// npx . config
// npx . config --network testnet
// npx . config --network devnet
// npx . config --network mainnet
// npx . config --contract-address 0xb2a8A265dD5A27026693Aa6cE87Fb21Ac197b6b9 --user-address 0x37AC010c1c566696326813b840319B58Bb5840E4
export async function configCommand(options) {
const { config, provider, signer, zamaFhevmApiKey } =
parseCommonOptions(options);
const iv = await InputVerifier.loadFromChain({
inputVerifierContractAddress:
config.fhevmInstanceConfig.inputVerifierContractAddress,
provider,
});
const kv = await KMSVerifier.loadFromChain({
kmsContractAddress: config.fhevmInstanceConfig.kmsContractAddress,
provider,
});
console.log(
JSON.stringify(
{
...config,
coprocessorSigners: iv.coprocessorSigners,
coprocessorSignerThreshold: iv.coprocessorSignerThreshold,
kmsSigners: kv.kmsSigners,
kmsSignerThreshold: kv.kmsSignerThreshold,
},
null,
2,
),
);
}