Skip to content

Commit

Permalink
(hub): update natspec of registerHuman
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminbollen committed Oct 31, 2024
1 parent 5419485 commit 94752ca
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/hub/Hub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,13 @@ contract Hub is Circles, TypeDefinitions, IHubErrors {
// External functions

/**
* @notice Register human allows to register an avatar for a human,
* if they have a stopped v1 Circles contract, that has been stopped
* before the end of the invitation period.
* Otherwise the caller must have been invited by an already registered human avatar.
* @notice Register human allows to register an avatar for a human (for RINGS, anyone can always self-register).
* Preserving functionality from Circles: Otherwise the caller must have been invited by an already registered human avatar.
* Humans can invite someone by trusting their address ahead of this call.
* After the invitation period, the inviter must burn the invitation cost, and the
* newly registered human will receive the welcome bonus.
* @param _inviter address of the inviter, who must have trusted the caller ahead of this call.
* If the inviter is zero, the caller can self-register if they have a stopped v1 Circles contract
* (stopped before the end of the invitation period).
* If the inviter is zero, the caller can self-register (always in RINGS)
* @param _metadataDigest (optional) sha256 metadata digest for the avatar metadata
* should follow ERC1155 metadata standard.
*/
Expand All @@ -244,7 +241,7 @@ contract Hub is Circles, TypeDefinitions, IHubErrors {
_mintAndUpdateTotalSupply(msg.sender, toTokenId(msg.sender), WELCOME_BONUS, "", true);
} else {
// if someone has invited you by trusting your address ahead of this call,
// they must themselves be a registered human, and they must pay the invitation cost (after invitation period).
// they must themselves be a registered human, and they must pay the invitation cost.

if (!isHuman(_inviter) || !isTrusted(_inviter, msg.sender)) {
// revert CirclesHubMustBeHuman(msg.sender, 0);
Expand Down

0 comments on commit 94752ca

Please sign in to comment.