I created a site with the help of ipfs, my goal is to create a smart contract with the ipfs CID of this site. but i have no idea about this, can anyone help?
1 Answer
You can reference the site using a string variable inside of a smart contract. I'm not sure what you mean by "create a smart contract with the ipfs CID of the site". Smart contracts have no native way of interacting with ipfs and no notion of CIDs, but you can put a public variable into the site to reference the smart contract if you want.
If what you mean is you want to connect your ipfs website to a smart contract, you have it backwards. The ipfs site will need to connect to a blockchain through a web3 provider, and can then launch transactions on behalf to users to that smart contract/blockchain using the web3 provider.