1

I have followed the tutorials of Dapp University. Using Ganache and Metamask 127.0.0.1:7545 and did a truffle test or migrate it works perfectly.

Result: enter image description here


Then, I change my network this is my truffle.js: enter image description here

Then, I have geth setup with new genesis.json: enter image description here

I created 2 accounts. Then started mining. account[0] now has 3000 ethereum, I added in metamask, its shows the same number. Then I added account1 in metamask with 0 ethereum, works great.

Then I run truffle migrate --reset --network kennetwork: enter image description here

This is my DappToken.sol: enter image description here

Then this is my DappToken.js the error is happening at line 97: enter image description here

1 Answer 1

0

I'm not sure I get the issue. This seems to work as intended.

If you increase the approved amount (DappToken.js, line: 88) from 10 to >= 30, that assertion shouldn't fail anymore.

3
  • 1
    omg you did it.. it works! how did you know? have you been studying solidity? i think im gonna really spend full time on understanding solidity but for the mean time ill have to make this token work. thanks a bunch!
    – KD.S.T.
    Oct 17, 2018 at 15:41
  • I haven't played with solidity as much as I'd like to, but yes, I studied it a bit. In this case, even the comments suggest what should happen. I remember the concept of approve/transferFrom was confusing for me too when I learned about it. I'm glad it solved your issue. Oct 17, 2018 at 15:50
  • I have a follow up question ethereum.stackexchange.com/questions/60751/…
    – KD.S.T.
    Oct 17, 2018 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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