Skip to content

Commit

Permalink
Merge pull request #10 from OpenSTFoundation/UpdateAllocationConstants
Browse files Browse the repository at this point in the history
Update final token allocation numbers in code and tests.
  • Loading branch information
jasonklein committed Nov 2, 2017
2 parents 6bd5a13 + 4379d8c commit c640e98
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions contracts/TokenSale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ contract TokenSale is OpsManaged, Pausable, TokenSaleConfig { // Pausable is als
require(PHASE1_ACCOUNT_TOKENS_MAX > 0);

// Basic check that the constants add up to TOKENS_MAX
uint256 partialAllocations = TOKENS_FOUNDERS.add(TOKENS_ADVISORS).add(TOKENS_EARLY_INVESTORS);
require(partialAllocations.add(TOKENS_SALE).add(TOKENS_ACCELERATOR_MAX).add(TOKENS_FUTURE) == TOKENS_MAX);
uint256 partialAllocations = TOKENS_FOUNDERS.add(TOKENS_ADVISORS).add(TOKENS_EARLY_BACKERS);
require(partialAllocations.add(TOKENS_SALE).add(TOKENS_ACCELERATOR).add(TOKENS_FUTURE) == TOKENS_MAX);

wallet = _wallet;
pausedTime = 0;
Expand Down
6 changes: 3 additions & 3 deletions contracts/TokenSaleConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ contract TokenSaleConfig is SimpleTokenConfig {
uint256 public constant TOKENS_SALE = 240000000 * DECIMALSFACTOR;
uint256 public constant TOKENS_FOUNDERS = 80000000 * DECIMALSFACTOR;
uint256 public constant TOKENS_ADVISORS = 80000000 * DECIMALSFACTOR;
uint256 public constant TOKENS_EARLY_INVESTORS = 22441966 * DECIMALSFACTOR;
uint256 public constant TOKENS_ACCELERATOR_MAX = 257558034 * DECIMALSFACTOR;
uint256 public constant TOKENS_FUTURE = 120000000 * DECIMALSFACTOR;
uint256 public constant TOKENS_EARLY_BACKERS = 44884831 * DECIMALSFACTOR;
uint256 public constant TOKENS_ACCELERATOR = 217600000 * DECIMALSFACTOR;
uint256 public constant TOKENS_FUTURE = 137515169 * DECIMALSFACTOR;

// We use a default for when the contract is deployed but this can be changed afterwards
// by calling the setTokensPerKEther function
Expand Down
6 changes: 3 additions & 3 deletions test/end-to-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ contract('All Contracts', function(accounts) {
const TOKENS_SALE = new BigNumber('240000000').mul(DECIMALSFACTOR)
const TOKENS_FOUNDERS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_ADVISORS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_INVESTORS = new BigNumber('22441966').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR_MAX = new BigNumber('257558034').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('120000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_BACKERS = new BigNumber('44884831').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR = new BigNumber('217600000').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('137515169').mul(DECIMALSFACTOR)

const TOKENS_PER_KETHER = new BigNumber('3600000')

Expand Down
18 changes: 9 additions & 9 deletions test/tokensale_basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var TokenSale = artifacts.require("./TokenSale.sol")
// TOKENS_SALE
// TOKENS_FOUNDERS
// TOKENS_ADVISORS
// TOKENS_EARLY_INVESTORS
// TOKENS_ACCELERATOR_MAX
// TOKENS_EARLY_BACKERS
// TOKENS_ACCELERATOR
// TOKENS_FUTURE
// TOKENS_PER_KETHER
// finalized
Expand Down Expand Up @@ -62,9 +62,9 @@ contract('TokenSale', function(accounts) {
const TOKENS_SALE = new BigNumber('240000000').mul(DECIMALSFACTOR)
const TOKENS_FOUNDERS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_ADVISORS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_INVESTORS = new BigNumber('22441966').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR_MAX = new BigNumber('257558034').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('120000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_BACKERS = new BigNumber('44884831').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR = new BigNumber('217600000').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('137515169').mul(DECIMALSFACTOR)

const TOKENS_PER_KETHER = new BigNumber('3600000')

Expand Down Expand Up @@ -135,12 +135,12 @@ contract('TokenSale', function(accounts) {
assert.equal((await sale.TOKENS_ADVISORS.call()).toNumber(), TOKENS_ADVISORS.toNumber())
})

it("TOKENS_EARLY_INVESTORS", async () => {
assert.equal((await sale.TOKENS_EARLY_INVESTORS.call()).toNumber(), TOKENS_EARLY_INVESTORS.toNumber())
it("TOKENS_EARLY_BACKERS", async () => {
assert.equal((await sale.TOKENS_EARLY_BACKERS.call()).toNumber(), TOKENS_EARLY_BACKERS.toNumber())
})

it("TOKENS_ACCELERATOR_MAX", async () => {
assert.equal((await sale.TOKENS_ACCELERATOR_MAX.call()).toNumber(), TOKENS_ACCELERATOR_MAX.toNumber())
it("TOKENS_ACCELERATOR", async () => {
assert.equal((await sale.TOKENS_ACCELERATOR.call()).toNumber(), TOKENS_ACCELERATOR.toNumber())
})

it("TOKENS_FUTURE", async () => {
Expand Down
6 changes: 3 additions & 3 deletions test/tokensale_buytokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ contract('TokenSale', function(accounts) {
const TOKENS_SALE = new BigNumber('240000000').mul(DECIMALSFACTOR)
const TOKENS_FOUNDERS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_ADVISORS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_INVESTORS = new BigNumber('22441966').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR_MAX = new BigNumber('257558034').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('120000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_BACKERS = new BigNumber('44884831').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR = new BigNumber('217600000').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('137515169').mul(DECIMALSFACTOR)

const TOKENS_PER_KETHER = new BigNumber('3600000')

Expand Down
6 changes: 3 additions & 3 deletions test/tokensale_other.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ contract('TokenSale', function(accounts) {
const TOKENS_SALE = new BigNumber('240000000').mul(DECIMALSFACTOR)
const TOKENS_FOUNDERS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_ADVISORS = new BigNumber('80000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_INVESTORS = new BigNumber('22441966').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR_MAX = new BigNumber('257558034').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('120000000').mul(DECIMALSFACTOR)
const TOKENS_EARLY_BACKERS = new BigNumber('44884831').mul(DECIMALSFACTOR)
const TOKENS_ACCELERATOR = new BigNumber('217600000').mul(DECIMALSFACTOR)
const TOKENS_FUTURE = new BigNumber('137515169').mul(DECIMALSFACTOR)

const TOKENS_PER_KETHER = new BigNumber('3600000')

Expand Down

0 comments on commit c640e98

Please sign in to comment.