Skip to content

Commit 900abd3

Browse files
committed
Add price factor to TGEDeployer script
1 parent c2f54fe commit 900abd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/deploy/TGEDeployer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ contract('TGE Deployer', function ([deployAddress, foundationWallet, foundersWal
2626
var totalSupply = new BigNumber(0);
2727
var ETHRaised = new BigNumber(0);
2828
const USDperETH = 1150;
29+
30+
// Use this rate factor to matxh the starting USD raised to 1.5M USD
31+
const RATE_FACTOR = 4.05;
2932
const weiPerUSDinTGE = web3.toWei(1 / USDperETH);
3033

3134
// Override foundation and founders wallet
@@ -60,10 +63,11 @@ contract('TGE Deployer', function ([deployAddress, foundationWallet, foundersWal
6063
// Check right amount of contributos and values
6164
assert.equal(stage.contributors.length, stage.values.length);
6265
var stageETH = new BigNumber(0);
66+
stage.rate = new BigNumber(stage.rate).mul(RATE_FACTOR);
6367

6468
// Parse ETH to wei
6569
stage.values.map(function (value, i) {
66-
stage.values[i] = new BigNumber(stage.values[i]);
70+
stage.values[i] = new BigNumber(stage.values[i]).div(RATE_FACTOR);
6771
ETHRaised = ETHRaised.add(stage.values[i]);
6872
stageETH = stageETH.add(stage.values[i]);
6973
stage.values[i] = web3.toWei(stage.values[i]);

0 commit comments

Comments
 (0)