πExperience Smart Contract
This contract stores all the Work and Educational Experiences of the user.
Structure
Example
Field Semantics
experienceId: Experience Identificator. This value is assigned correlatively by the Smart Contract.
user: Address of the user. Owner of the record.
experienceType: Type of the Experience (0 = Professional, 1 = Educational).
role: Role name.
description: Describe the role with more details.
company: Name of the company/institution. It's just descriptive, this experience cannot be verified if this field is used. Must be empty if a Company Address is provided or if the Experience is freelance.
companyAddress: Address of the company/institution. Must be provided by the company/institution itself. Must be different from user address. The owner of this address can verify the Experience. Could be empty if the company/institution have no address or if the Experience is freelance.
startDate: Date when the Experience began. Store as Unix Timestamp (Seconds since Jan-01-1970). Mandatory field.
endDate: Date when the Experience ended. Store as Unix Timestamp (Seconds since Jan-01-1970). Could be 0 if the Experience has not ended yet. Must be 0 if the Experience is freelance. Must be greater than startDate.
companyValidation: If a companyAddress is provided, the owner of it can validate the Experience.
skills: Skills used for this experience.
moreInfoLink: Link to an optional metadata. Typically this link will point to a JSON with different fields for any kind of metadata (Photos, Videos, Informative Fields, etc).
Functions
addExperience: Adds a new experience.
updateExperience: Updates an existing experience.
endExperience: Ends an existing experience.
deleteExperience: Deletes an existing experience.
updateExperienceValidation: Validates an existing experience.
Validation Rules
The are several rules that an Experience must follow to ensure a consistent state. This apply to addExperience, updateExperience and endExperience operation.
User address must be different from address zero.
Experience type must be 0 (Professional) or 1 (Educational)
Role must not be empty.
Must specify either a company name or a company address for non-freelance (one or another, not both).
User address must be different from company Address.
Freelance experience (No company name or company address) must not have endDate.
StartDate must not be empty.
EndDate must be greater than startDate.
Last updated