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 contract and deps #1315

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

Conversation

WaDadidou
Copy link
Collaborator

@WaDadidou WaDadidou commented Oct 18, 2024

  • Add workspace and root Cargo.toml
  • Add a network feature
  • Add nft-launchpad contract
  • Add nft-tr721 contract
  • Add scripts to optimize, deploy and instantiate nft-launchpad contract, and optimize and deploy nft-tr721 contract

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 027513e
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/673edfa01ca5490008920c27
😎 Deploy Preview https://deploy-preview-1315--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 Oct 18, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit 027513e
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/673edfa0118289000857728f
😎 Deploy Preview https://deploy-preview-1315--testitori.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.

rust/utils/scripts.ts Outdated Show resolved Hide resolved
@n0izn0iz n0izn0iz changed the title Feat: Add nft-launchpad contract and deps feat: add nft-launchpad contract and deps Nov 2, 2024
@WaDadidou WaDadidou self-assigned this Nov 3, 2024
@WaDadidou WaDadidou changed the title feat: add nft-launchpad contract and deps feat(launchpad): add contract and deps Nov 3, 2024
MikaelVallenet
MikaelVallenet previously approved these changes Nov 5, 2024
Copy link
Collaborator

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

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

partial review

packages/networks/features.ts Outdated Show resolved Hide resolved
packages/scripts/network-setup/deployNftLaunchpad.ts Outdated Show resolved Hide resolved
packages/scripts/network-setup/deployNftLaunchpad.ts Outdated Show resolved Hide resolved
#[cw_serde]
pub struct Config {
pub name: String,
pub nft_code_id: Option<u64>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why make it an Option?

Suggested change
pub nft_code_id: Option<u64>,
pub nft_code_id: u64,

Copy link
Collaborator Author

@WaDadidou WaDadidou Nov 7, 2024

Choose a reason for hiding this comment

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

We can use nft-launchpad without nft-tr721. Only deploy_collection will not work.

Same for admin, we don't need the admin to use submit_collection or update_merkle_root

Copy link
Collaborator

Choose a reason for hiding this comment

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

when do we want only parts of the functions working?

Copy link
Collaborator Author

@WaDadidou WaDadidou Nov 8, 2024

Choose a reason for hiding this comment

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

I don't understand.
We don't need tr721 or authority to send CollectionProject data onchain.
The users can create and complete collections.
The admin can deploy

Copy link
Collaborator

@n0izn0iz n0izn0iz Nov 8, 2024

Choose a reason for hiding this comment

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

yes okay, but do we really want to allow to instantiate the launchpad with no underlying cw721 implem or no admin?

when does it make sense? do you have a usecase?
I think this just adds uneeded complexity and corner cases

Copy link
Collaborator Author

@WaDadidou WaDadidou Nov 8, 2024

Choose a reason for hiding this comment

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

For me, if we don't need it to execute things, it should be not mandatory (dummy style)
But it's not a "smartcontract vision".

I can counter my own argument with this: https://github.com/TERITORI/teritori-dapp/blob/feat-nft-launchpad-contract/rust/cw-contracts/cw721-membership/src/contract.rs#L90
All Config fields are mandatory, but not necessary used in all the functions of this contract.

I have no use case, I'll make them mandatory ^^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


#[cw_serde]
#[derive(Default)]
pub struct Collection {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pub struct Collection {
pub struct CollectionProject {

to disambiguate with the actual Collection

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why not just LaunchpadCollection ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

because we're already in the nft-launchpad context

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rust/cw-contracts/nft-launchpad/src/contract.rs Outdated Show resolved Hide resolved
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