cloudflare/cfweb3

318

stars

57

commits

JavaScript

primary language

Apr 23, 2026

updated

Browse cluster: Svelte UI components and design systems

README

CFWeb3

CFWeb3 is a Web3 demo application. It uses Hardhat and Solidity to create an Ethereum smart contract. This code is a proof-of-concept showing how to build Web3 applications with Cloudflare, and should not be used as a production example.

The contract offers 2048 tokens which can be minted via the frontend Svelte application. The entire app runs on the Rinkeby test network.

Demo

A live version of this demo app can be found at cf-web3.pages.dev.

Building locally

  1. Clone the repo with git clone git@github.com:cloudflare/cfweb3.git
  2. npm install in contract and frontend with:
cd cfweb3/contract
npm install
cd ../frontend
npm install
  1. Install Metamask, switch to the testnet and add funds (instructions below)
  2. Click on Metamask and then on the hamburger icon in the top right
  3. Click on "Account details"
  4. Click on "Export Private Key"
  5. Enter Metamask password
  6. Copy your private key
  7. In one terminal window, move into the contract directory and run:
dapk="YOUR_PRIVATE_KEY" npx hardhat node
  1. In a different terminal window, move into the frontend directory and run:
npm run dev

Adding funds to your Metamask test account

  1. Install Metamask
  2. Switch Metamask to the Rinkeby test network

Metamask switch to testnet

  1. Copy your Rinkeby account wallet address.

  2. Go to the Rinkeby faucet

  3. Post a Tweet or a Facebook status with your Rinkeby wallet address.

  4. Enter the URL of your Tweet or Facebook post on the faucet website.

  5. Claim the amount you want.

  6. Delete the social media post (optional).

Contributors

jkup

36 commits

kristianfreeman

19 commits

cloudflare/cfweb3

318

stars

57

commits

JavaScript

primary language

Apr 23, 2026

updated

Browse cluster: Svelte UI components and design systems

README

CFWeb3

CFWeb3 is a Web3 demo application. It uses Hardhat and Solidity to create an Ethereum smart contract. This code is a proof-of-concept showing how to build Web3 applications with Cloudflare, and should not be used as a production example.

The contract offers 2048 tokens which can be minted via the frontend Svelte application. The entire app runs on the Rinkeby test network.

Demo

A live version of this demo app can be found at cf-web3.pages.dev.

Building locally

  1. Clone the repo with git clone git@github.com:cloudflare/cfweb3.git
  2. npm install in contract and frontend with:
cd cfweb3/contract
npm install
cd ../frontend
npm install
  1. Install Metamask, switch to the testnet and add funds (instructions below)
  2. Click on Metamask and then on the hamburger icon in the top right
  3. Click on "Account details"
  4. Click on "Export Private Key"
  5. Enter Metamask password
  6. Copy your private key
  7. In one terminal window, move into the contract directory and run:
dapk="YOUR_PRIVATE_KEY" npx hardhat node
  1. In a different terminal window, move into the frontend directory and run:
npm run dev

Adding funds to your Metamask test account

  1. Install Metamask
  2. Switch Metamask to the Rinkeby test network

Metamask switch to testnet

  1. Copy your Rinkeby account wallet address.

  2. Go to the Rinkeby faucet

  3. Post a Tweet or a Facebook status with your Rinkeby wallet address.

  4. Enter the URL of your Tweet or Facebook post on the faucet website.

  5. Claim the amount you want.

  6. Delete the social media post (optional).

Contributors

jkup

36 commits

kristianfreeman

19 commits

Languages

JavaScript

46.7%

Svelte

26.0%

Solidity

12.3%

CSS

10.5%

TypeScript

3.0%

HTML

1.5%