Skip to content

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
wants to merge 78 commits into
base: main
Choose a base branch
from
Open

bot #551

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8047afa
wip
signorecello Apr 23, 2025
df61b03
wip
signorecello Apr 24, 2025
7ee4faf
HUUGE refactor
signorecello Apr 24, 2025
b56d25e
HUUUUGE cleanup
signorecello Apr 24, 2025
dd91782
yey
signorecello Apr 24, 2025
7740280
yey
signorecello Apr 24, 2025
d5dbe79
human verification working
signorecello Apr 25, 2025
fccbb4f
gitcoin stuff done
signorecello Apr 25, 2025
78fc8d8
another one bites the dust
signorecello Apr 26, 2025
be5ba25
wip
signorecello Apr 28, 2025
c0b99f0
wip
signorecello Apr 29, 2025
d130641
wip
signorecello Apr 29, 2025
65006e2
wip
signorecello Apr 29, 2025
189f29f
wip
signorecello Apr 29, 2025
34e3643
wip
signorecello Apr 29, 2025
272220a
wip
signorecello Apr 29, 2025
1b3b491
wip
signorecello Apr 29, 2025
b74bbfe
wip
signorecello Apr 29, 2025
cff8e31
wip
signorecello Apr 29, 2025
13e06b4
wip
signorecello Apr 29, 2025
0d1023a
wip
signorecello Apr 29, 2025
bb0d1fd
wip
signorecello Apr 29, 2025
d58263a
v1
signorecello Apr 30, 2025
6739cd4
v1
signorecello Apr 30, 2025
2ec447f
v1
signorecello Apr 30, 2025
7b20e41
v1
signorecello Apr 30, 2025
42af576
v1
signorecello Apr 30, 2025
da2c6c3
v1
signorecello Apr 30, 2025
c05a949
is this it
signorecello May 1, 2025
71d8e6b
is this it
signorecello May 1, 2025
3b8c27d
some more stuff
signorecello May 1, 2025
6e61c39
some more stuff
signorecello May 1, 2025
545e60f
some more stuff
signorecello May 1, 2025
c74b4f3
error handling
signorecello May 1, 2025
39da6c4
error handling
signorecello May 1, 2025
9d0f416
error handling
signorecello May 1, 2025
be4f8ee
error handling
signorecello May 1, 2025
fcba22d
error handling
signorecello May 1, 2025
b5f1c07
error handling
signorecello May 1, 2025
001b4e3
error handling
signorecello May 1, 2025
feead9e
error handling
signorecello May 1, 2025
e7b866e
error handling
signorecello May 1, 2025
b3a4184
error handling
signorecello May 1, 2025
134776c
error handling
signorecello May 1, 2025
26d2ecf
error handling
signorecello May 1, 2025
df2704d
fixing human verification api
signorecello May 1, 2025
6146ec3
bug
signorecello May 1, 2025
7341760
typo
signorecello May 1, 2025
e14a19c
roles assignment refactor
signorecello May 3, 2025
391f994
Merge remote-tracking branch 'origin' into zkpedro/human_sparta
signorecello May 12, 2025
b8d02cb
tf workflow
signorecello May 12, 2025
59c3155
bun lock
signorecello May 12, 2025
cfd6c72
removing human from human sparta
signorecello May 12, 2025
6e29e9f
removing human from human sparta
signorecello May 12, 2025
1b75199
removing human from human sparta
signorecello May 12, 2025
aaf9156
removing human from human sparta
signorecello May 12, 2025
985e2d5
api refac
signorecello May 13, 2025
8897a35
api refac
signorecello May 13, 2025
9665bec
api refac
signorecello May 13, 2025
73e92ff
i think this is it
signorecello May 14, 2025
4faa635
adding the lambda service
signorecello May 16, 2025
5c3b387
cleanup
signorecello May 16, 2025
d1ea110
Fix API URL configuration in Swagger docs and add DiscordUsernameInde…
signorecello May 16, 2025
0537cbe
Add fallback to scan when DiscordUsernameIndex is not available
signorecello May 16, 2025
3654a75
bugfix and some tests
signorecello May 16, 2025
a717db5
wip
signorecello May 26, 2025
0e887c4
wip
signorecello May 26, 2025
ec86212
wip
signorecello May 26, 2025
79d8038
adding tests and other stuff
signorecello May 28, 2025
1ef4f48
scheduler fix and tests
signorecello May 29, 2025
421059b
wip
signorecello May 29, 2025
bef2264
refactoring stats
signorecello May 30, 2025
fd1a687
wip
signorecello Jun 2, 2025
6e7645a
migraaaate
signorecello Jun 3, 2025
b1d29cc
history
signorecello Jun 4, 2025
5bee3d8
migrate pt2
signorecello Jun 5, 2025
d9b0979
wip
signorecello Jun 6, 2025
2f5397a
spinning off sparta
signorecello Jun 9, 2025
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
81 changes: 59 additions & 22 deletions .github/workflows/sparta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ permissions:
contents: read
pull-requests: write

env:
TF_LOG: DEBUG
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
terraform-sparta:
name: Terraform Sparta Bot
Expand All @@ -15,29 +20,61 @@ jobs:
run:
working-directory: tooling/sparta/terraform

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_passport_api_key: ${{ secrets.PASSPORT_API_KEY }}
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_passport_verified_role_id: "1364982673604345886"
TF_VAR_minimum_score: "10"
TF_VAR_passport_scorer_id: "11493"
TF_VAR_vite_reown_project_id: "d037e9da5c5c9b24cfcd94c509d88dce"
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"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.5.7

- name: Terraform Init
run: terraform init

- name: Terraform Format
run: terraform fmt -check
continue-on-error: true

- name: Terraform Validate
run: terraform validate

- name: Generate terraform.production.tfvars
run: |
cat > terraform.production.tfvars << EOF
# =============================================================================
# AWS Configuration
# =============================================================================
aws_region = "eu-west-2"
environment = "production"

# =============================================================================
# Application Secrets & Configuration
# =============================================================================

# --- Discord ---
bot_token = "${{ secrets.BOT_TOKEN }}"
Copy link
Collaborator

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.

image

Copy link
Collaborator Author

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

bot_client_id = "1329079356785688616"
guild_id = "1144692727120937080"

# --- Ethereum ---
ethereum_host = "${{ secrets.ETHEREUM_HOST }}"
staking_asset_handler_address = "0xF739D03e98e23A7B65940848aBA8921fF3bAc4b2"
l1_chain_id = "11155111"

# --- DynamoDB ---
local_dynamo_db = false
dynamodb_endpoint = "http://localhost:8000"

# --- Logging ---
log_level = "debug"
log_pretty_print = false

# --- API Configuration ---
api_port = 3000
backend_api_key = "${{ secrets.BACKEND_API_KEY }}"
EOF

- name: Terraform Apply
run: terraform apply -var-file="terraform.production.tfvars" -auto-approve -input=false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ proofs
debug_*.json
crs
yarn-error.log
.env*
3 changes: 0 additions & 3 deletions tooling/sparta/.dockerignore

This file was deleted.

40 changes: 0 additions & 40 deletions tooling/sparta/.gitignore

This file was deleted.

39 changes: 0 additions & 39 deletions tooling/sparta/Dockerfile

This file was deleted.

Loading