Example NFT marketplace project using ink! smart contract.

Overview

NFT Marketplace project

This contract is an example for the NFT marketplace implementation.

License

Apache 2.0

πŸ—οΈ How to use - Contracts

πŸ’« Build

Clone project

git clone [email protected]:swanky-dapps/marketplace.git

Navigate yourself to marketplace directory

cd marketplace/contracts/marketplace
cargo contract build
πŸ’« Run unit test
cargo test
πŸ’« Deploy

First start your local node. Recommended swanky-node v1.0.0

cargo ??
  • or deploy polkadot JS. Instructions on Astar docs
πŸ’« Run integration test

First start your local node. Recommended swanky-node v1.0.0

yarn
yarn compile
yarn test
πŸ’« Deployed contracts

TBA


πŸ—οΈ How to use - UI

Image - GIF Link to UI - how to use

Build local

yarn ...

links

link to vercel deployed website

You might also like...
clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

Testing a smart contract on the Solana blockchain

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) β›πŸ‘·πŸš§βš οΈ
Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) β›πŸ‘·πŸš§βš οΈ

Solana BPF Boilerplate Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana This boilerplate provides the following. Si

Smart Contract for Terra Name Service

TERRA NAME SERVICE CONTRACTS Terra Name Service is to create easy-to-remember names for your Terra address like β€˜dokwon.ust’ instead of β€˜terra1...whez

Emerging smart contract language for the Ethereum blockchain.

Emerging smart contract language for the Ethereum blockchain.

Vectis - Smart Contract Wallet

A smart contract wallet project to add functionality for users of DApps to manage their keys by allowing for recovery and account freeze, whilst preserving user control, and enabling relayer capability for gas provisioning

Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it

CoinSwap is a Smart Contract that is built on the terra blockchain and can be used to swap cryptocurrencies such as LUNA, UST, TerraUSD, Anchor, Mirror Protocol, LUNI and other CW20 tokens. The Project also contains a smart contract which works as a analysis tool for the gas fees on the Terra Blockchain.

Heimdall is an advanced Ethereum smart contract toolkit for forensic and heuristic analysis.
Heimdall is an advanced Ethereum smart contract toolkit for forensic and heuristic analysis.

Heimdall is an advanced EVM toolkit which aims to make dealing with smart contracts on EVM based chains easier. Installation & Usage Heimdall's update

Comments
  • Marketplace contract implementation

    Marketplace contract implementation

    This is PR for initial implementation of the NFT marketplace contract with the following features:

    • factory - creates a new instance of Shiden34 contract and registers the instance to the Marketplace. Caller needs to provide link to IPFS metadata file for NFT and some NFT details. Prerequisite for the factory is that Shiden34 contract is deployed to a network and the contract hash is provided to the Marketplace via set_nft_contract_hash call.
    • register - registers an existing contract to the Marketplace. This operation can be performed by contract or marketplace owner.
    • list - Lists a NFT for sale on the marketplace. This operation can be performed by a token owner.
    • unlist - Un-lists a NFT from the marketplace. This operation can be performed by a token owner.
    • buy - Transfers a token ownership to the caller. Also pays royalties and marketplace fees predefined receivers.
    opened by bobo-k2 6
  • MarketPlace does not emit any events

    MarketPlace does not emit any events

    The exported data told me there is no event emitted for the whole marketplace.

    The minimum I have out of my head

        /// should be also emitted for unlist
        #[ink(event)]
        pub struct TokenListed {
            #[ink(topic)]
            contract: AccountId,
            #[ink(topic)]
            id: Id,
            #[ink(topic)]
            price: Option<Balance>,
        }
        
        /// price 'cause user can send more
        #[ink(event)]
        pub struct TokenBought {
            #[ink(topic)]
            contract: AccountId,
            #[ink(topic)]
            id: Id,
            #[ink(topic)]
            price: Balance,
        }
        
        /// can be also emitted for factory
         #[ink(event)]
         pub struct CollectionRegistered {
            #[ink(topic)]
            contract: AccountId,
            metadada: Bytes
        }
    
    export type Event = never
    
    export type Message = Message_MarketplaceSale_unlist | Message_MarketplaceSale_register | Message_MarketplaceSale_buy | Message_MarketplaceSale_set_marketplace_fee | Message_MarketplaceSale_set_fee_recipient | Message_MarketplaceSale_get_price | Message_MarketplaceSale_list | Message_MarketplaceSale_factory | Message_MarketplaceSale_get_max_fee | Message_MarketplaceSale_get_registered_collection | Message_MarketplaceSale_get_marketplace_fee | Message_MarketplaceSale_set_nft_contract_hash | Message_MarketplaceSale_get_fee_recipient | Message_MarketplaceSale_set_contract_metadata | Message_MarketplaceSale_nft_contract_hash
    opened by vikiival 1
  • no matching package named `pallet_payable_mint` found

    no matching package named `pallet_payable_mint` found

    I was trying to build the project #5

    but seems like some dependency is missing

    2023-01-22T19:20:30.472966Z  INFO cargo_contract::util: Invoking cargo: "/Users/vikival/.rustup/toolchains/nightly-2022-08-15-aarch64-apple-darwin/bin/cargo" "build" "--target=wasm32-unknown-unknown" "-Zbuild-std" "--no-default-features" "--release" "--target-dir=/Users/vikival/Documents/Work/KodaDot/marketplace/target/ink/marketplace" "--features=ink_env/ink-debug"
        Updating crates.io index
        Updating git repository `https://github.com/Supercolony-net/openbrush-contracts`
        Updating git repository `https://github.com/Supercolony-net/pallet-assets-chain-extension`
        Updating git repository `https://github.com/swanky-dapps/nft`
    error: no matching package named `pallet_payable_mint` found
    location searched: https://github.com/swanky-dapps/nft
    required by package `shiden34 v0.2.0 (/private/var/folders/tw/g2bzmzdn51q9v0z03y3nb9fr0000gn/T/cargo-contract_YmbDpK/contracts/shiden34)`
        ... which satisfies path dependency `shiden34` of package `pallet_marketplace v0.2.0 (/private/var/folders/tw/g2bzmzdn51q9v0z03y3nb9fr0000gn/T/cargo-contract_YmbDpK/logics)`
        ... which satisfies path dependency `pallet_marketplace` of package `marketplace v0.2.0 (/private/var/folders/tw/g2bzmzdn51q9v0z03y3nb9fr0000gn/T/cargo-contract_YmbDpK/contracts/marketplace)`
    ERROR: `"/Users/vikival/.rustup/toolchains/nightly-2022-08-15-aarch64-apple-darwin/bin/cargo" "build" "--target=wasm32-unknown-unknown" "-Zbuild-std" "--no-default-features" "--release" "--target-dir=~/marketplace/target/ink/marketplace" "--features=ink_env/ink-debug"` failed with exit code: Some(101)
    
    opened by vikiival 0
  • Unable to Init smart contract via factory

    Unable to Init smart contract via factory

    I have problems with calling factory function on the marketplace contract.

    I though first time that I did not set contract hash but the error is still there.

    Built with latest main at hash 0xedf9dde8b7c52a23ef3972268217a92f3c356707388aaa68a3952e31973797c3

    Failed Txs https://shibuya.subscan.io/account/Z7rYZFFCFt9B2cv692TSWnxTKM1CYnoukBhxUd39ajsYWTe

    Example of call:

    Screenshot 2023-01-23 at 13 28 21

    The supplied hash of RMRK smart contract

    0xd22f1aabf3d04bfba1ef5d0b5a5e1fa4764df7224afd1ee1422a8344a54b490f

    opened by vikiival 2
Owner
Swanky dApps
Swanky dApps
The Ink! smart contract SDK for XVM interface

Ink! XVM SDK The Ink! smart contract SDK for XVM interface. This SDK contains contract wrappers and all middleware code to make XVM development easy.

Astar Network 13 Jan 3, 2023
NFT & Marketplace Contracts with royalties and fungible token support. Sample React app included.

NFT Market Reference Implementation A PoC backbone for NFT Marketplaces on NEAR Protocol. Reference Changelog Changelog Progress: basic purchase of NF

NEAR App Examples 156 Apr 28, 2022
Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketplace app to a custom domain, ultra fast.

null 30 Dec 15, 2022
Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

Solana_Marketplace_HerosNFT The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketpla

null 30 Dec 15, 2022
The NFT smart contract powering xyz on Terra

xyz NFT Contract This repository contains the core NFT smart contract that implements xyz, a base layer for metaverses on the Terra blockchain. The xy

null 16 Sep 25, 2022
A Simple Rust NFT API + Smart Contract

Rust NFT API Purpose Rust NFT API is a simple RESTful API developed in Rust that offers functionalities for creating, retrieving, and listing Non-Fung

Luis Soares 5 Feb 25, 2024
An example smart contract that builds on top of xyz

xyz Guestbook Tutorial Contract This repository contains an example smart contract that illustrates how to build on top of the xyz NFT contract. This

null 5 Apr 4, 2022
A simple example demonstrating cross-contract calls in CosmWasm smart contracts

Cross-contract calls This tutorial demonstrates cross-contract calls with CosmWasm v1. Overview An end user calls the reservation contract to register

csli Tools 3 Sep 12, 2022
zink! is a library for developing ink! smart contracts with useful Rust macros that extend functionality and reduce boilerplate code.

zink! Smart Contract Macros This is a helper library for developing ink! smart contracts. It contains useful Rust macros that extend functionality and

Scio Labs 3 Nov 3, 2023
Example of a SC coded in RUST that can safely perform any swaps of tokens (NFT, SFT, ESDT, MetaESDT)

Elrond-NFT-Trading Example of a Smart Contract (SC) coded in RUST, that can perform any swaps of tokens (NFT, SFT, ESDT, MetaESDT) The idea P2P swaps

Sia 3 May 17, 2022