diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e83399e..0a596c2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,6 +63,7 @@ jobs: CONTRACT_ADDRESS: ${{ secrets.CONTRACT_ADDRESS }} WEB_ADDRESS: ${{ secrets.WEB_ADDRESS }} TURNSTILE_SITE_KEY: ${{ secrets.TURNSTILE_SITE_KEY }} + INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 1e3d6cc..b284fff 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -46,6 +46,7 @@ jobs: CONTRACT_ADDRESS: ${{ secrets.CONTRACT_ADDRESS }} WEB_ADDRESS: ${{ secrets.WEB_ADDRESS }} TURNSTILE_SITE_KEY: ${{ secrets.TURNSTILE_SITE_KEY }} + INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact diff --git a/README.md b/README.md index 851a14c..e032ec4 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ Click [here](https://docs.walletconnect.com/quick-start/dapps/web3-provider) to Click [here](https://docs.walletconnect.com/web3modal/javascript/about) to learn more about how to use the WalletConnect API for JavaScripts. +## Infura API Usage + +Click [here](https://infura.io/docs) to learn more about Infura API. + +Click [here](https://infura.io/docs/gettingStarted/chooseaNetwork) to choose a network for Infura API. + ## Network for Our Blockchain We are using the Base Mainnet network for our blockchain. @@ -168,6 +174,7 @@ To successfully deploy and run the project locally, you need to create a `contra "contractAddress": "Your_Contract_Address", "webAddress": "Your_Web_Address", "turnstileSiteKey": "Your_CloudFlare_Turnstile_Site_Key", + "infuraApiKey": "Your_Infura_API_Key" } ``` - Replace `Your_Network_Choice` with the network you are using (e.g., `base` for the Base Mainnet). @@ -200,6 +207,7 @@ Here is an example of what your `contract-config.json` might look like for the B "contractAddress": "0x123abc456def789ghi", "webAddress": "https://flxdu.cn:8011/v1/info/transaction_count", "turnstileSiteKey": "0x123abc456def789ghi", + "infuraApiKey": "0x123abc456def789ghi" } ``` @@ -220,7 +228,8 @@ This section provides guidance on deploying your project to GitHub Pages and Clo |**`CONTRACT_ADDRESS`**|Essential|The Ethereum smart contract address the web application interacts with.| |**`PROJECT_ID`**|Essential|A unique identifier obtained from WalletConnect, used for WalletConnect API calls.| |**`TURNSTILE_SITE_KEY`**|Essential|The site key for Cloudflare's Turnstile service, used for bot protection and CAPTCHA verification.| - |**`WEB_ADDRESS`**|Essential|The backend URL of the airdrop function, better to use the specified domain for the project for clearer identification. | + |**`WEB_ADDRESS`**|Essential|The backend URL of the airdrop function, better to use the specified domain for the project for clearer identification.| + |**INFURA_API_KEY**|Essential|The API key for Infura, used to interact with the Ethereum network.| 2. Used for Reverse Proxy diff --git a/create-config.js b/create-config.js index 3c7e91d..8e8e7a7 100644 --- a/create-config.js +++ b/create-config.js @@ -7,6 +7,7 @@ const config = { "contractAddress": process.env.CONTRACT_ADDRESS, "webAddress": process.env.WEB_ADDRESS, "turnstileSiteKey": process.env.TURNSTILE_SITE_KEY, + "infuraApiKey": process.env.INFURA_API_KEY }; fs.writeFileSync('contract-config.json', JSON.stringify(config, null, 2)); \ No newline at end of file diff --git a/index.html b/index.html index 1c5f322..db3fb5a 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,7 @@ Partner @@ -207,7 +207,7 @@
-
+
@@ -613,17 +601,29 @@

Airdrop Claimed:

-
+

Claim Your Airdrop Now!

+
+
+
+
@@ -1366,6 +1366,7 @@

+ -