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

feat(launchpad): Add backend, service, indexer, db #1432

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

WaDadidou
Copy link
Collaborator

@WaDadidou WaDadidou commented Nov 30, 2024

Extracted from #1024

Most work was done by @hthieu1110

It adds:

  • launchpad backend
  • launchpad service
  • ipfs service
  • one handler in dao indexer
  • launchpad indexer
  • launchpad API
  • merkletree functions

Copy link

netlify bot commented Nov 30, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 90d37b8
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/674b5fe798f6e800081a8462
😎 Deploy Preview https://deploy-preview-1432--teritori-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 30, 2024

Deploy Preview for gno-dapp ready!

Name Link
🔨 Latest commit 90d37b8
🔍 Latest deploy log https://app.netlify.com/sites/gno-dapp/deploys/674b5fe791f0e50008fdfeac
😎 Deploy Preview https://deploy-preview-1432--gno-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@MikaelVallenet MikaelVallenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put some comments, feel free to answer so i can approve or request changes

api/launchpad/v1/launchpad.proto Show resolved Hide resolved
api/launchpad/v1/launchpad.proto Show resolved Hide resolved
api/launchpad/v1/launchpad.proto Show resolved Hide resolved
repeated LaunchpadProject projects = 1;
}

message LaunchpadProjectsRequest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not just add a optional creator id to refactor the same request above with just creator_id as addition?

string sender = 1;
string network_id = 2;
string project_id = 3;
string proposal_id = 4;
Copy link
Member

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

Copy link
Member

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


func (h *Handler) handleExecuteSubmitCollection(e *Message, execMsg *wasmtypes.MsgExecuteContract) error {
var jsonData map[string]map[string]interface{}
if err := json.Unmarshal(execMsg.Msg.Bytes(), &jsonData); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to unmarshal into a type ? instead of using jsonData["key"] after isn't ?

return errors.Wrap(err, "failed to unmarshal json")
}

collectionId := jsonData["update_merkle_root"]["collection_id"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

go/internal/indexerhandler/launchpad.go Show resolved Hide resolved

switch provider {
case Pinata:
url = "https://api.pinata.cloud/psa"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like to have const data like this on top of the file in a const so we can reuse-it and modify it easily from one place.I know it's used juste one time here, just personal preference, feel free to do what you feel is right

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

Successfully merging this pull request may close these issues.

3 participants