In this section, we look at the mutable fields declared in the contract. The source code.
Declaring the Mutable Fields
The fields can be grouped into the following types based on their purpose.
These fields can be modified by the owner of the contract. They dictate the behavior of the platform.
|The commission collected by the platform owner on every rental|
|The change in |
|A variable that is incremented to generate sequential IDs for new listings|
User Details Fields
Map fields are dictionaries that are used to store details about the user accounts created on the platform. The
key for each of them is the Wallet Address of the user.
|The name of the user|
|The role of the user|
Listing Details Fields
Map fields are dictionaries that are used to store details about each listing. The
key for each of them is the ID as explained with the
listing_id_generator in the Owner Fields. The
value is the listing information corresponding to the field.
|Field||Value description||Type||Initial value|
|The wallet address of the host account that created the listing|
|The wallet address of the current renter of the listing|
|The name of the listing|
|The description of the listing|
|The price of the listing|
|The number of rooms in the listing|
|The number of bathrooms in the listing|
|A URL to an image of the listing|
|A Google Maps Plus Code for the location of the listing|
|The availability of WiFi at the listing|
|The availability of a Landry at the listing|
|The availability of an HVAC at the listing|
|The availability of a TV at the listing|
|The availability of a Kitchen at the listing|
|The rent accumulated for the listing|