top | item 34173979

Show HN: fallback() – write web apps in Solidity and serve HTTP over Ethereum

9 points| 18nleung | 3 years ago |github.com

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/

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...

1 comment

order

tdba|3 years ago

How expensive would it be to deploy a moderate sized webapp like this to ethereum mainnet?