The BinayOracle module for a Binary Game product divides the time into Rounds and each round has its own price. It allows Admins (who are able to change the Writers) and Writers ( who are able to write prices for each Round).
You can access this Module and the code here: https://bit.ly/40qBr1v
How to Use
- Deploy smart contract via
Bunzz
. When deploying, the deployer will become both the Admin and Writer. - Writers can call
writePrice
andwriteBatchPrices
functions to write Round prices. - Users can call
getRoundData
andgetLatestRoundData
function to query the price data.
Functions
#WRITE
- grantRole
- renounceRole
- revokeRole
- setWriter
- writeBatchPrices
- writePrice
#READ
- DEFAULT_ADMIN_ROLE
- WRITER_ROLE
- allRoundIds
- genesisStarted
- getLatestRoundData
- getRoleAdmin
- getRoundData
- hasRole
- isAdmin
- isWriter
- latestRoundData
- roundLength
- rounds
- supportsInterface
You can access this Module and the code here: https://bit.ly/40qBr1v
If you still haven’t signed up to Bunzz, what are you waiting for?
Sign up here https://app.bunzz.dev/signup and get your smart contracts deployed in 5 minutes through our great GUI.