-
Notifications
You must be signed in to change notification settings - Fork 125
Expand file tree
/
Copy pathtruffle-config.js
More file actions
100 lines (84 loc) · 2.89 KB
/
truffle-config.js
File metadata and controls
100 lines (84 loc) · 2.89 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
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
'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 ETHLANCE_INFURA_API_KEY = process.env.ETHLANCE_INFURA_API_KEY || "fc19514210574bf580fbc13f58f65819";
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: {
provider: function () {
return new HDWalletProvider(DEFAULT_DEV_MNEMONIC, "http://localhost: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: '*'
},
"base-sepolia": {
provider: function () {
return 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
},
"production": {
provider: function () {
return new HDWalletProvider({mnemonic: {phrase: ETHLANCE_DEPLOY_SEED},
providerOrUrl: `https://base-mainnet.infura.io/v3/${ETHLANCE_INFURA_API_KEY}`})},
gas: 3000000,
gasPrice: 0.004 * 1e9,
network_id: 8453,
from: ETHLANCE_DEPLOYER_ADDRESS,
timeoutBlocks: 200,
confirmations: 2
}
}
}