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!
You need node.js (v16.16.* or later) and npm installed. If you want to do a Heroku deployment, download and install the Heroku CLI and run heroku login
locally.
- 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
. - Run
heroku git:clone -a your-metadata-api
, andcd
into your new directory. - Run
npm install
. - Save the Heroku URL you picked into
src/constants.js
as theHOST
variable (e.g.https://your-metadata-api.herokuapp.com
). This is the root URL for the tokens on your contract. - Deploy to Heroku by committing your changes and using
git push heroku master
. - Visit your token's metadata at https://your-metadata-api.herokuapp.com/api/token/1 (for token 1).
- To evolve your NFT over Time use the fuction levelOfToken, and set the Days you want for any given Level.
- To set the metadata of any given level use the database, and change it with your NFT metadata.
MORALISV3_API_KEY = <apiKeyV3>
MORALISV2_API_KEY = <apiKeyV2>
ADDRESSNFT = The NFT address
ADDRESSPROTOCOL = The Protocol Address
ADDRESSTOKEN = The underlying asset to fund the poool
SERVER_URL = https://<url>.usemoralis.com:2053/server
APP_ID =
MASTER_KEY =
Smart Contracts: https://github.com/th3nolo/SolidiTreeSmartContracts