@@ -67,22 +67,22 @@ module.exports = async function(deployer, network, accounts) {
67
67
// Math library
68
68
// ----------------
69
69
console . log ( gray ( 'Deploying Math library...' ) ) ;
70
- deployer . link ( SafeDecimalMath , MathLib ) ;
70
+ await deployer . link ( SafeDecimalMath , MathLib ) ;
71
71
await deploy ( MathLib , { from : deployerAccount } ) ;
72
72
73
73
// The PublicSafeDecimalMath contract is not used in a standalone way on mainnet, this is for testing
74
74
// ----------------
75
75
// Public Safe Decimal Math Library
76
76
// ----------------
77
- deployer . link ( SafeDecimalMath , PublicSafeDecimalMath ) ;
77
+ await deployer . link ( SafeDecimalMath , PublicSafeDecimalMath ) ;
78
78
await deploy ( PublicSafeDecimalMath , { from : deployerAccount } ) ;
79
79
80
80
// The PublicMath contract is not used in a standalone way on mainnet, this is for testing
81
81
// ----------------
82
82
// Public Math Library
83
83
// ----------------
84
- deployer . link ( SafeDecimalMath , PublicMath ) ;
85
- deployer . link ( MathLib , PublicMath ) ;
84
+ await deployer . link ( SafeDecimalMath , PublicMath ) ;
85
+ await deployer . link ( MathLib , PublicMath ) ;
86
86
await deploy ( PublicMath , { from : deployerAccount } ) ;
87
87
88
88
// ----------------
@@ -95,7 +95,7 @@ module.exports = async function(deployer, network, accounts) {
95
95
// Exchange Rates
96
96
// ----------------
97
97
console . log ( gray ( 'Deploying ExchangeRates...' ) ) ;
98
- deployer . link ( SafeDecimalMath , ExchangeRates ) ;
98
+ await deployer . link ( SafeDecimalMath , ExchangeRates ) ;
99
99
const exchangeRates = await deploy (
100
100
ExchangeRates ,
101
101
owner ,
@@ -123,7 +123,7 @@ module.exports = async function(deployer, network, accounts) {
123
123
// ----------------
124
124
console . log ( gray ( 'Deploying SynthetixState...' ) ) ;
125
125
// constructor(address _owner, address _associatedContract)
126
- deployer . link ( SafeDecimalMath , SynthetixState ) ;
126
+ await deployer . link ( SafeDecimalMath , SynthetixState ) ;
127
127
const synthetixState = await deploy ( SynthetixState , owner , ZERO_ADDRESS , {
128
128
from : deployerAccount ,
129
129
} ) ;
@@ -144,19 +144,19 @@ module.exports = async function(deployer, network, accounts) {
144
144
const feePoolProxy = await Proxy . new ( owner , { from : deployerAccount } ) ;
145
145
146
146
console . log ( gray ( 'Deploying FeePoolState...' ) ) ;
147
- deployer . link ( SafeDecimalMath , FeePoolState ) ;
147
+ await deployer . link ( SafeDecimalMath , FeePoolState ) ;
148
148
const feePoolState = await deploy ( FeePoolState , owner , ZERO_ADDRESS , {
149
149
from : deployerAccount ,
150
150
} ) ;
151
151
152
152
console . log ( gray ( 'Deploying FeePoolEternalStorage...' ) ) ;
153
- deployer . link ( SafeDecimalMath , FeePoolEternalStorage ) ;
153
+ await deployer . link ( SafeDecimalMath , FeePoolEternalStorage ) ;
154
154
const feePoolEternalStorage = await deploy ( FeePoolEternalStorage , owner , ZERO_ADDRESS , {
155
155
from : deployerAccount ,
156
156
} ) ;
157
157
158
158
console . log ( gray ( 'Deploying FeePool...' ) ) ;
159
- deployer . link ( SafeDecimalMath , FeePool ) ;
159
+ await deployer . link ( SafeDecimalMath , FeePool ) ;
160
160
const feePool = await deploy (
161
161
FeePool ,
162
162
feePoolProxy . address ,
@@ -198,8 +198,8 @@ module.exports = async function(deployer, network, accounts) {
198
198
// ----------------
199
199
console . log ( gray ( 'Deploying SupplySchedule...' ) ) ;
200
200
// constructor(address _owner)
201
- deployer . link ( SafeDecimalMath , SupplySchedule ) ;
202
- deployer . link ( MathLib , SupplySchedule ) ;
201
+ await deployer . link ( SafeDecimalMath , SupplySchedule ) ;
202
+ await deployer . link ( MathLib , SupplySchedule ) ;
203
203
204
204
const lastMintEvent = 0 ; // No mint event, weeksSinceIssuance will use inflation start date
205
205
const weeksOfRewardSupply = 0 ;
@@ -218,7 +218,8 @@ module.exports = async function(deployer, network, accounts) {
218
218
} ) ;
219
219
220
220
console . log ( gray ( 'Deploying Synthetix...' ) ) ;
221
- deployer . link ( SafeDecimalMath , Synthetix ) ;
221
+ await deployer . link ( SafeDecimalMath , Synthetix ) ;
222
+ const block = await web3 . eth . getBlock ( 'latest' ) ;
222
223
const synthetix = await deploy (
223
224
Synthetix ,
224
225
synthetixProxy . address ,
@@ -228,7 +229,7 @@ module.exports = async function(deployer, network, accounts) {
228
229
resolver . address ,
229
230
{
230
231
from : deployerAccount ,
231
- gas : 8000000 ,
232
+ gas : block . gasLimit ,
232
233
}
233
234
) ;
234
235
@@ -289,7 +290,7 @@ module.exports = async function(deployer, network, accounts) {
289
290
290
291
const synths = [ ] ;
291
292
292
- deployer . link ( SafeDecimalMath , PurgeableSynth ) ;
293
+ await deployer . link ( SafeDecimalMath , PurgeableSynth ) ;
293
294
294
295
for ( const currencyKey of currencyKeys ) {
295
296
console . log ( gray ( `Deploying SynthTokenState for ${ currencyKey } ...` ) ) ;
@@ -351,7 +352,7 @@ module.exports = async function(deployer, network, accounts) {
351
352
// Depot
352
353
// --------------------
353
354
console . log ( gray ( 'Deploying Depot...' ) ) ;
354
- deployer . link ( SafeDecimalMath , Depot ) ;
355
+ await deployer . link ( SafeDecimalMath , Depot ) ;
355
356
const depot = await deploy ( Depot , owner , fundsWallet , resolver . address , {
356
357
from : deployerAccount ,
357
358
} ) ;
@@ -363,7 +364,7 @@ module.exports = async function(deployer, network, accounts) {
363
364
// Needs the SynthsETH & SynthsUSD in the address resolver
364
365
const sETHSynth = synths . find ( synth => synth . currencyKey === 'sETH' ) ;
365
366
const sUSDSynth = synths . find ( synth => synth . currencyKey === 'sUSD' ) ;
366
- deployer . link ( SafeDecimalMath , EtherCollateral ) ;
367
+ await deployer . link ( SafeDecimalMath , EtherCollateral ) ;
367
368
const etherCollateral = await deploy ( EtherCollateral , owner , resolver . address , {
368
369
from : deployerAccount ,
369
370
} ) ;
@@ -386,7 +387,7 @@ module.exports = async function(deployer, network, accounts) {
386
387
// Exchanger
387
388
// ----------------
388
389
console . log ( gray ( 'Deploying Exchanger...' ) ) ;
389
- deployer . link ( SafeDecimalMath , Exchanger ) ;
390
+ await deployer . link ( SafeDecimalMath , Exchanger ) ;
390
391
const exchanger = await deploy ( Exchanger , owner , resolver . address , {
391
392
from : deployerAccount ,
392
393
} ) ;
@@ -395,7 +396,7 @@ module.exports = async function(deployer, network, accounts) {
395
396
// ExchangeState
396
397
// ----------------
397
398
console . log ( gray ( 'Deploying ExchangeState...' ) ) ;
398
- // deployer.link(SafeDecimalMath, ExchangeState);
399
+ // await deployer.link(SafeDecimalMath, ExchangeState);
399
400
const exchangeState = await deploy ( ExchangeState , owner , exchanger . address , {
400
401
from : deployerAccount ,
401
402
} ) ;
@@ -404,7 +405,7 @@ module.exports = async function(deployer, network, accounts) {
404
405
// Issuer
405
406
// ----------------
406
407
console . log ( gray ( 'Deploying Issuer...' ) ) ;
407
- deployer . link ( SafeDecimalMath , Issuer ) ;
408
+ await deployer . link ( SafeDecimalMath , Issuer ) ;
408
409
const issuer = await deploy ( Issuer , owner , resolver . address , { from : deployerAccount } ) ;
409
410
410
411
console . log ( gray ( 'Deploying IssuanceEternalStorage...' ) ) ;
0 commit comments