Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIP-11] Allow round creation via Registry #19

Merged
merged 4 commits into from
Jun 1, 2023

Conversation

thelostone-mc
Copy link
Member

@thelostone-mc thelostone-mc commented May 30, 2023

Based off the discussion off : https://github.com/orgs/allo-protocol/discussions/8
PR : #19

@thelostone-mc thelostone-mc added the status: Review An AIP Author marks an AIP as ready for and requesting Peer Review. label May 30, 2023
@gravityblast
Copy link
Contributor

Updating the project struct to include projectMetadata provides a more comprehensive representation of projects

The project struct already has the metadata pointer, so do you mean just rename it from metadata to projectMetadata?
I think it would be redundant since it's already inside the Project struct, so I would prefer project.metadata than project.project_metadata

@gravityblast
Copy link
Contributor

Introduce the updateProjectMetadata function in the Registry contract to allow updates to project metadata.

The registry already has this function:

    function updateProjectMetadata(uint256 projectID, MetaPtr calldata metadata) external onlyProjectOwner(projectID) {

@gravityblast
Copy link
Contributor

  • Update the metadata event to emit the metadata type.

The even already has the metadata type in the pointer

    event MetadataUpdated(uint256 indexed projectID, MetaPtr metaPtr);

@0xKurt
Copy link
Contributor

0xKurt commented May 31, 2023

@gravityblast
The proposed change involves removing the Program contracts and introducing a second metapointer to the Project Struct. This means that a Project will now have both a project-metapointer, as before, and an additional program-metapointer.

Since a second metapointer is introduced, a new function for the second metapointer is added. To simplify the implementation, a single event is used when updating a metapointer. To distinguish between the two metapointers, a type (enum) is introduced, indicating whether the updated metapointer corresponds to the Project or Program metapointer.

@gravityblast
Copy link
Contributor

I don't think it makes sense to have programMetadata inside the project struct, since most of the project won't have a program, they will be simple projects.

It makes sense to have a different mapping with projects => program initialized when a project creates a round.

@gravityblast
Copy link
Contributor

Since a second metapointer is introduced, a new function for the second metapointer is added. To simplify the implementation, a single event is used when updating a metapointer. To distinguish between the two metapointers, a type (enum) is introduced, indicating whether the updated metapointer corresponds to the Project or Program metapointer.

@KurtMerbeth ok so we should update the document because now it says:

- Update the project struct to include projectMetadata for a more comprehensive representation of projects.

Introduce the updateProjectMetadata function in the Registry contract to allow updates to project metadata.

so maybe they need to be renamed to "update Program metadata"?
or do we need to change the text to add a parameter to the already existing methods?

@nfrgosselin nfrgosselin changed the title AIP: Allow round creation via Registry [AIP-11] Allow round creation via Registry May 31, 2023
AIPS/aip-11.md Outdated Show resolved Hide resolved
AIPS/aip-11.md Outdated Show resolved Hide resolved
AIPS/aip-11.md Outdated Show resolved Hide resolved
@thelostone-mc
Copy link
Member Author

@gravityblast You are right. I had confused the name while writing the AIP.
We are adding a new updateProgramMetadata. Like you mentioned we already have updateProjectMetadata.
Updated the AIP

@gravityblast
Copy link
Contributor

nice thank you @thelostone-mc ! ❤️

@thelostone-mc thelostone-mc added status: Final This AIP represents the final standard. A Final AIP exists in a state of finality and should only be and removed status: Review An AIP Author marks an AIP as ready for and requesting Peer Review. labels Jun 1, 2023
@thelostone-mc thelostone-mc merged commit 0f8c6ba into main Jun 1, 2023
@thelostone-mc thelostone-mc deleted the create-round-via-registry branch June 1, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: Final This AIP represents the final standard. A Final AIP exists in a state of finality and should only be
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants