Skip to main content
Version: V4

PrizeTierHistory

IPrizeTierHistory is the base contract for PrizeTierHistory

Structs

PrizeTier

  • uint8 bitRangeSize
  • uint32 drawId
  • uint32 maxPicksPerUser
  • uint32 expiryDuration
  • uint32 endTimestampOffset
  • uint256 prize
  • uint32[16] tiers

Functions

constructor

  function constructor(
) public

push

  function push(
) external

replace

  function replace(
) external

popAndPush

  function popAndPush(
) external returns (uint32)

getPrizeTier

  function getPrizeTier(
) external returns (struct IPrizeTierHistory.PrizeTier)

getOldestDrawId

  function getOldestDrawId(
) external returns (uint32)

getNewestDrawId

  function getNewestDrawId(
) external returns (uint32)

getPrizeTierList

  function getPrizeTierList(
) external returns (struct IPrizeTierHistory.PrizeTier[])

getPrizeTierAtIndex

  function getPrizeTierAtIndex(
) external returns (struct IPrizeTierHistory.PrizeTier)

count

  function count(
) external returns (uint256)

manager

  function manager(
) public returns (address)

Gets current _manager.

Return Values:

TypeDescription
addressCurrent _manager address.

setManager

  function setManager(
address _newManager
) external returns (bool)

Set or change of manager.

Throws if called by any account other than the owner.

Parameters:

NameTypeDescription
_newManageraddressNew _manager address.

Return Values:

TypeDescription
boolBoolean to indicate if the operation was successful or not.

owner

  function owner(
) public returns (address)

Returns the address of the current owner.

pendingOwner

  function pendingOwner(
) external returns (address)

Gets current _pendingOwner.

Return Values:

TypeDescription
addressCurrent _pendingOwner address.

renounceOwnership

  function renounceOwnership(
) external

Renounce ownership of the contract.

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership

  function transferOwnership(
address _newOwner
) external

Allows current owner to set the _pendingOwner address.

Parameters:

NameTypeDescription
_newOwneraddressAddress to transfer ownership to.

claimOwnership

  function claimOwnership(
) external

Allows the _pendingOwner address to finalize the transfer.

This function is only callable by the _pendingOwner.

Events

ManagerTransferred

  event ManagerTransferred(
address previousManager,
address newManager
)

Emitted when _manager has been changed.

Parameters:

NameTypeDescription
previousManageraddressprevious _manager address.
newManageraddressnew _manager address.

OwnershipOffered

  event OwnershipOffered(
address pendingOwner
)

Emitted when _pendingOwner has been changed.

Parameters:

NameTypeDescription
pendingOwneraddressnew _pendingOwner address.

OwnershipTransferred

  event OwnershipTransferred(
address previousOwner,
address newOwner
)

Emitted when _owner has been changed.

Parameters:

NameTypeDescription
previousOwneraddressprevious _owner address.
newOwneraddressnew _owner address.

PrizeTierPushed

  event PrizeTierPushed(
uint32 drawId,
struct IPrizeTierHistory.PrizeTier prizeTier
)

Emit when new PrizeTier is added to history

Parameters:

NameTypeDescription
drawIduint32Draw ID
prizeTierstruct IPrizeTierHistory.PrizeTierPrizeTier parameters

PrizeTierSet

  event PrizeTierSet(
uint32 drawId,
struct IPrizeTierHistory.PrizeTier prizeTier
)

Emit when existing PrizeTier is updated in history

Parameters:

NameTypeDescription
drawIduint32Draw ID
prizeTierstruct IPrizeTierHistory.PrizeTierPrizeTier parameters