OfferSystem

Git Source

Inherits: System

Functions

createOffer

Create an offer

Restricted to admin

function createOffer(MaterialId _materialId, uint256 _amount, uint256 _cost) public returns (bytes32 orderEntity);

Parameters

NameTypeDescription
_materialIdMaterialIdMaterial id of the offer
_amountuint256Amount of material in whole units
_costuint256Cost of the offer in whole units

Returns

NameTypeDescription
orderEntitybytes32Id of the offer entity

cancelOffer

Cancel an offer

Restricted to admin

function cancelOffer(bytes32 _offerEntity) public;

Parameters

NameTypeDescription
_offerEntitybytes32Id of the offer entity

buyOffer

Buy an offer

Resolves network after buying

function buyOffer(bytes32 _offerEntity) public;

Parameters

NameTypeDescription
_offerEntitybytes32Id of the offer entity