-
Notifications
You must be signed in to change notification settings - Fork 126
/
truffle-config.js
107 lines (89 loc) · 3.01 KB
/
truffle-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
'use strict';
const ETHLANCE_ENV = process.env.ETHLANCE_ENV || "dev";
const ETHLANCE_MNEMONIC = process.env.ETHLANCE_MNEMONIC;
const ETHLANCE_ETH_NODE_ADDRESS = process.env.ETHLANCE_ETH_NODE_ADDRESS;
const ETHLANCE_DEPLOYER_ADDRESS = process.env.ETHLANCE_DEPLOYER_ADDRESS
const ETHLANCE_DEPLOY_SEED = process.env.ETHLANCE_DEPLOY_SEED
const smartContractsPaths = {
"dev" : '/shared/src/ethlance/shared/smart_contracts_dev.cljs',
"qa" : '/shared/src/ethlance/shared/smart_contracts_qa.cljs',
"qa-base" : '/shared/src/ethlance/shared/smart_contracts_qa_base.cljs',
"prod" :'/shared/src/ethlance/shared/smart_contracts_prod.cljs'
};
let parameters = {
"qa" : {
},
"prod" : {
}
};
parameters.dev = parameters.qa;
const HDWalletProvider = require('@truffle/hdwallet-provider');
const DEFAULT_DEV_MNEMONIC = "easy leave proof verb wait patient fringe laptop intact opera slab shine";
const mnemonic = ETHLANCE_MNEMONIC || DEFAULT_DEV_MNEMONIC;
module.exports = {
env: ETHLANCE_ENV,
smart_contracts_path: __dirname + smartContractsPaths[ETHLANCE_ENV],
contracts_directory: __dirname + "/contracts",
contracts_build_directory: __dirname + '/resources/public/contracts/build/',
parameters : parameters [ETHLANCE_ENV],
compilers: {
solc: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 1
}
}
}
},
networks: {
development: {
port: 9545,
host: "0.0.0.0",
gas: 2 * 70000,
network_id: "*"
},
ganache: {
host: 'localhost',
port: 8549,
from: "0xeba108B12593336bBa461b8a6e7DC5A4b597Bc7E", // 6th address
gas: 10e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*'
},
"ganache-test": {
host: 'localhost',
port: 8550,
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*'
},
"ethlance.mad.is-testnet": {
host: 'ethlance.mad.is',
port: 8545,
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*',
from: "0xeba108B12593336bBa461b8a6e7DC5A4b597Bc7E" // 6) address
},
"arbitrum-sepolia": {
provider: new HDWalletProvider({mnemonic: {phrase: mnemonic},
providerOrUrl: ETHLANCE_ETH_NODE_ADDRESS || 'https://sepolia-rollup.arbitrum.io/rpc'
}),
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: 421614,
from: "0x642fAE80d3C74559A18B0558A518cDBF6b047968" // 1st address
},
"base-sepolia": {
provider: new HDWalletProvider({mnemonic: {phrase: ETHLANCE_DEPLOY_SEED},
providerOrUrl: ETHLANCE_ETH_NODE_ADDRESS || 'https://sepolia.base.org'
}),
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: 84532,
from: ETHLANCE_DEPLOYER_ADDRESS
}
}
}