Coder Social home page Coder Social logo

opencodeiiita / solmintnft Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 21.0 37.5 MB

A Solana blockchain based generative NFT marketplace.

License: MIT License

TypeScript 10.60% Shell 0.31% Rust 6.64% JavaScript 82.44%
arweave blockchain metaplex nft opencode22 rust solana typescript

solmintnft's Introduction

SolMintNFT

sol-sym

SolMintNFT is a project under OpenCode'22, that will be building an NFT marketplace using the Solana blockchain. Here, we will mint collection of generative NFTs using tools like, Metaplex and Hashlips-art-engine, and NFTs using Rust.

Tech Stacks

  • Solana
  • Rust
  • Metaplex - Sugar Candy Machine CLI-V2
  • Hashlips engine
  • Arweave

Setup on local machine

Setting up the environment-

The normal cargo build is available for building programs against your host machine which can be used for unit testing:

$ cargo build

To build a specific program, such as SPL Token, for the Solana BPF target which can be deployed to the cluster:

$ cd <the program directory>
$ cargo build-bpf

Claiming an issue

  • If you want to claim any issue (task), just reply with any message on that issue thread which justifies that you want to work on this issue. Ex :- Claim, I want to work on this issue, etc.
  • Issues will be given out on first come first serve basis.
  • In case of no activity on an issue even after 2 days, the issue will be reassigned. If you have difficulty approaching an issue, feel free to ask on our Discord channel.

Guidelines

  • Fork the repository to your github account.
  • Clone it to your local setup by using git clone <repo link>
  • Navigate to the respective folder in which the code need to be updated or added.
  • Do the necessary changes according to the issue assigned.
  • All set! Once you are confident in your work, push your code and create a pull request (PR) to the main branch of the upstream repository with proper descriptions/comments in the code explaining what you did and wait until we review it.
  • Single commit per pull request and name the commit as something meaningful.
  • Reference the issue numbers in the commit message if it resolves an open issue.
  • Strictly follow the template provided inside .github directory to make a PR.
  • Make changes to the pull request if the reviewing maintainer recommends them.
  • Do not use unnecessary variables or functions and follow a easy and understandable code structure with proper comments.
  • Pull Requests older than 2 days with no response from the contributor shall be marked closed.
  • Do not make PR which is not related to any issues.
  • Avoid duplicate PRs, if need be comment on the older PR with the PR number of the follow-up (new PR) and close the obsolete PR yourself.
  • Be polite and gentle to other community members.

Communication

If you have any doubt or suggestions regarding the project or it's any issue, feel free to ping us anytime in the SolMintNFT channel of our Discord server.

Resources

solmintnft's People

Contributors

akshatsgh avatar anshgeez31 avatar ayashika avatar finesse-734 avatar ribhavbansal avatar sanyamagrawal07 avatar shiva177 avatar srijan-crypto avatar sushantk1274 avatar tan-code-may avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

solmintnft's Issues

Minting assests using Sugar candy machine CLI

You need to mint the NFTs generated in the previous task of the 'hashlips art engine' using the Sugar Candy Machine CLI. In order to do so follow the below-mentioned steps-

  1. Transfer all the images and the json files in the build folder of the hashlips_art_engine to the assets folder of the metaplex.
  2. Delete previously present text file in the assets folder.
  3. Then, mint all those NFTs to Bundlr using the Sugar Candy Machine CLI.
  4. Price of each NFT will be 0.15 sol.
  5. Royalty percentage: 6%.
  6. Go live date: 17/01/2023 and time: 00:00:00 hrs.

Feel free to contact on discord.

Missing properties!

Type { } is missing the following properties from type AccountMeta : pubkey , isSigner , isWritable , for Mint account ,
Rent account , Token program and Associated token program components in TransactionInstruction.keys . Complete them in NFT_RUST/app.ts .

Set up the Solana CLI and your account

OPEN TO ALL.
NO need to claim this issue.

  • Set up the Solana CLI and generate a new Solana keypair and display the configurations in a screenshot, as shown in the image below. Also, airdrop some sol in your account and display the public key and the balance.
  • Insert a new text file in the Task-5 folder with your name, and provide your wallet address in that text file.

PS: Attach the screenshot while submitting the PR, and make sure that the ss looks exactly like the one attached below, that is commands used should be hidden.
Note: A text file named tanmay.txt is present in that folder for your reference.



Feel free to ping us in our discord channel in case of any doubts.

Transferring sol and understanding transactions on Solana

OPEN TO ALL.
NO need to claim this issue.


  • Set up the Phantom Wallet and transfer test sols to your account after switching it to the devnet.

  • Send 0.1 sol to the below-mentioned account from your Phantom wallet

    hd8pVhXSRx3K5TEKus9PP3CkQ95E9UUcDmc6H9S7eFH

  • Insert a new text file in the Task-6 folder of this repo with your name, and provide the following details of the above transaction in that text file -
    Signature:
    Slot:
    Timestamp:
    Nonce:

Note: A text file named tanmay.txt is present in that folder for your reference.


PS: Everything needs to be done on devnet.
Feel free to ping us in our discord channel in case of any doubts.

Random Keypair

Create a const variable mintKeypair of the type Keypair , (we imported it in util.ts :- import {Keypair} from โ€˜@solana/web3.jsโ€™ ) , in NFT_RUST/app.ts , that would store a newly generated valid keypair which is also unique.

Building generative NFTs

We will be building generative NFTs using a tool known as the Hashlips Art Engine. Switch to the hashlips_art_engine directory and do the following tasks before generating NFTs.

Procedure-

  1. Locate the layers folder and inside it change the rarity weight of various assets/ layers as mentioned using the rarity delimiter '#'-
  • Bottom lid: High- 30%, Low- 40%, Middle- 30%.
  • Eye color: Cyan- 10%, Green- 10%, Pink- 10%, Purple- 20%, Red- 20%, Yellow- 30%.
  • Eyeball: Red- 70%, White- 30%.
  • Iris: Large- 25%, Medium- 50%, Small- 25%.
  • Top lid: High- 20%, Low- 40%, Middle- 40%.
  1. Now, switch to the config.js file inside the src folder of the cd. All the further changes need to be done only inside this file.
  2. Set the network to Solana.
  3. Mark the symbol as AOE and set the royalty percentage to 6%.
  4. Add the creators and their respective shares in the metadata. Use the following wallet addresses to add them with each of them having equal shares-
  • hd8pVhXSRx3K5TEKus9PP3CkQ95E9UUcDmc6H9S7eFH

  • Dq9SmVjaRpH5Bec5n8KoZALcVgbqQAJ6SnGw6SUMuQCZ

  1. Two kinds of layer orders need to be set up inside the layerConfigurations, with the first kind of layer producing 15 artworks and the second layer another 10 artworks-
  • Background, Eyeball, Eye color, Iris, Shine, Bottom lid, Top lid.
  • Background, Eyeball, Eye color, Iris, Top lid, Bottom lid, Shine.
  1. Specify the height: 600 px. and width: 600 px. of the NFTs.
  2. Fill the ratio of the pixels as 3/128.

Finally, after following the above procedure generate the NFTs, and our outputted art will be in the build/images directory and the json in the build/json directory.


Feel free to ping me on our discord channel if you have any doubts.

Stake account

OPEN TO ALL.

NO need to claim this issue.

  • Create a stake account which will be undelegated and paste the following screenshot in the PR. Also, paste the STAKE_ACCOUNT_ADDRESS in the TASK - 44 folder inside a txt file of your name .

PS: Attach the screenshot while submitting the PR, and make sure that the ss looks exactly like the one attached below, that is commands used should not be visible.
Note: A text file named srijan.txt is present in that folder for your reference.

image

Feel free to ping us in our discord channel in case of any doubts.

Pull the changes before progressing for the issue.
Resource : https://docs.solana.com/cli/delegate-stake

Complete the invoke instruction

Complete the invoke instruction for mint_to and create_account in ../src/lib.rs .

Include all these for mint_to :
token_program_id ,
mint_pubkey ,
account_pubkey ,
owner_pubkey ,
signer_pubkeys ,
amount

And, Include all these for create_account :
from_pubkey ,
to_pubkey ,
lamports ,
space ,
owner

Take the help of other completed invoke instructions !

Initiate Program Execution

Write command { macro(i.e. !) has to be a part of that command } to begin program execution in ../src/lib.rs , which calls the necessary function to process the program instructions , as we do not have a main function here .

Add Attributes

Add attributes( i.e. _program_id and accounts , of the same name as just specified ) to process_instruction in ../src/lib.rs using parameters of the use statements at the beginning of ../src/lib.rs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.