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): Use DAO Proposal Single contract address in nft-launchpad contract config #1488

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

Conversation

WaDadidou
Copy link
Collaborator

@WaDadidou WaDadidou commented Jan 8, 2025

WIP zone in the code

// TODO:
// MAKE THE PROPOSAL


Why this PR ?

This flow is bad: https://github.com/TERITORI/teritori-dapp/blob/feat/cosmwasm-launchpad/packages/hooks/launchpad/useProposeApproveProject.ts#L29-L112

The front must not create a proposal. Also, there is too much back-and-forth between nft-launchpad contract, front and indexer.

The good way is to have the nft-launchpad contract as entry point for project approbation.
Also, the proposal must be created when the project is ready for review. The user don't have to create manually the proposal.
Then, indexer logic can be triggered from the nft-launchpad contract logic. This flow must be agnostic regarding to the front.

So, we'll execute DAO stuff from nft-launchpad contract. To do that, we'll need to store the DAO contract in the nft-launchpad contract config.
The DAO contract used to make the proposal is the Proposal Single one: https://github.com/DA0-DA0/dao-contracts/tree/development/contracts/proposal/dao-proposal-single

So, I've updated:

  • The nft-launchpad contract update_merkle_root logic. This is the place where to trigger the proposal creation
    proposal_id is emitted and will be stored in DB
  • The nft-launchpad contract config
  • The CosmWasmNFTLaunchpad feature
  • The deploy/instantiate scripts for nft-launchpad contract
  • The deployTeritoriEcosystem script by adding missing DA0DA0 and NFTLaunchpad stuff
  • The organisation of scripts to be clearer and versatile
  • Wrong newtork variables in cw-address-list script

TAKE ATTENTION TO packages/scripts/network-setup/NftLaunchpad/deployNftLaunchpad.ts


Current state

npx tsx packages/scripts/network-setup/nft-launchpad/deployNftLaunchpadScript.ts teritori-testnet testnet-adm --keyring-backend test
gives me [esbuild Error]: Unexpected "typeof" at /home/dadidou/DEV/teritori-dapp/node_modules/react-native/index.js:14:7

@WaDadidou WaDadidou self-assigned this Jan 8, 2025
Copy link

netlify bot commented Jan 8, 2025

Deploy Preview for gno-dapp ready!

Name Link
🔨 Latest commit 3ab7350
🔍 Latest deploy log https://app.netlify.com/sites/gno-dapp/deploys/678d385a323e0400080673c7
😎 Deploy Preview https://deploy-preview-1488--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

netlify bot commented Jan 8, 2025

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 3ab7350
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/678d385acb8c390008cd339e
😎 Deploy Preview https://deploy-preview-1488--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.

@WaDadidou WaDadidou requested review from n0izn0iz and removed request for n0izn0iz January 8, 2025 00:41
@WaDadidou WaDadidou changed the title feat(launchpad): Add DAO Proposal Single contract address in nft-launchpad contract config feat(launchpad): Use DAO Proposal Single contract address in nft-launchpad contract config Jan 8, 2025
@WaDadidou WaDadidou force-pushed the feat-contract-nft-launchpad-dao-proposal branch from 303441e to 16add6e Compare January 9, 2025 00:53
@WaDadidou WaDadidou force-pushed the feat-contract-nft-launchpad-dao-proposal branch from 16add6e to 3d47178 Compare January 9, 2025 00:53
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.

1 participant