Hi everyone ! I’m trying to put data on IPFS through a smart contract in Solidity. Does this already exist and if yes have a github ?
Orelse, is there any ressources I can use ? Thanks in advance !
1 Like
I don’t think you can do it with smart contract. IPFS is off-chain. You only put CIDs on chain
2 Likes
Currently this isn’t possible, but I believe there’s work to enable this kind of use case, e.g. Filecoin Storage Bridge - Ethereum~Filecoin and Textile unveils plans to bring native Filecoin storage to NEAR, ETH, Polygon, and others.
In the near future, the FVM (Filecoin Virtual Machine) will allow using smart contracts to create Filecoin stroage deals in addition to being able to run Solidity smart contracts through EVM support.
Currently the most common approach of using IPFS and Ethereum is to add data to IPFS and reference the CIDs in Solidity.
@Discordian has written a great blog post on storing those CIDs efficiently: Discordian's Blog
3 Likes