https://github.com/zmisgod/guess-number-contract
a small ethereum contract
https://github.com/zmisgod/guess-number-contract
dapp eth-contract ethereum game-contracts solidity solidity-contracts
Last synced: about 2 months ago
JSON representation
a small ethereum contract
- Host: GitHub
- URL: https://github.com/zmisgod/guess-number-contract
- Owner: zmisgod
- Created: 2021-07-09T12:02:50.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-15T15:14:23.000Z (over 3 years ago)
- Last Synced: 2025-01-14T08:52:17.063Z (over 1 year ago)
- Topics: dapp, eth-contract, ethereum, game-contracts, solidity, solidity-contracts
- Language: JavaScript
- Homepage:
- Size: 504 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lottery game contract
let we guess a number between 1 and 6
## environment
- node v14.0
- ganache
- `npm install -g truffle`
- `metamask` -- chrome extension
## run
add some contract code
- `npm install` will install dependencies from openzeppelin
- `truffle compile` will compile the contract
- `truffle migrate` will deploy the contract to the current network
- `truffle test` will test the contract test file
change web code
- `cd web && npm insatll && npm run dev`
## config
change `contractAddress(your contract address)` and `adminAddress(your wallet address)` in `web/lib/web3.js`