Decentralised content management

Hi,

I am creating a medicines network using block chain where some users will upload medical content that can go into an IPFS using some javascript based Dapp and Moralis. Once the content is uploaded, then they can use a smart contract to mint a token with the token URI (IPFS address). I would like the smart contract have certain rules enforced before the mint process is called successful. For Example, the json format and particular mandatory fields inclusion when they upload file on IPFS before they are able to mint the tokens. If the rules of json are not met, then the token should not be minted. Can I do something in my smart contract to enforce those rules? I know that it could be a challenge to make the smart contract talk to the IPFS. But could I atleast check in my smart contract what they uploaded on the IPFS before minting their tokens. OR even can I do the IPFS upload through the smart contract?

If you want to check your IPFS from smart contract or upload it in the smart contract, best to use oracles such as Chainlink and possibly a custom backend to do the verification/uploading :raised_hand: keep in mind though Chainlink oracles are only available in Ethereum, BSC, and Polygon. That’s my 2 cents.

Cheers~

1 Like

Many Thanks for your reply. I think chainlink was the missing link in my thought process. I will go down that route and ty to achieve my objective.

Thanks again.

1 Like

Awesome! goodluck :fire: Happy BUIDL :rocket:

Hi YosephKS,

I would like to know if Oracle / chainlink options can be used with ERC721 which is the standard I used to write my smart contract.

Yes absolutely :raised_hands: as long as you keep all the function from ERC721 (to keep it’s compatibility to EIP712 standard) then it will stay as ERC721 contract, and you can inherit the Chainlink smart contract to have some chainlink functionality inside of it

Thanks for your help today,

I had another simple looking question. I am using Avalanche Block chain (testnet to be more specific), Does chainlink support