Marketplace has dependencies on multiple technologies.
-
run
npm installto install dependencies -
In the root folder of the application create a
.env.developmentfile with following content:
NEXT_PUBLIC_NETWORK_ID=5777
NEXT_PUBLIC_TARGET_CHAIN_ID=1337
NEXT_PUBLIC_PINATA_DOMAIN=https://gateway.pinata.cloud
SECRET_COOKIE_PASSWORD={your custom at least 32 characters long password!}
PINATA_API_KEY={your api key from pinata}
PINATA_SECRET_API_KEY={your api secret key from pinata}
- (your api pinata key has to allow
pinFileToIPFSandpinJSONToIPFSrules)
- Then migrate a contract to Ganache, contract can be found in the
contractsfolder. It's calledNftMarket.sol
-
To migrate the contract run
truffle migratein the terminal while Ganache network is setup and running. -
Do not forget to link
trufle-config.jswith Ganache, just go toconfigand clickAdd Project -
keys.jsonmust be created if you want to deploy to Ropsten, if not, just remove import ofkeys.jsonfromtrufle-config.jsand also comment outropstenconfiguration
- Now everything is setup and you can test out the app.
- Run
npm run devin the terminal. App will run atlocalhost:3000