Smart contracts for rock paper scissors on-chain game! Based on the coin tossing protocol to secure rounds.
Note: Deprecated, this repository use an old version of solidity, feel free to update this codebase
git clone https://github.com/YoanSallami/rock-paper-scissors-smart-contracts.git
cd rock-paper-scissors-smart-contracts
yarn
Run the tests with:
yarn test
Run the hardhat local Ethereum node with:
yarn serve
In another shell:
yarn deploy
First, click on Add Network
then, create a custom network with the following parameters:
- Network Name:
Hardhat
- New RPC URL:
http://127.0.0.1:8545
- Chain ID:
31337
- Currency Symbol:
BNB
To import a test account in metamask:
- Go to
Import account
- Choose
Private key
- Paste the private key generated by the local node