Closed binocarlos closed 6 years ago
I managed to interact with the deployed contract by:
Can push to a new branch for people to play around with it?
Also you can continue to interact with the contract from the truffle develop console:
Just call functions that are publicly available:
lot.hasEnded()
lot.goal()
lot.rate()
Although haven't looked deeply into how to buy the token from the truffle develop console
Nice! I also managed to buy LTK
lottery tokens in exchange for ether and see how much I had accumulated so far:
lot = Lottery.deployed()
lot.then(function(instance){return instance.send(10);})
lot.then(instance=>instance.weiRaised())
Check your LTK balance:
ltk = lot.token().then(address=>LotteryToken.at(address))
ltk.then(instance=>instance.balanceOf(web3.eth.coinbase))
I have updated the README.md accordingly. Next stop, generate random numbers! I will close this issue as it is no longer relevant :) Thanks guys!
From the Readme:
In the truffle(develop)> console:
Now you can interact with the lottery contract, you can create a pointer to it as follows:
However, I have not figure out how to interact with it beyond this yet so if anyone can figure it out, please share your wisdom.