Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testnet faucet improvements #110

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions testnet-faucet/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NEXT_PUBLIC_EXPLORER_URL=
NEXT_PUBLIC_USAGE_LIMIT_IN_HOURS=
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=
CLOUDFLARE_TURNSTILE_SECRET=
EXPLORER_API_URL=
SENDER_ADDRESS=
NODE_URL=
Expand Down
5 changes: 3 additions & 2 deletions testnet-faucet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ Example enviroment variable values
NEXT_PUBLIC_EXPLORER_URL=https://ccdexplorer.io/
NEXT_PUBLIC_USAGE_LIMIT_IN_HOURS=1
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=3x00000000000000000000FF
CLOUDFLARE_TURNSTILE_SECRET=1x0000000000000000000000000000000AA
EXPLORER_API_URL=https://wallet-proxy.testnet.concordium.com/v1
SENDER_ADDRESS=4eDtVqZrkmcNEFziEMSs8S2anvkH5KnsYK4MhwedwGWK1pmjZe
NODE_URL=node.testnet.concordium.com
NODE_URL=grpc.testnet.concordium.com
NODE_PORT=20000
CCD_DEFAULT_AMOUNT=1
SENDER_PRIVATE_KEY=12...34
```

Note: The `3x00000000000000000000FF` value in the `NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY` is a site key provided by Cloudflare for testing purposes; it works fine locally. For setting up the Cloudflare Turnstile service in production, please refer to this [guide](docs/turnstile/SETUP.md).
Note: The values `3x00000000000000000000FF` for `NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY` and `1x0000000000000000000000000000000AA` for `CLOUDFLARE_TURNSTILE_SECRET` are provided by Cloudflare for testing purposes. They work correctly in a local environment. For setting up the Cloudflare Turnstile service in production, please refer to this [guide](docs/turnstile/SETUP.md).
7 changes: 4 additions & 3 deletions testnet-faucet/docs/turnstile/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ The purpose of this guide is to show how to configure the production domain in V
6. In your Cloudflare dashboard. Go to Turnstile and fill it in as follows.
![step6](images/step6.png)

7. Click on create and copy the sitekey
7. Click on create and copy the sitekey and the secret

![step7](images/step7.png)

8. Go to the project on Vercel, then Settings / Environment variables and update the variable NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY
8. Go to the project on Vercel, then navigate to Settings > Environment Variables and update the variables NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY and CLOUDFLARE_TURNSTILE_SECRET.
![step8](images/step8.png)

9. Go to Deployments and click on the three points of the last deployment and then click on redeploy.
9. Go to Deployments and click on the three points of the last deployment and then click on redeploy.
benya7 marked this conversation as resolved.
Show resolved Hide resolved
![step9](images/step9.png)

That's it, the produccion domain and the Cloudfare Human Verification is ready now. 🎉
Binary file modified testnet-faucet/docs/turnstile/images/step7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 12 additions & 12 deletions testnet-faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
"lint": "next lint"
},
"dependencies": {
"@concordium/web-sdk": "^7.5.0",
"@headlessui/react": "^2.1.2",
"@concordium/web-sdk": "^7.5.1",
"@headlessui/react": "^2.2.0",
"@marsidev/react-turnstile": "^0.7.2",
"date-fns": "^3.6.0",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rettiwt-api": "^3.1.1",
"usehooks-ts": "^3.1.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"@types/node": "^20.17.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"eslint": "^8.57.1",
"eslint-config-next": "14.2.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"postcss": "^8",
"eslint-plugin-import": "^2.31.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3"
}
}
Loading