Skip to content

Add Giphy API key for CI configuration#89

Merged
ifaouibadi merged 7 commits intomainfrom
develop
Mar 24, 2026
Merged

Add Giphy API key for CI configuration#89
ifaouibadi merged 7 commits intomainfrom
develop

Conversation

@venimus
Copy link
Copy Markdown
Member

@venimus venimus commented Mar 24, 2026

Add Giphy API key for CI configuration


Note

Medium Risk
Medium risk because it changes portfolio history data-fetching patterns (batched SQL, new price source, balance bucketing, higher concurrency), which could affect correctness and load characteristics; workflow secret plumbing is low risk but misconfiguration could break deploys.

Overview
Speeds up portfolio history generation and reduces external calls. Portfolio snapshots now resolve block heights via a new batchTimestampToAeHeight DB query (with transactions-table fallback) and precompute token PNL for all unique heights in one calculateTokenPnlsBatch call instead of per-snapshot queries.

Optimizes price/balance fetching. Historical AE prices are pulled from the local coin_historical_prices table when available (falling back to CoinGecko), AE balance lookups are bucketed to 300-block windows, and snapshot processing concurrency is increased.

SQL/query tuning and infra config. PNL price lookups switch from DISTINCT ON to LATERAL ... LIMIT 1, key_blocks.time gains an index, and deploy workflows pass through a required GIPHY_API_KEY secret.

Written by Cursor Bugbot for commit d861b16. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Testnet deployment uses wrong secret prefix for Giphy key
    • Updated deploy_testnet to use secrets.TESTNET_GIPHY_API_KEY so testnet deployment uses the correct environment-specific secret.

Create PR

Or push these changes by commenting:

@cursor push 93d7cca225
Preview (93d7cca225)
diff --git a/.github/workflows/deploy_develop.yaml b/.github/workflows/deploy_develop.yaml
--- a/.github/workflows/deploy_develop.yaml
+++ b/.github/workflows/deploy_develop.yaml
@@ -64,4 +64,4 @@
       PROFILE_REGISTRY_CONTRACT_ADDRESS: ${{ secrets.TESTNET_PROFILE_REGISTRY_CONTRACT_ADDRESS }}
       PROFILE_ATTESTATION_SIGNER_ADDRESS: ${{ secrets.TESTNET_PROFILE_ATTESTATION_SIGNER_ADDRESS }}
       PROFILE_ATTESTATION_PRIVATE_KEY: ${{ secrets.TESTNET_PROFILE_ATTESTATION_PRIVATE_KEY }}
-      GIPHY_API_KEY: ${{ secrets.DEV_GIPHY_API_KEY }}
+      GIPHY_API_KEY: ${{ secrets.TESTNET_GIPHY_API_KEY }}

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

PROFILE_REGISTRY_CONTRACT_ADDRESS: ${{ secrets.TESTNET_PROFILE_REGISTRY_CONTRACT_ADDRESS }}
PROFILE_ATTESTATION_SIGNER_ADDRESS: ${{ secrets.TESTNET_PROFILE_ATTESTATION_SIGNER_ADDRESS }}
PROFILE_ATTESTATION_PRIVATE_KEY: ${{ secrets.TESTNET_PROFILE_ATTESTATION_PRIVATE_KEY }}
GIPHY_API_KEY: ${{ secrets.DEV_GIPHY_API_KEY }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testnet deployment uses wrong secret prefix for Giphy key

Medium Severity

The deploy_testnet job references secrets.DEV_GIPHY_API_KEY instead of secrets.TESTNET_GIPHY_API_KEY. Every other environment-specific secret in this job uses the TESTNET_ prefix (e.g., TESTNET_TRENDING_TAGS_API_KEY, TESTNET_X_CLIENT_ID), so this looks like a copy-paste error from the deploy_mainnet job above. This causes the testnet deployment to use the dev Giphy API key instead of its own.

Fix in Cursor Fix in Web

@ifaouibadi ifaouibadi merged commit a9e634f into main Mar 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants