tokamak-network / tokyo

tokyo monorepo
Apache License 2.0
4 stars 5 forks source link

update claimTokens test #14

Closed shingonu closed 6 years ago

shingonu commented 6 years ago

I use MintableToken for ERC20Basic.

testing list

ggs134 commented 6 years ago

Test Log

Contract: AuditFullFeaturesCrowdsale

  kyc: 0x91f96aef517c14359ac0bdea9a070149ed920acc
  vault: 0x2a67d325efbccd6df334a99a7c6ac07a121c37fc
  locker: 0x6cf86cc4f4f79179c39da3a7e8935275e4e2f3f3
  token: 0x2862b2a47bcfd6210c723951fee27bbc26184ba6
  crowdsale: 0x39a9529fd5f0dc13e8dcb5cbe812a2c341ed60cd
  erc20Token: 0xc8237e805b2441e1fbd939efef6789b2d574abd9

✓ setup contracts (227ms)
✓ check parameters (85ms)
Before start time
  ✓ reject buying tokens (146ms)
After start time (stage 0 started)
  ✓ check conditions
  ✓ increase time to 1527033600 (106ms)
  ✓ reject buying tokens under min purchase (113ms)
  ✓ reject buying tokens under stage min purchase (116ms)
  ✓ accept buying tokens over stage max purchase (508ms)
  ✓ reject buying tokens for unknown account (131ms)
  ✓ accept buying tokens for valid account and ether amount (414ms)
  ✓ reject buying tokens within a few blocks (120ms)
  ✓ accept buying tokens over stage max cap (390ms)
After stage 0 finished (stage 1 not started yet)
  ✓ increase time to 1527163200 (113ms)
  ✓ reject buying tokens when stage is not on sale (820ms)
After stage 1 started (with time bonus 1)
  ✓ increase time to 1527206400 (102ms)
  ✓ reject buying tokens under min purchase (101ms)
  ✓ reject buying tokens for unknown account (116ms)
  ✓ reject buying tokens under stage min purchase (100ms)
  ✓ accept buying tokens for valid account and ether amount (468ms)
  ✓ reject buying tokens within a few blocks (99ms)
  ✓ accept buying tokens over personal max purchase limit (440ms)
After time bonus 1 finished (stage 1 not finished)
  ✓ increase time to 1527292800 (103ms)
  ✓ reject buying tokens under min purchase (165ms)
  ✓ reject buying tokens for unknown account (121ms)
  ✓ accept buying tokens for valid account and ether amount (439ms)
  ✓ reject buying tokens within a few blocks (101ms)
  ✓ accept buying tokens over personal max purchase limit (483ms)
mistakenly send ERC20 tokens
  ✓ should erc20 minted (140ms)
  ✓ should erc20 sent to crowdsale address (93ms)
  ✓ should not claimed before crowdsale finish
After stage 1 finished
  ✓ increase time to 1527379210 (106ms)
  ✓ should finalize crowdsale and distribute token correctly (162ms)
claim ERC20 Tokens
  ✓ should claimed (79ms)

33 passing (7s)

4000D commented 6 years ago

Also you have to fix tokyo-solidity-template/static/test/FullFeatures.js and run bash init.sh from audit/full-features/ directory. Should not fix audit/full-features/test/Full-Features.js directly.