-
Notifications
You must be signed in to change notification settings - Fork 45
bot #551
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
Open
signorecello
wants to merge
65
commits into
main
Choose a base branch
from
zkpedro/human_sparta
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
bot #551
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
8047afa
wip
signorecello df61b03
wip
signorecello 7ee4faf
HUUGE refactor
signorecello b56d25e
HUUUUGE cleanup
signorecello dd91782
yey
signorecello 7740280
yey
signorecello d5dbe79
human verification working
signorecello fccbb4f
gitcoin stuff done
signorecello 78fc8d8
another one bites the dust
signorecello be5ba25
wip
signorecello c0b99f0
wip
signorecello d130641
wip
signorecello 65006e2
wip
signorecello 189f29f
wip
signorecello 34e3643
wip
signorecello 272220a
wip
signorecello 1b3b491
wip
signorecello b74bbfe
wip
signorecello cff8e31
wip
signorecello 13e06b4
wip
signorecello 0d1023a
wip
signorecello bb0d1fd
wip
signorecello d58263a
v1
signorecello 6739cd4
v1
signorecello 2ec447f
v1
signorecello 7b20e41
v1
signorecello 42af576
v1
signorecello da2c6c3
v1
signorecello c05a949
is this it
signorecello 71d8e6b
is this it
signorecello 3b8c27d
some more stuff
signorecello 6e61c39
some more stuff
signorecello 545e60f
some more stuff
signorecello c74b4f3
error handling
signorecello 39da6c4
error handling
signorecello 9d0f416
error handling
signorecello be4f8ee
error handling
signorecello fcba22d
error handling
signorecello b5f1c07
error handling
signorecello 001b4e3
error handling
signorecello feead9e
error handling
signorecello e7b866e
error handling
signorecello b3a4184
error handling
signorecello 134776c
error handling
signorecello 26d2ecf
error handling
signorecello df2704d
fixing human verification api
signorecello 6146ec3
bug
signorecello 7341760
typo
signorecello e14a19c
roles assignment refactor
signorecello 391f994
Merge remote-tracking branch 'origin' into zkpedro/human_sparta
signorecello b8d02cb
tf workflow
signorecello 59c3155
bun lock
signorecello cfd6c72
removing human from human sparta
signorecello 6e29e9f
removing human from human sparta
signorecello 1b75199
removing human from human sparta
signorecello aaf9156
removing human from human sparta
signorecello 985e2d5
api refac
signorecello 8897a35
api refac
signorecello 9665bec
api refac
signorecello 73e92ff
i think this is it
signorecello 4faa635
adding the lambda service
signorecello 5c3b387
cleanup
signorecello d1ea110
Fix API URL configuration in Swagger docs and add DiscordUsernameInde…
signorecello 0537cbe
Add fallback to scan when DiscordUsernameIndex is not available
signorecello 3654a75
bugfix and some tests
signorecello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ proofs | |
debug_*.json | ||
crs | ||
yarn-error.log | ||
.env* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
.env | ||
.env* | ||
# Git files | ||
.git | ||
.gitignore | ||
|
||
# Node.js dependencies | ||
node_modules | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Build outputs (adjust if your build output is different) | ||
dist | ||
build | ||
.next | ||
|
||
# Terraform state and plugins | ||
terraform/.terraform | ||
*.tfstate | ||
*.tfstate.backup | ||
|
||
# Environment files | ||
.env* | ||
!.env.example | ||
|
||
# IDE/Editor folders | ||
.vscode | ||
.idea | ||
|
||
# OS generated files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Other potential artifacts (add more as needed) | ||
*.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# ------------------------------------- | ||
# Express Server Configuration | ||
# ------------------------------------- | ||
# Port for the API server | ||
API_PORT=3000 | ||
|
||
# ------------------------------------- | ||
# Discord Bot Configuration | ||
# ------------------------------------- | ||
# Discord Bot Token (from Discord Developer Portal) | ||
BOT_TOKEN=your_discord_bot_token_here | ||
# Discord Application/Client ID (from Discord Developer Portal) | ||
BOT_CLIENT_ID=your_discord_client_id_here | ||
# ID of the Discord Server (Guild) where the bot operates | ||
GUILD_ID=your_discord_guild_id_here | ||
|
||
# ------------------------------------- | ||
# Verification Web App (Vite Frontend) | ||
# ------------------------------------- | ||
# Base URL of the verification web app (e.g., http://localhost:5173 or your deployed URL) | ||
# Used to generate the verification link sent to the user. | ||
API_URL=http://localhost:3000 # for vite frontend | ||
|
||
# ------------------------------------- | ||
# DynamoDB Configuration | ||
# ------------------------------------- | ||
# Set to "true" to use a local DynamoDB instance (e.g., Docker container) | ||
LOCAL_DYNAMO_DB=true | ||
# Endpoint URL for local DynamoDB (only used if LOCAL_DYNAMO_DB is true) | ||
DYNAMODB_LOCAL_ENDPOINT=http://localhost:8000 | ||
|
||
# --- AWS Credentials (Required if LOCAL_DYNAMO_DB=false and not using IAM roles/profiles) --- | ||
AWS_REGION=us-east-1 | ||
# AWS_ACCESS_KEY_ID=your_aws_access_key_here | ||
# AWS_SECRET_ACCESS_KEY=your_aws_secret_key_here | ||
|
||
# ------------------------------------- | ||
# Logging Configuration | ||
# ------------------------------------- | ||
# Log level: 'debug', 'info', 'warn', 'error' | ||
LOG_LEVEL=info | ||
# Set to "false" to disable pretty printing of logs (JSON output) | ||
LOG_PRETTY_PRINT=true | ||
|
||
# ------------------------------------- | ||
# Ethereum Configuration (Used by Moderator/NodeOperator commands) | ||
# ------------------------------------- | ||
# RPC URL for the Ethereum network (e.g., Sepolia) | ||
ETHEREUM_HOST=your_ethereum_rpc_url_here | ||
# Chain ID for the Ethereum network (e.g., 11155111 for Sepolia) | ||
L1_CHAIN_ID=11155111 | ||
# Staking asset handler contract address | ||
STAKING_ASSET_HANDLER_ADDRESS=your_staking_asset_handler_address_here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Terraform Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
terraform: | ||
name: Terraform | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
TF_VAR_bot_token: ${{ secrets.BOT_TOKEN }} | ||
TF_VAR_ethereum_host: ${{ secrets.ETHEREUM_HOST }} | ||
TF_VAR_backend_api_key: ${{ secrets.BACKEND_API_KEY }} | ||
TF_VAR_aws_region: "eu-west-2" | ||
TF_VAR_environment: "production" | ||
TF_VAR_bot_client_id: "1329079356785688616" | ||
TF_VAR_guild_id: "1144692727120937080" | ||
TF_VAR_staking_asset_handler_address: "0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2" | ||
TF_VAR_l1_chain_id: "11155111" | ||
TF_VAR_local_dynamo_db: "false" | ||
TF_VAR_dynamodb_local_endpoint: "http://localhost:8000" | ||
TF_VAR_log_level: "info" | ||
TF_VAR_log_pretty_print: "false" | ||
TF_VAR_api_port: "3000" | ||
|
||
defaults: | ||
run: | ||
working-directory: tooling/sparta/terraform | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: 1.5.7 | ||
|
||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
|
||
- name: Terraform Format | ||
id: fmt | ||
run: terraform fmt -check | ||
continue-on-error: true | ||
|
||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate | ||
|
||
- name: Terraform Apply | ||
run: | | ||
terraform apply -auto-approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,5 @@ Thumbs.db | |
bun.lockb | ||
yarn.lock | ||
package-lock.json | ||
.cursor/ | ||
out.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeing that is best practice to access secrets through shell variables rather than the secrets directly. When accessing secrets directly in
run
, there is a risk that the secrets get dumped in logs unintentionally.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've seen they get sanitized if printed, but I'll change it to meet best practices