LibOrder

Git Source

Functions

create

Create a new order

function create(
    address _creator,
    MaterialId _materialId,
    uint256 _amount,
    bool _isTutorial,
    uint32 _tutorialLevel,
    uint256 _reward,
    uint32 _duration,
    uint32 _maxPlayers
) internal returns (bytes32);

Parameters

NameTypeDescription
_creatoraddressCreator of the order
_materialIdMaterialIdMaterial id to be produced
_amountuint256Amount of material to be produced in whole units
_isTutorialboolIs the order a tutorial order
_tutorialLeveluint32Tutorial level of the order
_rewarduint256Reward for completing the order in whole units
_durationuint32Duration of the order
_maxPlayersuint32Maximum number of players that can complete the order

cancel

Cancel an order

function cancel(bytes32 _orderEntity) internal;

Parameters

NameTypeDescription
_orderEntitybytes32Order to remove