RIF Storage Pinning service - Local setup with storage dev CLI
This guide is quite advanced and assumes a greater knowledge of how to setup local blockchain environment, IFPS, etc.
- Storage Smart Contracts: github.com/rsksmart/rif-marketplace-storage
- Storage Development CLI: github.com/rsksmart/rif-storage-cli
- Clone all repos, run
- Start up Ganache
- In Smart Contracts repo using
truffle deploydeploy contracts and take note of the
- Go to Storage Development CLI and create an Offer for the given contract address (use the
npm run binscript)
- Go to Pinning Service repo and configure it to use the deployed contract. You can use environment variables,
local.jsonor CLI parameters for this.
npm run init- this will bootstrap IPFS repos in
.reposfolder and configure the ports settings.
- In one tab run
npm run ipfs:consumer daemon
- In another tab run
npm run ipfs:provider daemon
- Create Offer. Suggested way is using the Storage Development CLI. Use
npm run binand don't forget to configure the correct contract address. Note the Offer ID (which is the address of your RSK account from which you have created the Offer)
npm run bin -- --offerId <offerId>to start the service.
Consumer IPFS API runs on
Provider IPFS API runs on