Show HN: fallback() – write web apps in Solidity and serve HTTP over Ethereum
9 points| 18nleung | 3 years ago |github.com
Here’s a demo web app on the Optimism Goerli testnet: http://simple.fallback.natecation.xyz/
Running this Solidity code: https://github.com/nathanhleung/fallback/blob/main/src/examp...
There’s a lightweight TCP server script that’s listening on the demo app domain that forwards requests to the blockchain and sends the responses back.
The smart contracts take advantage of Solidity's fallback()[1] function to interpret the input data to the contract as an HTTP request rather than an ABI-encoded function call.
Would love to hear your thoughts in the comments below!
Docs: https://fallback.natecation.xyz/
Github: https://github.com/nathanhleung/fallback
[1] https://www.oreilly.com/library/view/learn-ethereum/97817899...
tdba|3 years ago