Basechain
  • About Basechain
  • Base BigBang Language
    • Introduction
    • 1. Getting started
      • 1.1 Installing BigBangNet
      • 1.2 BigBang basics
    • 2. Type
      • 2.1 Primitives
      • 2.2 Sequences
      • 2.3 Composites
    • 3. Keywords
    • 4. Storing data
      • 4.1 Constants
      • 4.2 Variables
      • 4.3 Maps
    • 5. Functions
      • 5.1 Public functions
      • 5.2 Private functions
      • 5.3 Read-only functions
  • 6. Control flow & error handling
    • 6.1 Asserts
    • 6.2 Try
    • 6.3 Unwrap flavours
    • 6.4 Response checking
  • 7. Using BigBangNet
    • 7.1 Creating a new project
    • 7.2 Writing your first contract
    • 7.3 Interacting with your contract
    • 7.4 Testing your contract
  • 8. Practice projects
    • 8.1 Time-locked wallet
    • 8.2 Smart claimant
    • 8.3 Multi-signature vault
  • 9. Traits
    • 9.1 Defining traits
    • 9.2 Implement traits
    • 9.3 Passing traits as arguments
  • 10. Building a marketplace
    • 10.1 Setup
    • 10.2 Listing & cancelling
    • 10.3 Fulfilling listings
    • 10.4 Uni tests
  • 11. Runtime cost analysis
  • Nodes & Miners
    • Run a Node with Docker
    • Run a Node with DigitalOcean
    • Run a Node with a Hosted Provider
    • Base Node Configuration
    • Mine testnet Base tokens
    • Verify Miner
    • Miner costs and fees
  • Website
  • X(Twitter)
  • Github
Powered by GitBook
On this page

10. Building a marketplace

We have all the necessary tools to create our first full-fledged project. Given the current state of the cryptocurrency industry, an NFT marketplace would be an ideal choice. Marketplaces are highly sought after as they provide equal access to digital collectibles such as art, in-game items, virtual vouchers, and more. Blockchains offer open membership ledgers, and marketplaces provide a platform to trade assets on these ledgers freely.

The following are some of the features: Tiny Market is a minimal implementation that enables people to trustlessly list NFTs for sale. An NFT offering includes the NFT for sale,

the block height at which the listing expires, the payment asset, the NFT price in the payment asset, and an optional intended taker.

If set, only the principal mentioned will be able to fulfill the listing. This feature is useful if someone has found a buyer outside of the platform and wants to conduct a trade with just that person in a trustless manner.

The listing process does not involve any bidding or other complications. To create a listing, call the marketplace contract with the above information, and the contract will transfer the NFT and hold it in escrow for the duration of the listing. The seller has the option to cancel the listing and retrieve the NFT at any time. If a buyer decides to purchase the NFT, the marketplace will automatically process the payment and transfer the NFT. After a listing has expired, only the seller can retrieve the NFT from the marketplace.

Previous9.3 Passing traits as argumentsNext10.1 Setup

Last updated 1 year ago