NFT Marketplace with Rust on Solana

Overview

NFT Marketplace with Rust on Solana

Compile and Deploy Contracts

  • make sure you have solana installed
  • make sure you have rust installed
  • install phantom wallet on the browser or any from the list
  • make sure u have a solana wallet with SOL token (devnet)
  • Config to devnet
solana config set --url devnet
  • Create wallet
solana-keygen new
  • Add test token to the wallet
solana airdrop 5

navigate to the rust folder

cd program

build the project

cargo build-bpf
  • After the build step completes, deploy the program to devnet
solana program deploy ./path/to/the_program.so -u devnet
  • Clear client/packages/web/.env variables to create of a fresh new store

  • start the app

cd ../client/packages
yarn && yarn bootstrap
yarn start

Open the site in a browser

http://localhost:3000
  • Now connect wallet
  • Create NFT
  • Sell NFT
You might also like...
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

馃悁 Building a federated alternative to reddit in rust

Lemmy A link aggregator / Reddit clone for the fediverse. Join Lemmy 路 Documentation 路 Report Bug 路 Request Feature 路 Releases 路 Code of Conduct About

Applied offensive security with Rust
Applied offensive security with Rust

Black Hat Rust - Early Access Deep dive into offensive security with the Rust programming language Buy the book now! Summary Whether in movies or main

Rholang runtime in rust

Rholang Runtime A rholang runtime written in Rust.

Easy-to-use optional function arguments for Rust

OptArgs uses const generics to ensure compile-time correctness. I've taken the liberty of expanding and humanizing the macros in the reference examples.

A language server for lua written in rust

lua-analyzer lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. T

Rust library that can be reset if you think it's slow

GoodbyeKT Rust library that can be reset if you think it's slow

Cargo - The Rust package manager

Cargo downloads your Rust project鈥檚 dependencies and compiles your project.

Comments
  • Error while doing cargo build-bpf

    Error while doing cargo build-bpf

    BPF SDK: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf cargo-build-bpf child: rustup toolchain list -v cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release Finished release [optimized] target(s) in 2.66s cargo-build-bpf child: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf/dependencies/bpf-tools/llvm/bin/llvm-readelf --dyn-symbols /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/fair_launch.so To deploy this program: $ solana program deploy /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/fair_launch.so The program address will default to this keypair (override with --program-id): /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/fair_launch-keypair.json BPF SDK: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf cargo-build-bpf child: rustup toolchain list -v cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release warning: unused import:solana_program::msg--> metaplex/program/src/state.rs:1:5 | 1 | use solana_program::msg; | ^^^^^^^^^^^^^^^^^^^ | = note:#[warn(unused_imports)]` on by default

    warning: metaplex (lib) generated 1 warning Finished release [optimized] target(s) in 1.52s cargo-build-bpf child: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf/dependencies/bpf-tools/llvm/bin/llvm-readelf --dyn-symbols /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/metaplex.so

    To deploy this program: $ solana program deploy /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/metaplex.so The program address will default to this keypair (override with --program-id): /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/metaplex-keypair.json BPF SDK: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf cargo-build-bpf child: rustup toolchain list -v cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release Compiling metaplex-auction v0.0.1 (/mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/auction/program) Finished release [optimized] target(s) in 7.95s cargo-build-bpf child: /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf/scripts/strip.sh /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/bpfel-unknown-unknown/release/metaplex_auction.so /mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/metaplex_auction.so /home/ammar/.local/share/solana/install/releases/stable-0592b5568fafe00a796f5dce54e8ec8eaa9678ea/solana-release/bin/sdk/bpf/dependencies/bpf-tools/llvm/bin/llvm-objcopy: error: '/mnt/d/Office/NFT-Marketplace-with-Rust-on-Solana/program/target/deploy/metaplex_auction.so': Operation not permitted`

    Getting this error while building cargo build-bpf. It has created the target folder and the following files inside the deploy folder in it:

    • fair_launch_keypairgen.json
    • fair_launch.so
    • metaplex_auction_keypair.json
    • metaplex_auction.so
    • metaplex.so
    • metaplex_keypair.json

    Any idea how to resolve it. I am on windows 10, using WSL2 within VSCode. Versions are:

    • solana-cli 1.8.12 (src:0592b556; feat:1006352700)
    • cargo 1.57.0 (b2e52d7ca 2021-10-21)

    Let me know if i should provide any other details I am missing here. Any idea why its happening ?

    opened by AmmarKhalid123 0
Owner
0x266428078283c86aAbdFC2c10ee84CAa4950918f
null
A variation of the solana helloworld program example with a client written in Rust instead of Typescript

Simple Solana Smart Contract Example This repository demonstrates how to create and invoke a program on the Solana blockchain. In Solana the word prog

zeke 56 Dec 26, 2022
The Voting example based on MoonZoon and Solana.

Voting example The Rust-only Voting example based on MoonZoon and Solana. MoonZoon is a Rust Fullstack Framework. Solana is a decentralized blockchain

Martin Kav铆k 26 Dec 8, 2022
Solana Escrow Program

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Nathan Ramli 0 Nov 12, 2021
01 Solana program application interface.

01 abi The abi is a repository for interfacing with the 01 program either through a rust client or through CPIs from another Solana program. Program A

Zero One Global Foundation 19 Oct 16, 2022
Minimalistic solana minter program if you don't want to use Metaplex

Minimalistic solana minter program The objective of this repository is to be only a minimalistic template for NFTs projects on Solana, so you can buil

Gabriel 23 Sep 6, 2022
First Git on Rust is reimplementation with rust in order to learn about rust, c and git.

First Git on Rust First Git on Rust is reimplementation with rust in order to learn about rust, c and git. Reference project This project refer to the

Nobkz 1 Jan 28, 2022
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Learn-rust - An in-depth resource to learn Rust 馃

Learning Rust ?? Hello friend! ?? Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

Lazar Nikolov 7 Jan 28, 2022
A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

Lightning Dev Kit 850 Jan 3, 2023
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

TheAwiteb 8 Dec 6, 2022