🏪 NFT Pawn Shop 🏪 Visit it!
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.
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.
⚓ 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.
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.
This repository consists of both the smart contract and the web interface.
This project is initialized usinganchor init
command.
The web interface is located inapp/
folder.
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.
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/
You can build the program.
anchor build
You can also run the tests.
anchor test
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
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.