Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Guidance needed: BancorFormula requirement & initial token minting #61

Open
BenSchZA opened this issue Dec 13, 2019 · 0 comments
Open

Comments

@BenSchZA
Copy link

Hi team :) I need some guidance with the tests.

In the calculatePurchaseReturn method of the BancorFormula contract there is the following requirement set:

require(_supply > 0 && _connectorBalance > 0 && _connectorWeight > 0 && _connectorWeight <= MAX_WEIGHT);

In setting up the migrations for the project I'm working on, the total supply of the bonded token is initially zero, which causes the call to priceToBuy etc. to fail.

I know this isn't the case in the tests for BC-DAO, as they mostly pass, but I can't figure out exactly where the testing ecosystem setup mints the initial tokens for the bonded token to avoid the above issue. I see the following line for the payment token though, in the BondingCurve.behaviour.js file:

const paymentTokenInitialBalance = new BN(web3.utils.toWei('60000', 'ether'));

    await paymentToken.methods
      .mint(tokenMinter, paymentTokenInitialBalance.toString())
      .send({from: tokenMinter});

In production deployment, would one just mint a probably insignificant number of tokens to the creator or perform some sort of hatch phase, and if so would that need to be done manually by minting or are there plans to have a contract method for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant