Error in test: Number can only safely store up to 53 bits

Hi @crypto_economics,

Looking at your test you are trying to convert a BigNumber object to a JavaScript number which is too large for a JavaScript number hence why you get the error Number can only safely store up to 53 bits.

OpenZeppelin Test Helpers include bn.js that we can use in our tests.

I have created an example: Simple ERC20 token example which includes a check on the totalSupply (which is uint256 in Solidity).

1 Like