BinaryVault Smart Contract Module in Bunzz

The BinayVault module for a Binary Game product holds one underlying token in it for certain time.

You can access this Module and the code here: https://bit.ly/41roW73

How to Use

  1. Deploy smart contract via Bunzz. When deploying, the deployer must set default values of the name, symbol of the Position NFT, underlyingToken, config and admin addresses.
  2. Admin can call pauseVault, unpauseVault, whitelistMarket, setConfig and setAdmin functions to update those configuration variables of the Vault.
  3. Binary Market can call claimBettingRewards function to claim the reward for specific user.
  4. Users can call addNewLiquidityPosition, addLiquidityPosition, removeLiquidityPosition, removeLiquidity and mergeAllPositions functions to manage the bet & liquidity deposited for that specific game.
  5. Users can call getSharesOfUser, getUnderlyingToken, tokensOfOwnerIn, explicitOwnershipsOf and explicitOwnershipOf to manage the position NFTs & shares.

Functions

#WRITE

  • claimBettingRewards
  • transferFrom
  • unpauseVault
  • whitelistMarket
  • addNewLiquidityPosition
  • addLiquidityPosition
  • approve
  • removeLiquidityPosition
  • safeTransferFrom
  • safeTransferFrom
  • mergeAllPositions
  • mergePositions
  • pauseVault
  • removeLiquidity
  • setApprovalForAll
  • setConfig
  • setAdmin

#READ

  • adminAddress
  • balanceOf
  • totalShareSupply
  • totalSupply
  • underlyingToken
  • whitelistedMarkets
  • MINIMUM_LIQUIDITY
  • config
  • explicitOwnershipOf
  • explicitOwnershipsOf
  • feeAccrued
  • getApproved
  • symbol
  • tokenURI
  • tokensOfOwner
  • tokensOfOwnerIn
  • getSharesOfUser
  • getUnderlyingToken
  • isApprovedForAll
  • name
  • nextTokenId
  • ownerOf
  • paused
  • shareBalances
  • supportsInterface

You can access this Module and the code here: https://bit.ly/41roW73

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.

Share this article:

Leave a Comment

Your email address will not be published. Required fields are marked *