forked from district0x/memefactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
167 lines (163 loc) · 6.76 KB
/
truffle.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
'use strict';
const MEMEFACTORY_ENV = process.env.MEMEFACTORY_ENV || "dev";
const HDWalletProvider = require("@truffle/hdwallet-provider");
require('dotenv').config() // Store environment-specific variable from '.env' to process.env
const BigNumber = require('bignumber.js');
const smartContractsPaths = {
"dev" : '/src/memefactory/shared/smart_contracts_dev.cljs',
"qa" : '/src/memefactory/shared/smart_contracts_qa.cljs',
"prod" :'/src/memefactory/shared/smart_contracts_prod.cljs'
};
let parameters = {
"dev" : {
polygonCheckpointManager: "0x597C411F86D674aa38dF42F76990ea57346978b2",
fxRoot: "0x449949F4262510ffcf79402Abd547449bD3f3e07",
fxChild: "0xAA2889D0923E6E00b111b2B291CB37f4878442f5",
ENS: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
memeRegistryDb : {challengePeriodDuration : 600, // seconds (10 minutes)
commitPeriodDuration : 600, // seconds
revealPeriodDuration : 600, // seconds
deposit : "1000000000000000000", // 1e18 = 1 DANK
challengeDispensation : 50, // percent
maxTotalSupply : 10, // int
maxAuctionDuration : 1.21e6 // seconds
},
paramChangeRegistryDb : {challengePeriodDuration : 600, // seconds
commitPeriodDuration : 600, // seconds
revealPeriodDuration : 600, // seconds
deposit : "1000000000000000000", // 1e18 = 1 DANK
challengeDispensation : 50 // percent
},
dankFaucet : {dank : "5000000000000000000000000", // how much DANK contract holds, 1e18 = 1 DANK
eth : "100000000000000000", // ETH, 1e18 = 1ETH
allotment : "20000000000000000000", // how much DANK faucet sends, 1e18 = 1 DANK
sender: "0x0000000000000000000000000000000000000000"
}
},
"qa" : {
polygonCheckpointManager: "0x2890ba17efe978480615e330ecb65333b880928e",
fxRoot: "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA",
fxChild: "0xCf73231F28B7331BBe3124B907840A94851f9f11",
ENS: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
memeRegistryDb : {challengePeriodDuration : 600, // seconds (10 minutes)
commitPeriodDuration : 600, // seconds
revealPeriodDuration : 600, // seconds
deposit : "1000000000000000000", // 1e18 = 1 DANK
challengeDispensation : 50, // percent
maxTotalSupply : 10, // int
maxAuctionDuration : 1.21e6 // seconds
},
paramChangeRegistryDb : {challengePeriodDuration : 600, // seconds
commitPeriodDuration : 600, // seconds
revealPeriodDuration : 600, // seconds
deposit : "1000000000000000000", // 1e18 = 1 DANK
challengeDispensation : 50 // percent
},
dankFaucet : {dank : "5000000000000000000000000", // how much DANK contract holds, 1e18 = 1 DANK
eth : "100000000000000000", // ETH, 1e18 = 1ETH
allotment : "20000000000000000000", // how much DANK faucet sends, 1e18 = 1 DANK
sender: "0x7532413a93eb86554c67fdd86eded3642cf68289"
}
},
"prod" : {
polygonCheckpointManager: "0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287",
fxRoot: "0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2",
fxChild: "0x8397259c983751DAf40400790063935a11afa28a",
ENS: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
memeRegistryDb : {challengePeriodDuration : 86400, // seconds (24h)
commitPeriodDuration : 86400, // seconds
revealPeriodDuration : 86400, // seconds
deposit : new BigNumber("100e18"), // 1e18 = 1 DANK
challengeDispensation : 50, // percent
maxTotalSupply : 10, // int
maxAuctionDuration : (30 * 86400) // seconds
},
paramChangeRegistryDb : {challengePeriodDuration : (10 * 86400), // seconds
commitPeriodDuration : (10 * 86400), // seconds
revealPeriodDuration : (10 * 86400), // seconds
deposit : new BigNumber("1000000e18"), // 1e18 = 1 DANK
challengeDispensation : 50 // percent
},
dankFaucet : {dank : new BigNumber("5000000e18"), // how much DANK contract holds, 1e18 = 1 DANK
eth : new BigNumber("0.2e18"), // ETH, 1e18 = 1ETH
allotment : new BigNumber("2000e18"), // how much DANK faucet sends, 1e18 = 1 DANK
sender: "0xd519a24d465a1f8b9b83f9c3948f9d5d29eddeac"
}
}
};
module.exports = {
env: MEMEFACTORY_ENV,
smart_contracts_path: __dirname + smartContractsPaths [MEMEFACTORY_ENV],
contracts_build_directory: __dirname + '/resources/public/contracts/build/',
parameters : parameters [MEMEFACTORY_ENV],
networks: {
"ganache": {
host: 'localhost',
port: 8545,
gas: 6e6, // gas limit
gasPrice: 20e9, // 20 gwei, default for ganache
network_id: '*'
},
"root": {
networkCheckTimeout: 1000000,
host: 'localhost',
port: 9545,
gas: 6e6, // gas limit
gasPrice: 0,
network_id: '*'
},
"bor": {
host: 'localhost',
port: 8545,
network_id: '*',
skipDryRun: true,
gas: 7000000,
gasPrice: 0
},
"infura-ropsten": {
provider: () => new HDWalletProvider(process.env.ROPSTEN_PRIV_KEY, "https://ropsten.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 3,
gas: 6e6,
gasPrice: 6e9,
skipDryRun: true
},
"infura-goerli": {
provider: () => new HDWalletProvider(process.env.GOERLI_PRIV_KEY, "https://goerli.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 5,
gas: 6e6,
gasPrice: 6e9,
skipDryRun: true
},
"infura-polygon-mumbai": {
provider: () => new HDWalletProvider(process.env.POLYGON_MUMBAY_PRIV_KEY, "https://polygon-mumbai.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 80001,
gas: 6e6,
gasPrice: 9e9,
skipDryRun: true
},
"infura-mainnet": {
provider: () => new HDWalletProvider(process.env.MAINNET_PRIV_KEY, "https://mainnet.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 1,
gas: 6e6,
gasPrice: 9e9,
skipDryRun: true
},
"infura-polygon-mainnet": {
provider: () => new HDWalletProvider(process.env.POLYGON_MAINNET_PRIV_KEY, "https://polygon-mainnet.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 137,
gas: 6e6,
gasPrice: 9e9,
skipDryRun: true
}
},
compilers: {
solc: {
version: "0.8.2",
settings: {
optimizer: {
enabled: true
}
}
}
}
};