Blast Documentation
  • 👋We're blast!
  • 🎮Tournaments
    • 🧗Leaderboard
    • 🤼Brackets
    • 👩‍🔬Tournaments Configuration
  • ⚙️Backend Overview
  • 🥸Smart Contracts
    • 👉Official Resources
    • 👉Pool Factory V2
    • 👉Pool Factory V2.2 (Update Apr-23)
Powered by GitBook
On this page
  • Functions:
  • Events:
  • Function initialize()
  • Function createPool(uint8 _game, uint8 _gameMode, uint256 _currentPrize, uint256 _entryFee, uint256 _startOn, uint256 _finishOn, uint16[] _winnersFees, address _tokenAddr) → uint256
  • Event CancelPool(uint256 _poolId)
  • Event PoolLeftBy(uint256 _poolId, address _player)
  • Event PoolJoinedBy(uint256 _poolId, address _player)
  • Event PoolFinished(uint256 _poolId, address _winner)
  • Event PrizeClaimFinished(uint256 _poolId, address _winnerAddress)
  1. Smart Contracts

Pool Factory V2.2 (Update Apr-23)

Functions:

  • initialize()

  • createPool(uint8 _game, uint8 _gameMode, uint256 _currentPrize, uint256 _entryFee, uint256 _startOn, uint256 _finishOn, uint16[] _winnersFees, address _tokenAddr)

  • joinPool(uint256 _poolId)

  • leavePool(uint256 _poolId)

  • viewPools(address _addr)

  • viewPoolPlayers(uint256 _poolId)

  • viewActivePools()

  • getPoolPaidPosition(uint256 _poolId, uint8 _position)

  • finishPool(uint256 _poolId, address[] _winners)

  • cancelPool(uint256 _poolId)

  • updateFee(uint256 _newFee)

  • updateTreasury(address payable _newTreasury)

  • claimPrize(uint256 _poolId, address payable _winnerAddress, uint8 _position)

Events:

  • NewPool(uint256 poolId, uint256 _game, uint256 _gameMode, uint256 _currentPrize, uint256 _entryFee, uint256 _startOn, uint256 _finishOn, address _tokenAddr)

  • CancelPool(uint256 _poolId)

  • PoolLeftBy(uint256 _poolId, address _player)

  • PoolJoinedBy(uint256 _poolId, address _player)

  • PoolFinished(uint256 _poolId, address _winner)

  • PrizeClaimFinished(uint256 _poolId, address _winnerAddress)

Function initialize()

Initializes pool count and bbFee

Function createPool(uint8 _game, uint8 _gameMode, uint256 _currentPrize, uint256 _entryFee, uint256 _startOn, uint256 _finishOn, uint16[] _winnersFees, address _tokenAddr) → uint256

Creates a new Pool providing entryFee, CurrentPrize, start and finish times. The transaction value must be equal to initial pool prize. Prizes and fees are in uint256, start and finish times are Unix Epochs in miliseconds. Fees are uint expressed in percentages i.e. a value of 10 means 10% fee, the sum of the 3 fees must equal a 100

  • poolId: pool Id

  • _game: game Id

  • _gameMode: game Mode Id

  • _currentPrize: initial pool prize

  • _entryFee: entry fee to join the pool

  • _startOn: unix start epoch in ms

  • _finishOn: unix finish epoch in ms

  • _tokenAddr: address of token used for pool

Event CancelPool(uint256 _poolId)

Event emitted on cancelled pool

Parameters:

  • _poolId: pool Id of cancelled pool

Event PoolLeftBy(uint256 _poolId, address _player)

Event emitted when a player leaves a pool

Parameters:

  • _player: player who leaves the pool

  • _poolId: pool Id

Event PoolJoinedBy(uint256 _poolId, address _player)

Event emitted when a player joins a pool

Parameters:

  • _player: player who joins the pool

  • _poolId: pool Id

Event PoolFinished(uint256 _poolId, address _winner)

Event emitted on a finished pool

Parameters:

  • _poolId: pool Id

  • _winner: winner of the pool tournament

Event PrizeClaimFinished(uint256 _poolId, address _winnerAddress)

Event emitted on a claimPrize

Parameters:

  • _poolId: pool Id

  • _winnerAddress: position winner address

PreviousPool Factory V2

Last updated 2 years ago

🥸
👉