Skip to content

Binwakil/nft-archiverse

Repository files navigation

ARCHIVERSE NFT MARKETPLACE

Welcome to ARCHIVERS NFT MARKETPLACE

Archiverse is an NFT marketplace for architectural designs on the #near chain. It allows architects to mint 3D structures of buildings as an NFT and sell detailed architectural documents to the buyer. Unlike other forms of NFT markets that allow people to buy and sell art. Archiverse allows architects to literary sell the detailed design documents that contain the complete structure of the design to the customers, by minting the 3D design as an NFT and storing the Detailed Document on IPFS, encrypting its reference, and attaching it to the NFT as an extra. When a buy purchase the NFT the reference is decrypted and the detailed design is made available to him.

Quick-Start

If you want to see the full completed contract go ahead and clone and build this repo using

git clone https://github.com/Binwakil/nft-archiverse.git 
yarn build

Now that you've cloned and built the contract we can try a few things.

Mint An NFT

Once you've created your near wallet go ahead and login to your wallet with your cli and follow the on-screen prompts

near login

Once your logged in you have to deploy the contract. Make a subaccount with the name of your choosing

near create-account nft-example.your-account.testnet --masterAccount your-account.testnet --initialBalance 10
near create-account market-example.your-account.testnet --masterAccount your-account.testnet --initialBalance 10

After you've created your sub account deploy the contract to that sub account, set this variable to your sub account name

NFT_CONTRACT_ID=nft-example.your-account.testnet
MARKET_CONTRACT_ID=nft-example.your-account.testnet
MAIN_ACCOUNT=your-account.testnet

Verify your new variable has the correct value

echo $NFT_CONTRACT_ID
echo $MARKET_CONTRACT_ID
echo $MAIN_ACCOUNT

Deploy Your Contract

near deploy --accountId $NFT_CONTRACT_ID --wasmFile out/main.wasm
near deploy --accountId $MARKET_CONTRACT_ID --wasmFile out/market.wasm

Initialize Your Contract

near call $NFT_CONTRACT_ID new_default_meta '{"owner_id": "'$NFT_CONTRACT_ID'"}' --accountId $NFT_CONTRACT_ID

View Contracts Meta Data

near view $NFT_CONTRACT_ID nft_metadata

Minting Token

near call $NFT_CONTRACT_ID nft_mint '{"token_id": "token-1", "metadata": {"title": "My Non Fungible Team Token", "description": "The Team Most Certainly Goes :)", "media": "https://bafybeiftczwrtyr3k7a2k4vutd3amkwsmaqyhrdzlhvpt33dyjivufqusq.ipfs.dweb.link/goteam-gif.gif"}, "receiver_id": "'$MAIN_ACCOUNT'"}' --accountId $MAIN_ACCOUNT --amount 0.1

After you've minted the token go to wallet.testnet.near.org to your-account.testnet and look in the collections tab and check out your new sample NFT!

View NFT Information

After you've minted your NFT you can make a view call to get a response containing the token_id owner_id and the metadata

near view $NFT_CONTRACT_ID nft_token '{"token_id": "token-1"}'

Transfering NFTs

To transfer an NFT go ahead and make another testnet wallet account.

Then run the following

MAIN_ACCOUNT_2=your-second-wallet-account.testnet

Verify the correct variable names with this

echo $NFT_CONTRACT_ID

echo $MAIN_ACCOUNT

echo $MAIN_ACCOUNT_2

To initiate the transfer..

near call $NFT_CONTRACT_ID nft_transfer '{"receiver_id": "$MAIN_ACCOUNT_2", "token_id": "token-1", "memo": "Go Team :)"}' --accountId $MAIN_ACCOUNT --depositYocto 1

In this call you are depositing 1 yoctoNEAR for security and so that the user will be redirected to the NEAR wallet.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages