Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(launchpad): Add backend, service, indexer, db #1432
base: main
Are you sure you want to change the base?
feat(launchpad): Add backend, service, indexer, db #1432
Changes from 12 commits
540cd3c
08b3d29
1c814bf
197c7c3
a58d423
832de49
90d37b8
b4ec5b3
fc6602f
51b7362
811fe46
f903116
8d36b53
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
why is there a proposal id, if you want to create a proposal to approve a project request
or maybe i don't understand the purpose of this message
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.
if this is about approving a project request what about:
ApproveProjectRequestProposal
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's about updating the DB after creating+approving a proposal.
ProposeApproveProjectRequest
is called after the proposal has been created, it's not used to create a proposal, we create the proposal on front using DA0 contract.The flow in front is:
This flow is here: https://github.com/TERITORI/teritori-dapp/blob/feat/cosmwasm-launchpad/packages/hooks/launchpad/useProposeApproveProject.ts#L30
I hope it makes sense ^^"
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.
this should be the responsibility of an indexer handler, not triggered by an api call
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.
I will need some instructions to make this refacto.
Should we use that as entry point from front ? https://github.com/TERITORI/teritori-dapp/blob/feat/cosmwasm-launchpad/packages/hooks/launchpad/useProposeApproveProject.ts#L30
Which wasm action to listen ? This one ? https://github.com/TERITORI/teritori-dapp/blob/feat-launchpad-backend/go/internal/indexerhandler/handle.go#L325-L328
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 would be the execute action on the dao contract in the top handler, but it's already handled and we need to listen to the submsg here really https://github.com/TERITORI/teritori-dapp/blob/feat-launchpad-backend/go/internal/indexerhandler/dao.go#L264
I'm not sure what is the correct action on the launchpad contract though, it would be the one proposed.
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.
Hm ok, but we need to handle things before "deploy_collection".
No ?
So, the best should be the first proposition (DAO contract is the entry, and we just trigger sepcific stuff depending on the Proposed action).
Actually, we can listen for "propose" and actions when the proposal is executed ("update_members", "create_post", ect).
But we can"t listen for the things in between, like "propose XXX" (Not just "propose", not just waiting for execution, but "do things if a proposal for XXX is made")
This though comes here: https://github.com/TERITORI/teritori-dapp/blob/feat-launchpad-backend/go/internal/indexerhandler/handle.go#L325
Could we have something like
case "propose.deploy_collection
?What is the NFT Launchpad use case ?
We want to make a proposal + vote "yes" + update project status in DB. The vote and update DB should be placed after "propose" and before "deploy_collection".
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.
Update: I made a PR to fix this point ==> #1488