poanetwork / token-wizard

(Discontinued) TokenWizard is an DApp to create and manage crowdsale and token contracts using a simple UI
MIT License
384 stars 215 forks source link

(Bug)Minted with whitelist: incorrect initialization of min/max #917

Closed dennis00010011b closed 6 years ago

dennis00010011b commented 6 years ago

Test URL : localhost with latest commit of branch 2.0 : https://github.com/poanetwork/token-wizard/commit/962130704e30e1a8b49bd97bc385f8f231b5639f

Steps:

  1. Create MintedCapped crowdsale , see parameters below.
  2. Open https://ropsten.etherscan.io/address/0x4feec2b6944e510eef031d96330cb70f9051c440#readContract . and execute getWhitelistStatus for whitelisted address

Expected result:

Actual result:

  1. As a whitelisted investor buy minCap
  2. As a whitelisted investor buy maxCap Result: disabled to buy maxCap, warning is dispaled that hardCap already reched But whitelisted investor able to buy maxCap in first transaction

Exec ID: 0xbee52e230da6d4654e0312ef85079076faf999490e95cf75d7009f6ae6d8dd29 Ropsten

Crowdsale parameters:

{
  "name": "scenarioE2eMintedWhitelist",
  "ticker": "test",
  "decimals": 18,
  "reservedTokens":[
    {
      "address" :"0xecDFec71AbCD5a612eAf9169B19E907eAA2717d9",
      "dimension": "percentage",
      "value": 250
    },
    {
      "address" :  "0x56B2e3C3cFf7f3921Dc2e0F8B8e20d1eEc29216b",
      "dimension": "tokens",
      "value":100000000
    }
  ],
  "walletAddress":"0x56B2e3C3cFf7f3921Dc2e0F8B8e20d1eEc29216b",
  "gasprice": 1,
  "mincap": 1,
  "tiers":[
    {
      "name":"###1",
      "allowModify": true,
      "isWhitelisted":true,
      "startDate": "360000",
      "startTime": "360000",
      "endDate":"23/02/2050",
      "endTime":"12:34",
      "rate":20000,
      "supply": 250,
      "whitelist":[
        {
          "address": "0xF16AB2EA0a7F7B28C267cbA3Ed211Ea5c6e27411",
          "min": 50,
          "max": 150
        },
        {
          "address": "0x9E963042D581D262AdE4E31541360e7FDAeE70C6",
          "min": 50,
          "max": 150
        }
      ]
    },
    {
      "name":"###2",
      "allowModify": true,
      "isWhitelisted":true,
      "startDate": "",
      "startTime": "",
      "endDate":"",
      "endTime":"",
      "rate":10000,
      "supply": 200,
      "whitelist":[
        {
          "address": "0xdDdC96314b7f16cB243Cb07e1dE081CA367095E7",
          "min": 25,
          "max": 250
        }]}]}

If you are reporting a problem with Token Wizard, please include the following information:

Which network did you use? (Mainnet, Kovan, Rinkeby, etc.)

Ropsten

If you were able to create it, what is the URL of your crowdsale?

http://localhost:3000/invest?exec-id=0xbee52e230da6d4654e0312ef85079076faf999490e95cf75d7009f6ae6d8dd29&networkID=3

Do you have screenshots showing the problem?

screen shot 2018-05-25 at 14 46 18 screen shot 2018-05-25 at 14 50 03

Do you see errors in the dev console? If yes, please include a screenshot

No


vbaranov commented 6 years ago

@dennis00010011b minimum_contribution is in tokens (decimals are accounted) but max_spend_remaining is in wei in Auth_os

dennis00010011b commented 6 years ago

Works as expected