πUser Smart Contract
This contract stores two different things:
User Data
This is an on-chain way to store basic user information (name, bio, social networks, picture). It's not mandatory, is just another option. User can choose to use different sources to display their info (i.e. ENS, NFTs, LinkedIn or other on-chain or off-chain sources).
Structure
Example:
Permissions
Permissions are a tool that allows the user to delegate to an operator the ability to register a record on their behalf. This is necessary if the user wants to use Prutopia API or eventually another third party tool.
Types
There are two type of permissions: General and Experience. The first one are permissions relative to general actions and the second one are permissions relative to a certain experience.
Structure
Each permission name describes the action that is allowed to be executed by the operator. User can choose to configure "total" permissions, that acts as a superpermission for all operations.
Experience Permissions are used for freelance experiences and allows to perform Work Record functions for a specific Experience. To understand this better, think of a user who do regular jobs on a freelance service platform and wants to allow that platform to write that services but specifically for that experience, and not for another.
Functions
updateInfo: Used to insert/update their profile.
updateGeneralPermissions: Used to update General Permissions.
updateGeneralPermissionsWithSig: Used to update General Permissions with user Signature. This allows the user to configure General Permissions delegating the blockchain transaction to a third party.
updateExperiencePermissions: Used to update ExperiencePermissions.
updateExperiencePermissionsWithSig: Used to update Experience Permissions with user Signature. This allows the user to configure Experience Permissions delegating the blockchain transaction to a third party.
Last updated