This project will contain the implementation of the Rawrshak Smart Contracts
Rawrshak Token are the platform currency that will be used for Governance and transactions.
Install [Node JS and NPM](https://nodejs.org/en/)
To update, run:
npm install npm@latest -g
Install:
npm install --global yarn
Get all packages:
yarn install
[Hardhat](https://hardhat.org/getting-started/)
[Waffle](https://ethereum-waffle.readthedocs.io/en/latest/getting-started.html)
[Ethers.js](https://docs.ethers.io/v5/getting-started/)
We're using Hardhat as the development framework for ethereum
Install:
npm install --save-dev hardhat
npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers
OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts)
Helpful standard solidity library
Install:
npm install @openzeppelin/contracts-upgradeable
npm install @openzeppelin/test-helpers
This is lightweight IDE that I use.
Install: https://code.visualstudio.com/
Install the following extensions on Visual Studio Code
Solidity - by juanblanco.solidity
Used for solidity code as well as generating the C# code for Unity
React Native Tools - by msjsdiag.vscode-react-native
Used for the React Native Front-end Dapp
C# - ms-dotnettools.csharp
For Unity Development
C/C++ - ms-vscode.cpptools
For Unreal Engine Development
Download and Install from: https://store.unity.com/download
Install: https://www.docker.com/products/docker-desktop
Used for the local Graph Node deployment
This is used for indexing the ethereum database. Locally, we use it against a ganache instance.
More Info: https://thegraph.com/docs/quick-start#local-development
Install:
npm install -g @graphprotocol/graph-cli
or
yarn global add @graphprotocol/graph-cli
Currently used to store asset data information in a decentralized manner.
Install: https://github.com/ipfs-shipyard/ipfs-desktop
Just running the IPFS desktop set up is good enough.
Used to host the Asset Info data that the NFT smart contract is pointing to
Instructions and quick tutorial: https://www.npmjs.com/package/json-server
Install:
npm install -g json-server
Displays the contract size for all or a selection of your smart contracts in kilobytes. The limit for a smart
contract is roughly 24.5 kb, so this is a good tool to use to figure out if we need to cut down on the smart
contract size.
Install: npm install truffle-contract-size
1. Clone the repo
2. Download and install Node JS, NPM, yarn, Truffle, Ganache, OpenZeppelin, and Visual Studio Code
3. Install Solidity extension in Visual Studio Code
Everything should be configured properly. If you have any issues, contact [Christian]([email protected])
npx hardhat compile
- compiles the smart contracts
npx hardhat node
- starts a local node
npx hardhat test
- runs all tests in the test folder
npx hardhat test <specific test>
- runs a specific test inside the test folder
npx hardhat node
npx hardhat run --network localhost scripts/deploy.js
npx hardhat run --network <target network> scripts/deploy.js
1. Open a new powershell/command prompt
2. run:
ganache-cli -h 0.0.0.0 -m "violin couple forest beyond despair spray wide badge buddy thunder menu same"
The seed phrase above is a test seed phrase that I use to make the first deployed contract addresses match
the addresses in the graph node. Addresses need to be updated if you decide to use a different set of seed
words.
1. refer to the [Rawrshak Graph Node project](https://github.com/gcbsumid/rawrshak-graphnode) for instructions