This repo demonstrate how to upload a File using IPFS embedded go node and storing information using smart contracts
⭐ Based on "Standard Go Project Layout".
⭐ Use embedded IPFS node, so its easier to deploy as standalone service.
⭐ Simple way to install solc and abigen via make
⭐ It upload a file into IPFS node and then store file CID as smart contract into the blockchain
- clone the repo using: git clone
- exec: make
- setup local Ganache cli or UI
- update the etc/dev.env file
- exec: go run cmd/main.go
1.-- Running an embedded IPFS node on a tmp directory--
-- IPFS node is running successfully --
2.-- Adding test.pdf from the etc dir --
Added file to IPFS with CID: /ipfs/QmVDf2317mT4pPwg85G9XAvaRZLdFWNxoBqCQpw6bEmj4a
3.-- Deploying our CID storage smart contract into Ganache --
Deployed address: 0x75930c9E9492e76832cd163723c7ee3dd324427C --
4.-- Storing our CID into the blockchain --
5.-- Retrieving our CID from the blockchain --
We have successfully stored and retrieved the CID: /ipfs/QmVDf2317mT4pPwg85G9XAvaRZLdFWNxoBqCQpw6bEmj4a