Skip to content

This repository contains the smart contract and the web interface of NFT Pawn Shop.

License

Notifications You must be signed in to change notification settings

berzanorg/nft-pawn-shop

Repository files navigation

🏪 NFT Pawn Shop 🏪 Visit it!

What Is NFT Pawn Shop?

It is a decentralized application & a standard for the entire Solana ecosystem.

The prototype is first developed for a local Solana hackathon as a team.
But a production version is developed for Backdrop's hackathon by me, Berzan.
I'd like to thank my team members for their support.

Why Does It Exist?

It allows NFT owners to borrow money using their NFTs as collateral.
It allows crypto holders to lend their crypto and earn interest.
Any dapp and NFT marketplace can integrate it to provide the same services.

nft pawn shop logo

What Technologies Are Used?

⚓ We used Anchor framework to develop the smart contract.
⚛️ We used React with Next.js to develop the web interface.
🌬️ We used TailwindCSS to rapidly style the website without ever leaving HTML.

Who Are The Team Members?

Emre: A blockchain & AI developer for a very long time.
Zeyn: The youngest in the team but the oldest in the meme game.
Berzan: A developer and a proud crypto ecosystem member.
Omer: A Rust developer working on various blockchains.

💻 Development 💻

This repository consists of both the smart contract and the web interface.
This project is initialized using anchor init command.
The web interface is located in app/ folder.

How To Setup The Environment?

Node.js, Yarn, Rust, Solana and Anchor are required.
You can locally install them all, however we recommend you to use Dev Containers.
It is the fastest way to setup a development environment.
If you already have VS Code and Docker installed, VS Code will warn you to open the project in a Dev Container.
We also added some extensions to improve your development experience in the Dev Container.

How To Start Developing?

1 - First you have to clone the repository.

git clone https://github.com/solana-devs/nft-pawn-shop.git

2 - Secondly set the working directory.

cd nft-pawn-shop/

How To Develop The Smart Contract? (A Program In Solana's Jargon)

You can build the program.

anchor build

You can also run the tests.

anchor test

How To Deploy The Progam To Solana Devnet?

If you want to deploy the program, you have to replace the program ID.
Get the address from the keypair.

solana address -k target/deploy/nft_pawn_shop-keypair.json 

After running this command copy the address it printed.
Then replace the address in Anchor.toml and programs/nft-pawn-shop/src/lib.rs files.

Change configuration to use devnet as default.

solana config set --url devnet

Request some worthless (but worthy for devs) SOL to deploy.

solana airdrop 4

Finally you can deploy the program to Solana Devnet.

anchor deploy

How To Develop The Web Interface?

The web interface resides in app/ folder.
So you have to set the working directory as below.

cd app/

It is a classical Next.js project.
So you can be familiar with the commands.

Install dependencies.

npm install

Start the development server.

npm run dev

Make a production build.

npm run build

❤️ Made with love by Omer, Berzan, Emre, and Zeyn.

About

This repository contains the smart contract and the web interface of NFT Pawn Shop.

Topics

Resources

License

Stars

Watchers

Forks