Closed officialfrancismendoza closed 5 years ago
Solution: Apparently the addresses are undefined in Windows.. switched to Ubuntu and somehow values got returned. Within Gregory's video lecture, at roughly 6:36:00 he types in commands to load tokens into the smart contract to have it execute.
I originally went off a fork that was using the newest version of Truffle and Solidity, but uninstalled them both and used the version Gregory used in his tutorial.
You cannot successfully execute a transaction if you do not load your smart contract first.
Hey everyone. I was testing my UI and I got an offshoot of the posted "VM exception while processing transaction revert" error, but detailing a purchase of more tokens than available
Refer to the four screenshots below. The first is the default loading page. I will initially purchase 1 DAPP token.
Upon stepping through the transaction, it then gets rejected due to overstepping a balance
As you can see from my DappToken.sol file, I have a circulating supply of 75000 tokens.. how could I possibly overstep the balance? I then reasoned its not the circulating supply- it's one of the functions. Is my reasoning on the right track?
From my DappTokenSale.sol file, I have isolated the function triggering this error message
When going into truffle console and investigating possible errors, I noticed the tokenSale address is undefined.. why? As per the second screenshot, I was able to link the Ganache test account to Metamask, which is automatically preloaded with 100 fake ETH.. how could I have an undefined address?
Forgive me, as I am a novice programmer and am still learning. Please point me in the right direction