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

Introduce _asReferencePubParams to enhance type Handling in _createReferencePublication #25

Closed
codeWhizperer opened this issue Jun 4, 2024 · 8 comments
Assignees

Comments

@codeWhizperer
Copy link
Collaborator

codeWhizperer commented Jun 4, 2024

The _asReferencePubParams function determines whether a given publication type should be treated as a quote or a comment. This function is crucial in formatting parameters passed to the _createReferencePublication function.

Add the _asReferencePubParams to ensure it effectively differentiates and processes parameters based on publication types:

Quote Params Implementation

Comment Params Implementation

Consider how _asReferencePubParams is utilized in _createReferencePublication:

For comments: Comment Implementation

For quotes: Quote Implementation

  • Feel free to make suggestions and reach out in the working group if you have any questions.

Note:
Write test for the implementation before creating a PR, and test should be in the tests/test_publication.cairo file

@Goodness5
Copy link

can you assign me this, i can work on this

@codeWhizperer
Copy link
Collaborator Author

codeWhizperer commented Jun 5, 2024

@Goodness5 gm chief, this issue is paused for now. It will be open once issue #23 and #24 are ready.

@Goodness5
Copy link

Alright sir 🫡🫡

@codeWhizperer
Copy link
Collaborator Author

checkout other issues ser

@mubarak23
Copy link
Collaborator

from the solidity implementation, we have two function with same name _asReferencePubParams, but the two function collect different argument i.e commentParams and quoteParams,

If we are implementing this, this mean we will have one function that collect one argument, then use a match pattern and return referencePubParams with type base on either commentParams or quoteParams was pass.

@codeWhizperer
Copy link
Collaborator Author

codeWhizperer commented Jun 17, 2024

from the solidity implementation, we have two function with same name _asReferencePubParams, but the two function collect different argument i.e commentParams and quoteParams,

If we are implementing this, this mean we will have one function that collect one argument, then use a match pattern and return referencePubParams with type base on either commentParams or quoteParams was pass.

@mubarak23, you're correct; do you want to work on the issue? it's available

@mubarak23
Copy link
Collaborator

from the solidity implementation, we have two function with same name _asReferencePubParams, but the two function collect different argument i.e commentParams and quoteParams,
If we are implementing this, this mean we will have one function that collect one argument, then use a match pattern and return referencePubParams with type base on either commentParams or quoteParams was pass.

@mubarak23, you're correct; do you want to work on the issue? it's available

Yes, kindly assign @codeWhizperer

@mubarak23
Copy link
Collaborator

inside comment and quote function, i need to change function argument i.e add a publicationType of value comment or quote which _asReferenceParam function will validate.

@codeWhizperer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants