5

I have tried a lot of research. I still somehow can't find and understand why this error occurs when im in private network. But if in 127.0.0.1:7545 which ganache, everything seems to be working, all passed.


Reference: https://github.com/dappuniversity/token_sale/blob/master/contracts/DappToken.sol

Whenever I run truffle test --network kennetwork

enter image description here

I have this error
enter image description here

this is my code DappToken.sol: enter image description here

3

This is because ganache has implemented a workaround to forward the reason of a failed require but other clients will fail with a regular exception.

This is good for ganache because truffle is able to show the exact cause of an require failure. But the feature is not portable because other clients didn't implement a similar feature.

|improve this answer|||||
  • how to implement the ganache feature to other clients like geth local/private network? – ichimaru Oct 23 '18 at 8:16
  • Sorry, but I don't know enough of geth to say what is needed. Likely you will need to define an EIP to add more information to public apis. – Ismael Oct 23 '18 at 15:54
  • I did some research Ismael. You were right. The feature you are talking about is the sync and async. Ganache is async and geth is not thats why. So thanks! – ichimaru Oct 24 '18 at 8:38

Not the answer you're looking for?Browse other questions tagged or ask your own question.