Comment on page
Materials
Renewable and Non-Renewable Resources
owner (string): Owner's address starting with 0x, 42 characters, and in lowercase. In a transfer transaction, this is the recipient of the material.
amount (int): amount of the material x's 100. No decimals are permitted in the database. The nominal amount should multiplied by 100 and then rounded to the nearest whole integer. Negative amounts represent a deduction to the owner's account.
type (string): The string representation of the material [timber]
type_code (int): The integer representation of the wood [0]
timestamp (int): timestamp the record was entered in milliseconds.
action (string): One of [create, destroy, transfer]
sender (string): Only present in transfer transactions. The sender's address starting 0x, 42 characters, and in lowercase.
{timber: 0, wood: 1}
Each material has a different process through which it is created:
ToDo:
- 1.Create the amount of possible timber during the land registration process.
- 2.This will serve as the basis for the amount of timber that is created after the bulldozer land clearing process.
- 3.Backfill the timber amounts in land_data for existing land.
Wood is created through the production process of a lumber mill (not complete yet; for future reference).
Owners with a sufficient balance can transfer materials for various purposes. This includes transferring to other users or using the material in a production process.
Destroy operations occur during the production process. For example, the input for houses (wood) is destroyed upon building a house. For destroy operations, the owner is listed as 0x0000000000000000000000000000000000000000 and the address from which the material is being destroyed is listed as the sender.
balance: the balance of a material for a specific address is calculated by adding all of the records with the address listed as owner for create and transfer transactions and then deducting all records where the address listed as sender for destroy and transfer transaction. This amount is then divided by 100 for the nominal amount.