@@ -72,11 +72,12 @@ async function deployAllContracts({overwrites, accounts, artifacts, web3, chainI
72
72
if ( overwrites [ 'Clovers' ] || ! cloversAddress ) {
73
73
clovers = await Clovers . new ( 'Clovers' , 'CLVR' )
74
74
tx = await web3 . eth . getTransactionReceipt ( clovers . transactionHash )
75
- verbose && console . log ( _ + ' Deploy clovers - ' + tx . gasUsed )
75
+ verbose && console . log ( _ + ` Deploy clovers at ${ clovers . address } - ` + tx . gasUsed )
76
76
verbose && gasToCash ( tx . gasUsed )
77
77
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
78
78
} else {
79
79
clovers = await Clovers . at ( cloversAddress )
80
+ verbose && console . log ( _ + `Already deployed Clovers at ${ cloversAddress } ` )
80
81
}
81
82
82
83
// Deploy CloversMetadata.sol
@@ -85,11 +86,12 @@ async function deployAllContracts({overwrites, accounts, artifacts, web3, chainI
85
86
if ( overwrites [ 'CloversMetadata' ] || ! cloversMetadataAddress ) {
86
87
cloversMetadata = await CloversMetadata . new ( clovers . address )
87
88
tx = await web3 . eth . getTransactionReceipt ( cloversMetadata . transactionHash )
88
- verbose && console . log ( _ + ' Deploy cloversMetadata - ' + tx . gasUsed )
89
+ verbose && console . log ( _ + ` Deploy cloversMetadata at ${ cloversMetadata . address } - ` + tx . gasUsed )
89
90
verbose && gasToCash ( tx . gasUsed )
90
91
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
91
92
} else {
92
93
cloversMetadata = await CloversMetadata . at ( cloversMetadataAddress )
94
+ verbose && console . log ( _ + `Already deployed CloversMetadata at ${ cloversMetadataAddress } ` )
93
95
}
94
96
95
97
// Deploy ClubToken.sol (ERC20)
@@ -100,35 +102,38 @@ async function deployAllContracts({overwrites, accounts, artifacts, web3, chainI
100
102
if ( overwrites [ 'ClubToken' ] || ! clubTokenAddress ) {
101
103
clubToken = await ClubToken . new ( 'CloverCoin' , 'CLC' , decimals )
102
104
tx = await web3 . eth . getTransactionReceipt ( clubToken . transactionHash )
103
- verbose && console . log ( _ + ' Deploy clubToken - ' + tx . gasUsed )
105
+ verbose && console . log ( _ + ` Deploy clubToken at ${ clubToken . address } - ` + tx . gasUsed )
104
106
verbose && gasToCash ( tx . gasUsed )
105
107
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
106
108
} else {
107
109
clubToken = await ClubToken . at ( clubTokenAddress )
110
+ verbose && console . log ( _ + `Already deployed ClubToken at ${ clubTokenAddress } ` )
108
111
}
109
112
110
113
// Deploy Reversi.sol
111
114
let reversiAddress = await alreadyDeployed ( 'Reversi' )
112
115
if ( overwrites [ 'Reversi' ] || overwrites [ 'CloversController' ] || ! reversiAddress ) {
113
116
reversi = await Reversi . new ( )
114
117
tx = await web3 . eth . getTransactionReceipt ( reversi . transactionHash )
115
- verbose && console . log ( _ + ' Deploy reversi - ' + tx . gasUsed )
118
+ verbose && console . log ( _ + ` Deploy reversi at ${ reversi . address } - ` + tx . gasUsed )
116
119
verbose && gasToCash ( tx . gasUsed )
117
120
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
118
121
} else {
119
122
reversi = await Reversi . at ( reversiAddress )
123
+ verbose && console . log ( _ + `Already deployed Reversi at ${ reversiAddress } ` )
120
124
}
121
125
// Deploy ClubTokenController.sol
122
126
// -w ClubToken address
123
127
let clubTokenControllerAddress = await alreadyDeployed ( 'ClubTokenController' )
124
128
if ( overwrites [ 'ClubTokenController' ] || ! clubTokenControllerAddress ) {
125
129
clubTokenController = await ClubTokenController . new ( clubToken . address )
126
130
tx = await web3 . eth . getTransactionReceipt ( clubTokenController . transactionHash )
127
- verbose && console . log ( _ + ' Deploy clubTokenController - ' + tx . gasUsed )
131
+ verbose && console . log ( _ + ` Deploy clubTokenController at ${ clubTokenController . address } - ` + tx . gasUsed )
128
132
verbose && gasToCash ( tx . gasUsed )
129
133
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
130
134
} else {
131
135
clubTokenController = await ClubTokenController . at ( clubTokenControllerAddress )
136
+ verbose && console . log ( _ + `Already deployed ClubTokenController at ${ clubTokenControllerAddress } ` )
132
137
}
133
138
134
139
// Deploy CloversController.sol
@@ -149,11 +154,12 @@ async function deployAllContracts({overwrites, accounts, artifacts, web3, chainI
149
154
clubTokenController . address
150
155
)
151
156
tx = await web3 . eth . getTransactionReceipt ( cloversController . transactionHash )
152
- verbose && console . log ( _ + ' Deploy cloversController - ' + tx . gasUsed )
157
+ verbose && console . log ( _ + ` Deploy cloversController at ${ cloversController . address } - ` + tx . gasUsed )
153
158
verbose && gasToCash ( tx . gasUsed )
154
159
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
155
160
} else {
156
161
cloversController = await CloversController . at ( cloversControllerAdress )
162
+ verbose && console . log ( _ + `Already deployed CloversController at ${ cloversControllerAdress } ` )
157
163
}
158
164
159
165
// Deploy SimpleCloversMarket.sol
@@ -170,11 +176,12 @@ async function deployAllContracts({overwrites, accounts, artifacts, web3, chainI
170
176
cloversController . address ,
171
177
)
172
178
tx = await web3 . eth . getTransactionReceipt ( simpleCloversMarket . transactionHash )
173
- verbose && console . log ( _ + ' Deploy simpleCloversMarket - ' + tx . gasUsed )
179
+ verbose && console . log ( _ + ` Deploy simpleCloversMarket at ${ simpleCloversMarket . address } - ` + tx . gasUsed )
174
180
verbose && gasToCash ( tx . gasUsed )
175
181
totalGas = totalGas . add ( utils . toBN ( tx . gasUsed ) )
176
182
} else {
177
183
simpleCloversMarket = await SimpleCloversMarket . at ( simpleCloversMarketAddress )
184
+ verbose && console . log ( _ + `Already deployed SimpleCloversMarket at ${ simpleCloversMarketAddress } ` )
178
185
}
179
186
180
187
return {
0 commit comments