Consensys/Tokens

Tests not passing

pdxwebdev opened this issue · 1 comments

I'm trying to learn how to create an alt-coin with your repo but the tests don't pass. Can you please help me out. Perhaps I'm doing something incorrectly.

Using network 'development'.

Compiling ./contracts/HumanStandardToken.sol...
Compiling ./contracts/HumanStandardTokenFactory.sol...
Compiling ./contracts/StandardToken.sol...
Compiling ./contracts/Token.sol...
Compiling ./contracts/TokenTester.sol...


  Contract: HumanStandardToken
    ✓ creation: should create an initial balance of 10000 for the creator
    ✓ creation: test correct setting of vanity information (110135ms)
    ✓ creation: should succeed in creating over 2^256 - 1 (max) tokens (19030ms)
    ✓ transfers: ether transfer should be reversed. (41641ms)
    1) transfers: should transfer 10000 to accounts[1] with accounts[0] having 10000

    Events emitted during test:
    ---------------------------

    Transfer(_from: <indexed>, _to: <indexed>, _value: 1999445)

    ---------------------------
    2) transfers: should fail when trying to transfer 10001 to accounts[1] with accounts[0] having 10000

    Events emitted during test:
    ---------------------------


    ---------------------------
    3) transfers: should handle zero-transfers normally
    > No events were emitted
    4) approvals: msg.sender should approve 100 to accounts[1]

    Events emitted during test:
    ---------------------------


    ---------------------------
    ✓ approvals: msg.sender should approve 100 to SampleRecipient and then NOTIFY SampleRecipient. It should succeed. (87628ms)
    ✓ approvals: msg.sender should approve 100 to SampleRecipient and then NOTIFY SampleRecipient and throw. (76595ms)
    5) approvals: msg.sender approves accounts[1] of 100 & withdraws 20 once.

    Events emitted during test:
    ---------------------------


    ---------------------------
    6) approvals: msg.sender approves accounts[1] of 100 & withdraws 20 twice.
    > No events were emitted
    7) approvals: msg.sender approves accounts[1] of 100 & withdraws 50 & 60 (2nd tx should fail)

    Events emitted during test:
    ---------------------------


    ---------------------------
    8) approvals: attempt withdrawal from acconut with no allowance (should fail)

    Events emitted during test:
    ---------------------------


    ---------------------------
    9) approvals: allow accounts[1] 100 to withdraw from accounts[0]. Withdraw 60 and then approve 0 & attempt transfer.

    Events emitted during test:
    ---------------------------


    ---------------------------
    10) approvals: approve max (2^256 - 1)
    > No events were emitted
    11) events: should fire Transfer event properly

    Events emitted during test:
    ---------------------------


    ---------------------------
    12) events: should fire Transfer event normally on a zero transfer
    > No events were emitted
    13) events: should fire Approval event properly
    > No events were emitted

  Contract: HumanStandardTokenFactory
    ✓ Verify a Human Standard Token once deployed using both verification functions. (75175ms)


  7 passing (17m)
  13 failing

  1) Contract: HumanStandardToken transfers: should transfer 10000 to accounts[1] with accounts[0] having 10000:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.then.catch (test/humanStandardToken.js:74:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  2) Contract: HumanStandardToken transfers: should fail when trying to transfer 10001 to accounts[1] with accounts[0] having 10000:
     AssertionError: the EVM did not throw an error or did not throw the expected error
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:85:7)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  3) Contract: HumanStandardToken transfers: should handle zero-transfers normally:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:97:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  4) Contract: HumanStandardToken approvals: msg.sender should approve 100 to accounts[1]:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.then.catch (test/humanStandardToken.js:115:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  5) Contract: HumanStandardToken approvals: msg.sender approves accounts[1] of 100 & withdraws 20 once.:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.then.then.then.then.then.then.then.then.catch (test/humanStandardToken.js:181:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  6) Contract: HumanStandardToken approvals: msg.sender approves accounts[1] of 100 & withdraws 20 twice.:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.then.then.then.then.then.then.then.then.then.catch (test/humanStandardToken.js:218:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  7) Contract: HumanStandardToken approvals: msg.sender approves accounts[1] of 100 & withdraws 50 & 60 (2nd tx should fail):
     AssertionError: the EVM did not throw an error or did not throw the expected error
      at HumanStandardToken.new.then.then.then.then.then.then.then.then.catch (test/humanStandardToken.js:248:7)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  8) Contract: HumanStandardToken approvals: attempt withdrawal from acconut with no allowance (should fail):
     AssertionError: the EVM did not throw an error or did not throw the expected error
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:261:7)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  9) Contract: HumanStandardToken approvals: allow accounts[1] 100 to withdraw from accounts[0]. Withdraw 60 and then approve 0 & attempt transfer.:
     AssertionError: the EVM did not throw an error or did not throw the expected error
      at HumanStandardToken.new.then.then.then.then.then.catch (test/humanStandardToken.js:280:7)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  10) Contract: HumanStandardToken approvals: approve max (2^256 - 1):
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.then.catch (test/humanStandardToken.js:295:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  11) Contract: HumanStandardToken events: should fire Transfer event properly:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:311:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  12) Contract: HumanStandardToken events: should fire Transfer event normally on a zero transfer:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:327:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

  13) Contract: HumanStandardToken events: should fire Approval event properly:
     Error: Error: Invalid number of arguments to Solidity function
      at HumanStandardToken.new.then.then.catch (test/humanStandardToken.js:343:31)
      at process._tickCallback (internal/process/next_tick.js:103:7)

Nevermind, I didn't have 2 accounts setup.