Commercial equipment
Commercial Equipment is asset type 3 (DeedNFT.AssetType.CommercialEquipment): machinery such as
an excavator, a tractor or a production line. A Commercial Equipment deed cannot be subdivided. It
can be fractionalized like any deed.
What a validator reviews off-chain before validating a deed, such as a purchase agreement, service records or an inspection, is up to that validator. The contracts do not check documents. They check that the traits below are present, and record the validator's result.
Trait keys
These are the keys the contracts read. Each is a separate trait on the deed, set with
DeedNFT.setTrait and a string value (valueType 1). Keys are case-sensitive and hashed with
keccak256, so serialNumber and Serial Number are different traits.
manufacturermodelserialNumberyearequipmentType"Required by the preset criteria" means Validator.setupValidationCriteria(3). A validator can set
different criteria with setValidationCriteria
(validation-system.md). The preset also requires
an operating agreement and a non-empty definition.
The renderer names an equipment deed {manufacturer} {model} (S/N: {serialNumber}), falling back
to {equipmentType} - {manufacturer} {model}, {manufacturer} {model} and then
{manufacturer} Equipment (names).
deedNFT.setTrait(tokenId, bytes("manufacturer"), bytes("Caterpillar"), 1);
deedNFT.setTrait(tokenId, bytes("model"), bytes("320"), 1);
deedNFT.setTrait(tokenId, bytes("serialNumber"), bytes("CAT0320XABC12345"), 1);
deedNFT.setTrait(tokenId, bytes("year"), bytes("2021"), 1); // a string, not a number
deedNFT.setTrait(tokenId, bytes("equipmentType"), bytes("Excavator"), 1);Every deed also carries the seven traits set at mint: assetType, isValidated,
operatingAgreement, definition, configuration, validator and beneficiary.
Other traits and records
Any other string trait is stored and shown in attributes, but no contract reads it. The
example metadata in
CommercialEquipmentMetadataTemplate.json
suggests labels such as Category, Type, Dimensions, Weight, Power Source, Operating Hours, Purchase
Date, Warranty Expiration, Holding Entity, Location, Condition, Last Service Date and Maintenance
Schedule.
Supporting records are stored in the MetadataRenderer
(stored details):
- Documents, one URI per type, with
manageTokenDocument. The template usespurchase_agreement,warranty,service_records,operating_manual,certificationandinspection_reports. - Legal information with
setTokenLegalInfo: jurisdiction, registration number and date, document references, restrictions such as a lien. - Condition with
setAssetCondition: a general rating, last inspection date, known issues and improvements. Features withsetTokenFeatures.
Known limitations
yearmust be a string.validateDeeddecodes it as one; stored as a number (valueType2), it can make validation revert.- The example metadata has no
equipmentType. The renderer readsequipmentType; the template offers "Type" and "Category" instead, which are different keys. - Equipment shows as
Equipmentinattributes. The template'sAsset Typevalue is "Commercial Equipment"; the renderer writesEquipment. - The example metadata uses display labels, not trait keys.
test/templateslists "Manufacturer", "Model" and "Serial Number". The contracts readmanufacturer,modelandserialNumber; a trait set under the label is a different key and is not read.