Registry
Integrating with the Registry

Integrating with the Project Registry

There are two ways to interact with the Project Registry.

  1. Through the Registry.sol contract
  2. Through the Indexer

Writing to the Project Registry

Create a Profile

Creating a profile is required to create a pool. Some pools may also require recipients or allocators to have a profile. createProfile will return a profileId type bytes32. This value will be needed for future calls to the registry.

createProfile(nonce, name, metadata, signer.address, []);

Parameters

namedata typenotes
_nonceuint256nonce is used to create the profile profileId. By providing a nonce projects can ensure having the same id across chains.
_namestringThe profile name. This is used to generate the anchor.
_metadataMetadataSee the metadata section below for more details.
_owneraddressThe owner of the profile. See Roles for more details about profile owners.
_membersaddress[]Array of profile member address. Roles for more details about profile members.

Metadata

Offchain metadata can be stored in the project registry using the Metadata struct.

struct Metadata {
    uint256 protocol;
    string pointer;
}
FieldData TypeNotes
protocoluint256An id from the list of available protocols.
pointerstringThe pointer to the off chain data.

Currently, the only protocol id available is '1' for IPFS. Others may be added later.

Updating a Profile

addMembers

Adds member addresses to the members array. Only the profile owner can add members.

addMembers(profileId, members)
FieldData TypeNotes
profileIdbytes32The id of the profile to update.
membersaddress[]Array of member address(es) to add.

removeMembers

Removes member addresses to the members array. Only the profile owner can remove members. removeMembers(profileId, members)

FieldData TypeNotes
profileIdbytes32The id of the profile to update.
membersaddress[]Array of member address(es) to remove.

updateProfileMetadata

Will overwrite the existing profile metadata. Only the owner can update profile metadata.

updateProfileMetadata(profileId, metadata)

FieldData TypeNotes
profileIdbytes32The id of the profile to update.
metadataMetadataMetadata to add to the profile.

updateProfileName

Will set a new name for the profile. Only the owner can update profile metadata. This action will create a new anchorId.

updateProfileName(profileId, name)

FieldData TypeNotes
profileIdbytes32The id of the profile to update.
namestringNew name for the profile.

updateProfilePendingOwner

Will set a new pending owner. The pending owner will need to call acceptProfileOwnership in order for the ownership transfer to be complete. Only the profile owner can set a pending owner.

updateProfilePendingOwner(profileId, pendingOwner)

FieldData TypeNotes
profileIdbytes32The id of the profile to update.
pendingOwneraddressThe address for the new profile owner.

Reading Project Registry Data Using Indexer

Project registry data is publicly available through Indexer. See the Indexer Project page.