Skip to content

Latest commit

 

History

History
72 lines (58 loc) · 2.01 KB

README.md

File metadata and controls

72 lines (58 loc) · 2.01 KB

IPFS Metadata PoC

Requirements

  1. IPFS Node
    • Pre-Built
    • Source
  2. Node.js (11+)

/Client

Configure

index.html
line: 81
var local_server = "http://127.0.0.1:5000";

Set the local_server variable to the location of your server for this repo.

/Server

Configure

Copy tmp-env to .env: cp tmp-env .env
Configure .env

PORT='(INT)'
MNEMONIC='(FOR CONTRACT OWNER ACCOUNT {USE DEV WALLETS})'
INFURA_KEY='(INFURA API CODE)'
NFT_CONTRACT_ADDRESS='(CONTRACT ADDRESS)'
OWNER_ADDRESS='(OWNER ACCOUNT PUBLIC ADDRESS)'
NETWORK='(NETWORK {RINKEBY})'
IPFS_GATEWAY='(IPFS GATEWAY {https://ipfs.io/ipfs/ || https://ipfs.io/ipns/<ipns CID>/ || /ipfs/ || /ipns/<IPNS CID>})'
IPFS_LOCAL_STORAGE='(LOCAL IPFS STORAGE LOCATION)'
Start
node server

/contract

This contract sample is taken from OpenSea Creatures

Configure
Deploy Contract
export INFURA_KEY="<infura_key>"
export MNEMONIC="<metmask_mnemonic>"
truffle deploy --network rinkeby

Usage

  1. Open index.html in your web browser.
  2. Fill out the form fields.
  3. Submit the form.

TODO:

/server/ipfsNft.js

execShellCommand()

  • Catch error and stderr to quit execution and send error to client