Aion Animal Roulette
Install Node.js & NPM if you haven't already NPM comes pre-packaged with Node, so you only have to follow the one link.
Once you've got NPM on your computer, install Webpack, Webpack CLI, and http-server:
npm i -g webpack webpack-cli http-server
Grab your Nodesmith URL. If you don't have Nodesmith setup, follow our setup guide.
Your URL should look something like this:
https://api.nodesmith.io/v1/aion/testnet/jsonrpc?apiKey=abcdef123456abcdf123456abcdef123456. Make sure you select Testnet (Mastery) from the dropdown menu, otherwise you'll be building your dApp on the Mainnet network.
Finally, get the latest version of the AIWA Chrome extension install. You can also install AIWA on the Brave browser. If you don't have AIWA setup, follow our setup guide.
Clone this repository:
git clone https://github.com/aion-kimcodeashian/aion-roulette.git
src/js/index.jsand edit line 48 with your Nodesmith URL. It should look something like this:
47 // Fallback Nodesmith Connection 48 web3 = new Web3(new Web3.providers.HttpProvider("https://api.nodesmith.io/v1/aion/testnet/jsonrpc?apiKey=abcdef123456abcdf123456abcdef123456")); 49 50 // Contract Instance
Install all the NPM dependencies:
Start the local HTTP Server:
Go to http://localhost:8080/
Rebuilding after Making Changes
When you make any changes to the code you'll have to rebuild the project:
npm run-script build
Then just refresh your browser to see your changes!