forked from FidelVe/crosschain-voting-dapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
62 lines (59 loc) · 1.75 KB
/
config.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require("dotenv").config();
const { PK_BERLIN, PK_SEPOLIA } = process.env;
// modify this to change the network. Options are localhost, berlin, custom
const NETWORK_PRIMARY = "berlin";
const NETWORK_SECONDARY = "sepolia";
const config = {
rpc: {
localhost: "http://localhost:9080/api/v3",
berlin: "https://berlin.net.solidwallet.io/api/v3/icon_dex",
custom: "https://server02.espanicon.team/api/v3",
sepolia: "https://sepolia.infura.io/v3/ffbf8ebe228f4758ae82e175640275e0"
},
contract: {
icon: {
chain: "cx0000000000000000000000000000000000000000",
governance: "cx0000000000000000000000000000000000000001"
},
berlin: {
xcall: "cxf4958b242a264fc11d7d8d95f79035e35b21c1bb"
},
sepolia: {
dapp: "0x597F73bfb3124B6145151E7a8A30b781C41FF2B0",
xcall: "0x694C1f5Fb4b81e730428490a1cE3dE6e32428637"
}
},
nid: {
localhost: 3,
berlin: 7,
custom: 3
},
network: {
icon: {
label: "0x7.icon"
},
berlin: {
label: "0x7.icon"
},
sepolia: {
label: "0xaa36a7.eth2"
}
}
};
module.exports = {
...config,
PK_BERLIN: PK_BERLIN,
PK_SEPOLIA: PK_SEPOLIA,
USE_NETWORK: NETWORK_PRIMARY,
ICON_RPC_URL: config.rpc[NETWORK_PRIMARY],
EVM_RPC_URL: config.rpc[NETWORK_SECONDARY],
NID: config.nid[NETWORK_PRIMARY],
jarPath: "./contracts/jvm/VotingDapp/build/libs/VotingDapp-optimized.jar",
solPath: "./contracts/solidity/build/VotingDapp.json",
xcallAbiPath: "./xcallAbi.json",
XCALL_PRIMARY: config.contract[NETWORK_PRIMARY].xcall,
XCALL_SECONDARY: config.contract[NETWORK_SECONDARY].xcall,
NETWORK_LABEL_PRIMARY: config.network[NETWORK_PRIMARY].label,
NETWORK_LABEL_SECONDARY: config.network[NETWORK_SECONDARY].label,
deploymentsPath: "./deployments.json"
};