Province
Search
K

Buildings

Building Data Model

timestamp (int): unix epoch timestamp when the record was entered. *All timestamps must be in milliseconds* object (string): [lumbermill]. Other types will be added in the future. model (string): an object may have multiple models with different attributes. The model describes which specific model the record represents.
owner (string - EVM address) - 42-character hexadecimal address of the owner of the equipment. description (string): text description of the equipment item for the front-end. Should be the same for objects in the same model + object.
serial (int): this is the key for object and must be unique across all objects.
operational: {...}: This field covers various operational fields that differ for each object. For example, the lumber mill will include state changes regarding the created, processing, idle, and destroyed states.

lumber mill

Requirements
A user must own a lumber mill to initiate any functionality, but the owner can process timber for other users as a service.
Either the owner or the customer must have timber for the operation to begin.

Process

Owner Processing

The owner is processing timber for themselves - i.e. the address of the initatior and the owner are equal.
  1. 1.
    User sends a request to process X tons of timber.
  2. 2.
    Check the amount of timber the owner has available in the materials service. If the owner has no timber, reply with an error. If X exceeds the amount of timber available, replay with an error and log the request (this is not normal user behavior).
  3. 3.
    And the end of each day (provincial time), destroy Y timber and create Z lumber (wood) at the rate specified in the description by making calls to the materials service. For example, if 1 ton of timber is processed and the efficiency rate is 50%, call destroy and destroy 1 ton of timber for the user's address and credit the user lumber balance by 0.5 tons.

3rd Party Processing

The owner is processing timber on behalf of someone else.
[To Be Finalized]