Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 1.37 KB

File metadata and controls

59 lines (39 loc) · 1.37 KB

Rock Paper Scissors on Ethereum Compatible BlockChain!

Smart contracts for rock paper scissors on-chain game! Based on the coin tossing protocol to secure rounds.

License: GPL v3

Note: Deprecated, this repository use an old version of solidity, feel free to update this codebase

Install

git clone https://github.com/YoanSallami/rock-paper-scissors-smart-contracts.git
cd rock-paper-scissors-smart-contracts
yarn

Run the tests

Run the tests with:

yarn test

Run on local Ethereum node

Run the hardhat local Ethereum node with:

yarn serve

In another shell:

yarn deploy

Connect to the local network with MetaMask

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:

  1. Go to Import account
  2. Choose Private key
  3. Paste the private key generated by the local node

Resources