The BinayMarket module for a Binary Game product allows players to bet on the price changes of a certain token in the given timeframe and win the reward.
You can access this Module and the code here: https://bit.ly/43BJ5Zx
How to Use Binary Market Contract
- Deploy the smart contract via
Bunzz
. When deploying, the deployer must set default values of theoracle
,vault
,marketName
,timeframes
,adminAddress
,operatorAddress
andminBetAmount
. - Admin can call
setOracle
,setName
,setOperator
,setTimeframes
,setMinBetAmount
andsetAdmin
functions to update those configuration variables of the Game. - Operator can call
genesisStartRound
,genesisLockRound
,executeRound
andsetPause
functions to update those configuration variables. - Users can call
openPosition
,claim
andclaimBatch
functions to bet and receive the rewards of the game. - Users can call
getExecutableTimeframes
,getUserRounds
,getCurrentUserRoundNumber
,isBettable
,getUnderlyingToken
,refundable
,isClaimable
andisNecessaryToExecute
to query the current status of the game.
Functions
#WRITE
- claim
- claimBatch
- executeRound
- genesisLockRound
- genesisStartRound
- openPosition
- setAdmin
- setMinBetAmount
- setName
- setOperator
- setOracle
- setPause
- setTimeframes
#READ
- timeframes
- underlyingToken
- userRounds
- vault
- adminAddress
- currentEpochs
- genesisLockOnces
- genesisStartBlockNumber
- genesisStartBlockTimestamp
- genesisStartOnce
- getCurrentUserRoundNumber
- getExecutableTimeframes
- getUnderlyingToken
- getUserRounds
- isBettable
- isClaimable
- isNecessaryToExecute
- ledger
- marketName
- minBetAmount
- operatorAddress
- oracle
- oracleLatestRoundId
- paused
- refundable
- rounds
You can access this Module and the code here: https://bit.ly/43BJ5Zx
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.