OfferSystem
Inherits: System
Functions
createOffer
Create an offer
Restricted to admin
function createOffer(MaterialId _materialId, uint256 _amount, uint256 _cost) public returns (bytes32 orderEntity);
Parameters
Name | Type | Description |
---|---|---|
_materialId | MaterialId | Material id of the offer |
_amount | uint256 | Amount of material in whole units |
_cost | uint256 | Cost of the offer in whole units |
Returns
Name | Type | Description |
---|---|---|
orderEntity | bytes32 | Id of the offer entity |
cancelOffer
Cancel an offer
Restricted to admin
function cancelOffer(bytes32 _offerEntity) public;
Parameters
Name | Type | Description |
---|---|---|
_offerEntity | bytes32 | Id of the offer entity |
buyOffer
Buy an offer
Resolves network after buying
function buyOffer(bytes32 _offerEntity) public;
Parameters
Name | Type | Description |
---|---|---|
_offerEntity | bytes32 | Id of the offer entity |