Introduction

A "User" in Sage is a specific defined data type for holding information about the user interacting with the platform. The contracts enforce that the address calling move functions must have an associated user in the platform before they are allowed to execute transactions. The only exception to this is the create_user function, which has it's own special enforcement rules.

Specifically, when the contracts are first published they include an "Invite Config" object that defines whether users need to be invited to the platform or not. When this functionality is on, users will not be able to be created without an invitation from Sage system itself. When this functionality is off, users can be invited or not, as an option.

In this way the growth of the platform can be controlled directly depending on whatever strategy is chosen to be best.

Implementation Details

A User is a Sui object on chain. It contains information relevant to the Sage about the users of the platform, such as their chosen username, total amount of rewards, etc.

While a User is directly tied to a wallet address (or kiosk), the key identifier for a User was chosen to be the lowercase version of their username. This was chosen due to a need for maintaining unique usernames in the platform.

Last updated