0

My company asked me to save complex data structures on a Polygon blockchain. I’m planning to use IPFS to store the JSONS modelling my items and create a smart contract to keep the references to IPFS resources.

I can only find tutorials to do this with an ERC721 or ERC1155 smart contracts, but in my scenario this is not a requirement. Is there a tutorial that I can follow to implement such architecture?

I want to make the writes on blockchain and on IPFS atomics using the SAGA pattern, where the service responsible to manage the SAGA is a Spring Boot service backed by a PostgreSQL database and every step of the SAGA fires an event using the transactional outbox pattern attaching a Kafka connect DEBEZIUM plugin to the database.

Is this a suitable solution? Thank you

1 Answer 1

0

You can store anything you want on the blockchain if you write the contract for it, but the only problem is that blockchains are not great at storing large pieces of data. For one the gas can get expensive, but even more so the person writing to the contract might have trouble with transactions not going though because of gas estimations. IPFS was born out of this necessity of needing an immutable and addressable way to share files that could be tied to the blockchain. The majority of content on IPFS is actually json files, whether its NFT metadata or defi info or just about anything else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.