No description available.
Last updated Apr 4, 2026
13
Stars
6
Forks
0
Issues
0
Stars/day
Attention Score
6
Language breakdown
JavaScript 54.9%
Solidity 43.9%
Makefile 1.2%
▸ Files
click to expand
README
SakuraCasino Roulette

Usage
To install this package, just runnpm install @sakuracasino/roulette-contract --save
Then you can request the abi or address
const {abi, networks} = require('@sakuracasino/roulette-contract');
console.log(abi); // returns the ABI for the Roulette contract console.log(networks[0].contract_address); // returns the contract address in the kovan network
Development
Checklist
- [x] Implement contract pooling
- [x] Implement color betting with blockhash-based random
- [x] Implement tests for liquidity and bets
- [x] Deploy v0.1 in eth testnet
- [x] Implement all bets
- [x] Implement UI for bets
- [x] Implement Chainlink VRF
- [x] Update UI to wait for VRF callback
- [x] Implement bet fee
- [x] Implement correct DAI permit interface
- [x] Implement bet limit
- [x] Allow for non-EIP-2612 tokens
- [ ] Improve contact storage management, delete unused data. Use mainly events.
- [ ] Revision liquidity and max bet limits security
- [ ] Implement Chainlink VRF + bet queue
- [ ] Migrate dev environment to Hardhat
- [ ] Deploy v1.0b into Matic testnet
- [ ] Investigate implementations with ETH 2.0 Bacon chain VDF and Polkadot BABE VRF
- [ ] Deploy v1.0stable into Matic or BSC mainnet
Running the project
- Run
make installfor installing node dependencies - Run
make runfor running the ganache server - Run
make testfor checking everything is ok
- Run
make migratefor deploying the contracts in the local ganache testnet. It will return the env variables for the frontend ui. You've to paste them there if you also want to run the UI. - Run
make vrfsigner. It starts a mock of a VRFCoodrinator operator oracle. If you don't run this, bet requests will always de pending.
make test while vrfsigneris running.
Additional commands:
make compile compiles the contracts make migrate migrates the contracts into the ganache blockchain make console lauch a truffle console in the gananche node make test run tests Publish a new package version
The npm package associated with this repository just exposes information. It contains:- Roulette contract abi
- Information about the contract in different networks such as addresses.
networks.js with the associated information, if the network doesn't exist yet, just add a new entry in networks.
To deploy a new package version:
- Update
networks.jsas mentioned above. - Make sure to update both
package.jsonandpackage-lock.jsonversions to the desired version to publish. - Run
make publishand it will try to publish innpmjs.organd success if you have permission.
How to Deploy the contract with Remix
- Run
make flattenand it will return a flatten_Roulette.solcontract. - Copy
_Roulette.solinto your Remix environment and deploy the contract where you want.
How to Deploy the contract (DEPRECATED)
- Make sure you have defined the network description under
networks.js.contract_addresscan be empty. - Make sure you have correct API and MNEMONIC in the
.envfile - Define
NETWORKvariable as the network name and then callmake deploy-live. For example, to deploy tokovanyou canNETWORK=kovan make deploy-live. - Optionally, there's some predefined commands like
make deploy-kovanfor common networks. - Once deployed, please update the contract address under
networks.js - You can call
make flattento have a flatten_Roulette.solcontract for verifying it on etherscan.
🔗 More in this category