3 ms·
Show HN: fallback() – write web apps in Solidity and serve HTTP over Ethereum
Hi HN! I recently open-sourced a project I’ve been working on over my winter break: a Solidity web framework you can use to write web apps in Solidity (and more generally, a proof-of-concept implementation of an arbitrary network protocol over Ethereum).
Here’s a demo web app on the Optimism Goerli testnet: http://simple.fallback.natecation.xyz/ http://simple.fallback.natecation.xyz/
Running this Solidity code: https://github.com/nathanhleung/fallback/blob/main/src/example/SimpleExample.sol 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/ https://fallback.natecation.xyz/
Github: https://github.com/nathanhleung/fallback https://github.com/nathanhleung/fallback
[1] https://www.oreilly.com/library/view/learn-ethereum/9781789954111/0bc452a8-d2b7-477a-b64c-bf497af4b5b1.xhtml https://www.oreilly.com/library/view/learn-ethereum/97817899...
- tdba 4y agoHow expensive would it be to deploy a moderate sized webapp like this to ethereum mainnet?