engineer-dao / platform

The EngineerDAO dApp for interacting with job contracts
engineer-dao-platform.vercel.app
6 stars 4 forks source link

Store the JobMetaData object on IPFS and put only the ipfs hash on chain #35

Closed indeavr closed 2 years ago

indeavr commented 2 years ago

Storing big stringified objects on chain isn't optimal and leads to unnecessary gas costs.

IMO we should upload & pin the metadata on IPFS first before submitting only the hash to postJob(). moralis / nftport / nft.storage - all have convenient helpers.

Moralis Docs

The postJob contract function should be constrained to only accept ipfs hashes.

indeavr commented 2 years ago

IPFS urls can be used for the dispute resolvement as well -> as the reason

deweller commented 2 years ago

Infura also has an IPFS API

deweller commented 2 years ago

Infura's API is immature and does not support deleting content. Going with Pinata as a proof of concept for now.