Crypto-Car-Battle
Crypto-Car-Battle copied to clipboard
Doesnt work
Can somebody tell me how to make this game works ? Cause at the moment, im hosting it with XXAMP, but it doesnt work at all. Like, i wanna use it, people should buy the cars, but when i connect the wallet, it says something about testnet. If somebody can help me to manage this game, im able to pay a amount, idk. Thanks in advance
Hello @Dreadox First of all you should compile and deploy the CarBattle.sol (That is deprecated and we should update it ) in a testnet or on ganache, using remix ide. To solve CarBattle.sol you should update import from ERC721 from a dif blob of OpenZeppelin because they updated it, you also have to select compiler 0.6.2 on remix idle as mentioned on #1.
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/56de324afea13c4649b00ca8c3a3e3535d532bd4/contracts/token/ERC721/ERC721.sol";
After deploying you should copy contract address and update first line of the file web3setup.js that is inside of assets/js.
at the same file we should update the line 611 that contains if(r != "rinkeby") changing the name to the network in use, or you can just comment //alert("Connect Metamask to Rinkeby Testnet!")
on 612
After that you can host it on IPFS https://ipfs.io or use python if u want.
you have to install python, open cmd on project folder then:
python -m http.server
Hope this can help you, any question let me know.