TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

9 pointsby 18nleungover 2 years ago
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 <i>in Solidity</i> (and more generally, a proof-of-concept implementation of an arbitrary network protocol over Ethereum).<p>Here’s a demo web app on the Optimism Goerli testnet: <a href="http:&#x2F;&#x2F;simple.fallback.natecation.xyz&#x2F;" rel="nofollow">http:&#x2F;&#x2F;simple.fallback.natecation.xyz&#x2F;</a><p>Running this Solidity code: <a href="https:&#x2F;&#x2F;github.com&#x2F;nathanhleung&#x2F;fallback&#x2F;blob&#x2F;main&#x2F;src&#x2F;example&#x2F;SimpleExample.sol">https:&#x2F;&#x2F;github.com&#x2F;nathanhleung&#x2F;fallback&#x2F;blob&#x2F;main&#x2F;src&#x2F;examp...</a><p>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.<p>The smart contracts take advantage of Solidity&#x27;s fallback()[1] function to interpret the input data to the contract as an HTTP request rather than an ABI-encoded function call.<p>Would love to hear your thoughts in the comments below!<p>Docs: <a href="https:&#x2F;&#x2F;fallback.natecation.xyz&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fallback.natecation.xyz&#x2F;</a><p>Github: <a href="https:&#x2F;&#x2F;github.com&#x2F;nathanhleung&#x2F;fallback">https:&#x2F;&#x2F;github.com&#x2F;nathanhleung&#x2F;fallback</a><p>[1] <a href="https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;learn-ethereum&#x2F;9781789954111&#x2F;0bc452a8-d2b7-477a-b64c-bf497af4b5b1.xhtml" rel="nofollow">https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;learn-ethereum&#x2F;97817899...</a>

1 comment

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