Open alvin-reyes opened 1 year ago
Open to any discussion if this idea is viable or worth doing. Its a good way to learn solidity and how we can integrate whypfs.
estuary.sol will have functions like pinToEstuary, makeDealsForCid etc but it'll only use the IPFS hash of the compute docker image to pass the CID.
pinToEstuary
makeDealsForCid
are a good start, what do you think about for renewing deals? since real renewal doesn't exist, making new deals is still acceptable.
For this, we can add a renew(to date) payable
function. We can create a struct inside the contract to store the date when the deal will expire, deposit the pay to a dev
address. The job then gets the renewal request from a public function which Estuary will call a function similar to/pinning/pins
to renew the deal for the CID. (we will need to add an end date).
Idea/Proposal: Estuary on FEVM
Proposal/Overview
Create a estuary.sol that wraps some functions of estuary. This idea might not be the best way but still worth trying.
The design is to allow solidity developers to pin cids and record their request on chain via a standard estuary abstract contract and a estuaryfevm specific js to launch external compute service that will run the pinning / estuary process.
Components:
The clear assumption here is that we cannot pass a file to solidity but we can pass a CID that we pinned from an WHYPFS node (cid).
HL steps of implementation:
pinToEstuary
,makeDealsForCid
etc but it'll only use the IPFS hash of the compute docker image to pass the CID.pinToEstuary(cid)
), it calls the IPFS hash of the compute docker image, passes the CID to the compute docker image and perform the "centralized service" to pin the CID. The IPFS instance can be a WASM compiled component that can run on a browser (on the DAPP).We will have to force the user to use estuaryfevm.js. the JS file checks the ABI to see the tagged function
estuaryFevmRequest