-
Notifications
You must be signed in to change notification settings - Fork 51
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
add template quest contract and check is_claimable #61
add template quest contract and check is_claimable #61
Conversation
mubarak23
commented
Apr 18, 2024
- issue #29
- follows contribution guide
- code change includes tests
- breaking change
- create template quest contract that implement IQuest trait
- check the creator on templateMeta is equal to the user on is_claimable function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work so far, left some further thoughts.
If you can make those changes, get it to build, and then create a test for it, that would be awesome!
|
||
#[storage] | ||
struct Storage { | ||
art_peace: IArtPeaceDispatcher, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to store this as a ContractAddress
and have a separate storage slot for ITemplateStoreDispatcher
since you won't be using the IArtPeaceDispatcher
for anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean having art_peace: ContractAddress
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right
if this contract is fine, i can proceed to start working on the test |
There may be some bugs or things, but yeah, I'd say the idea is there. You can go ahead with the tests 👍 Thanks! |
from my test, this line |
is_claimable function accept calldata of type |
should |
i was able to solved this by using Declare component! syntax |
from this context
template_id_felt is still throwing an error
|
I'd prefer to keep |
this |
@b-j-roberts kindly review the test cases |
ce19dd8
to
5fdb074
Compare
Thank you for the work! |
Really, i learn a lot from this issue, looking forward to contributing to the project |