Giter Site home page Giter Site logo

nft-archiverse's Introduction

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.

nft-archiverse's People

Contributors

binwakil avatar

Stargazers

 avatar

Watchers

 avatar

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.