{"id":15715427,"url":"https://github.com/cloudflare/cfweb3","last_synced_at":"2025-04-09T06:11:23.436Z","repository":{"id":40542668,"uuid":"406815021","full_name":"cloudflare/cfweb3","owner":"cloudflare","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-27T17:13:39.000Z","size":493,"stargazers_count":318,"open_issues_count":6,"forks_count":51,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-02T04:07:07.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-15T15:04:48.000Z","updated_at":"2025-02-11T08:29:01.000Z","dependencies_parsed_at":"2024-12-23T01:05:07.195Z","dependency_job_id":"e2074c82-7771-42e2-b4ba-a2d3cea57166","html_url":"https://github.com/cloudflare/cfweb3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fcfweb3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fcfweb3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fcfweb3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudflare%2Fcfweb3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudflare","download_url":"https://codeload.github.com/cloudflare/cfweb3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:41:32.527Z","updated_at":"2025-04-09T06:11:23.415Z","avatar_url":"https://github.com/cloudflare.png","language":"JavaScript","funding_links":[],"categories":["开源项目"],"sub_categories":["JavaScript web3 项目"],"readme":"# CFWeb3\n\nCFWeb3 is a Web3 demo application. It uses [Hardhat](https://github.com/nomiclabs/hardhat) and [Solidity](https://soliditylang.org/) to create an [Ethereum](https://ethereum.org/) smart contract. This code is a proof-of-concept showing how to [build Web3 applications with Cloudflare](https://blog.cloudflare.com/get-started-web3/), and should not be used as a production example.\n\nThe contract offers 2048 tokens which can be minted via the frontend [Svelte](https://svelte.dev/) application. The entire app runs on the [Rinkeby](https://www.rinkeby.io/) test network.\n\n## Demo\n\nA live version of this demo app can be found at [cf-web3.pages.dev](https://cf-web3.pages.dev/).\n\n## Building locally\n\n1. Clone the repo with `git clone git@github.com:cloudflare/cfweb3.git`\n2. npm install in `contract` and `frontend` with:\n\n```sh\ncd cfweb3/contract\nnpm install\ncd ../frontend\nnpm install\n```\n\n3. Install Metamask, switch to the testnet and add funds (instructions below)\n4. Click on Metamask and then on the hamburger icon in the top right\n5. Click on \"Account details\"\n6. Click on \"Export Private Key\"\n7. Enter Metamask password\n8. Copy your private key\n9. In one terminal window, move into the `contract` directory and run:\n\n```sh\ndapk=\"YOUR_PRIVATE_KEY\" npx hardhat node\n```\n\n10. In a different terminal window, move into the `frontend` directory and run:\n\n```sh\nnpm run dev\n```\n\n## Adding funds to your Metamask test account\n\n1. Install [Metamask](https://metamask.io/)\n2. Switch Metamask to the Rinkeby test network\n\n![Metamask switch to testnet](/img/metamask-testnet.png)\n\n3. Copy your Rinkeby account wallet address.\n\n4. Go to the [Rinkeby faucet](https://faucet.rinkeby.io/)\n5. Post a Tweet or a Facebook status with your Rinkeby wallet address.\n6. Enter the URL of your Tweet or Facebook post on the faucet website.\n7. Claim the amount you want.\n8. Delete the social media post (optional).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fcfweb3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudflare%2Fcfweb3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudflare%2Fcfweb3/lists"}