• This repository has been archived on 15/Sep/2022
  • Stars
    star
    193
  • Rank 201,081 (Top 4 %)
  • Language
    JavaScript
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample metadata API for crypto collectibles, written in Node.js

Sample Metadata API for Non-Fungible Tokens (NFTs)

Use this repo to make an API for serving metadata about your tokens (ERC-721 or ERC-1155) to marketplaces like OpenSea and other third parties.

Metadata for each token can include an image, animation, attributes, scalar properties, boost properties, and more!

Deploy

Getting Started

Requirements

You need node.js (8.11.* or later) and npm installed. If you want to do a Heroku deployment, download and install the Heroku CLI and run heroku login locally.

  1. Click the Deploy to Heroku button above to instantly get it up and running somewhere. You can pick the URL! For this example, let's say that it's your-metadata-api.herokuapp.com.
  2. Run heroku git:clone -a your-metadata-api, and cd into your new directory.
  3. Run npm install.
  4. Save the Heroku URL you picked into src/constants.js as the HOST variable (e.g. https://your-metadata-api.herokuapp.com). This is the root URL for the tokens on your contract.
  5. Deploy to Heroku by committing your changes and using git push heroku master.
  6. Visit your token's metadata at https://your-metadata-api.herokuapp.com/api/token/1 (for token 1).

Minting Tokens

Here's a tutorial on setting up a mintable NFT contract. Alternatively, you can have your buyers mint the tokens for you (and pay the gas to do that) at purchase-time, using the OpenSea Crowdsale Tutorial.

Now that you a contract and a token URI for each of your tokens, there's a nice mint.js script that you can run locally to mint them on a testnet like Rinkeby and on mainnet Ethereum.

If you want more control over the minting process, call _setTokenURI on your NFT's contract using the URL pattern above, either directly if you exposed that method for the contract owner, or by minting new tokens using mintWithTokenURI.

Selling Tokens

If you're signed into MetaMask as the owner of your contract, you can click the "SELL" button on any asset to sell it immediately on OpenSea, using Dutch (declining price), English (to the highest bidder), and fixed-price auctions.

Selling in Bulk

You can also use the OpenSea.js SDK to create sell orders. You can create sell orders in bulk if you followed the Crowdsale Tutorial above.

Troubleshooting

If you have questions, visit our developer documentation here. We're very responsive!

More Repositories

1

opensea-js

TypeScript SDK for the OpenSea marketplace
TypeScript
2,278
star
2

seaport

Seaport is a marketplace protocol for safely and efficiently buying and selling NFTs.
Solidity
2,141
star
3

opensea-creatures

Example non-fungible collectible, to demonstrate OpenSea integration
JavaScript
1,167
star
4

opensea-erc1155

Example semi-fungible collectible, to demonstrate OpenSea integration for an ERC-1155 contract
JavaScript
605
star
5

embeddable-nfts

Easily embed OpenSea listings in your website!
TypeScript
329
star
6

operator-filter-registry

Solidity
311
star
7

seadrop

Smart contracts for primary drops on EVM chains
Solidity
290
star
8

seaport-js

A TypeScript library to interface with the Seaport marketplace.
TypeScript
255
star
9

opensea-whitelabel

Easily whitelabel an OpenSea marketplace for your own website
TypeScript
226
star
10

stream-js

A TypeScript SDK to receive pushed updates from OpenSea over websocket.
TypeScript
166
star
11

seaport-gossip

A peer-to-peer network for sharing Seaport orders.
TypeScript
125
star
12

metadata-api-python

Simple API for serving ERC721 metadata
Python
117
star
13

nft-tutorial

A very basic NFT tutorial repository for absolute beginners in the world of Web3 and smart contracts
JavaScript
96
star
14

marketplace-benchmarks

A comparison supported features and respective gas overhead for NFT marketplaces
Solidity
70
star
15

meta-transactions

Solidity
49
star
16

seaport-order-validator

Seaport Order Validator provides a simple method for validating and diagnosing Seaport orders
Solidity
48
star
17

shipyard-core

Solidity
48
star
18

seaport-core

Core Seaport smart contracts
Solidity
45
star
19

SIPs

The Seaport Improvement Proposal repository
31
star
20

ethmoji-contracts

Ethmoji smart contracts
JavaScript
22
star
21

seaport.py

Python
21
star
22

seaport-sol

Solidity helpers for working with Seaport on and off-chain using Forge scripts
Solidity
21
star
23

ships-log

An example dapp listing recent auctions and bids on OpenSea, with the ability to buy items or accept offers right from the page.
JavaScript
20
star
24

seaport-1.6

A unified repo containing the core Seaport contracts, types, tools, and tests to facilitate Seaport 1.6 development
Solidity
20
star
25

ethmoji-js

SDK for Ethmoji blockchain avatars
JavaScript
19
star
26

opensea-stream-discord-webhook

A sample repo showing how a developer using the OpenSea Stream API might be able to connect a Discord webhook to send messages whenever new events occur for a collection
TypeScript
18
star
27

0x-fee-wrapper

Solidity
16
star
28

shipyard

Template Repo for OpenSea smart contract development
Solidity
13
star
29

redeemables

EVM smart contracts for redeemables and dynamic traits
Solidity
12
star
30

seaport-types

Standalone structs and interfaces related to Seaport
Solidity
12
star
31

tstorish

Use TSTORE in contracts deployed to multiple chains with varying opcode support
Solidity
11
star
32

ethdenver-workshop

Devcon 5 workshop
JavaScript
10
star
33

seaport-generic-adapter

A proof of concept Seaport app that enables fulfilling non-Seaport listings through Seaport.
Solidity
10
star
34

seaport-deploy

A utility for deploying Seaport to local chains for use in testing.
Solidity
9
star
35

seaport-hooks

A collection of various Seaport Hooks (zone hooks, contract hooks, and item hooks): https://docs.opensea.io/docs/seaport-hooks
5
star
36

ethmoji-js-demo

JavaScript
5
star
37

jellyfish

Build UIs as state machines using Compose.
Kotlin
5
star
38

buy-sell-opensea-sdk-demo

https://docs.opensea.io/docs/buy-sell-nfts
TypeScript
3
star
39

vercel-repros

TypeScript
1
star