-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I am looking to deploy Walletbeat onchain. Today, Walletbeat lives on IPFS at beta.walletbeat.eth. I would like it to be possible for users to also access it at web3://beta.walletbeat.eth.
Because Walletbeat already uses IPFS providers for hosting, I would like to not additionally have to pay to put the same data onchain. ERC-5219 documents and recommends the use of message/external-body in the response in order to point to IPFS resources. Per the example on ERC-5219, the contract's request function can return this to point to an IPFS resource:
statusCode: 200
body: THIS IS NOT REALLY THE BODY!
headers:
- key: Content-type
value: message/external-body; access-type=URL; URL="ipfs://11148a173fd3e32c0fa78b90fe42d305f202244e2739"
I believe web3url-gateway should support such responses per the ERC-5219 spec. This could either be configured to query an IPFS daemon for the resource, or (more ugly but easier to implement) query an IPFS-HTTP gateway and forward the resulting response.
This would help most DeFi frontends that already have an IPFS version to easily support being accessed over web3:// URLs, with minimal need to change their deployment pipeline; all they would need to do for website updates is to update their ERC-5219 smart contract to point to a new IPFS bundle hash.