Skip to content

Conversation

@sam-xyz
Copy link
Member

@sam-xyz sam-xyz commented Nov 26, 2025

Add relay bridge from external

run command:
dbt run -m silver_bridge__relay_v1 --full-refresh && dbt run -m silver_bridge__complete_bridge_activity --vars '{"CURATED_FR_MODELS": ["relay_v1"]}'

relay bridge is available for all the following evm chains:

  • arbitrum
  • avalanche
  • base
  • bob
  • boba
  • bsc
  • ethereum
  • flow_evm
  • gnosis
  • ink
  • optimism
  • polygon
  • somnia

@amazon-q-developer
Copy link

Code review in progress. Analyzing for code quality issues and best practices. You can monitor the review status in the checks section at the bottom of this pull request. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation.

Slash Commands

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository.

For more detailed information, visit the Amazon Q for GitHub documentation.

Footnotes

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

Copy link

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

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

Summary

This PR adds Relay bridge integration to the EVM bridge activity tracking system. While the overall structure follows established patterns, there are several critical issues that need to be addressed before merge:

Critical Issues

  • SQL Syntax Errors: Missing spaces in column aliases (as_id instead of AS _id) will cause compilation failures
  • Logic Error: Incorrect join condition in relay model that will prevent data retrieval
  • Variable Inconsistency: Mixed case usage of curated_fr_models vs CURATED_FR_MODELS

Recommendations

  1. Fix the syntax errors in column aliases
  2. Correct the join logic in the relay model to properly match chain IDs
  3. Consider parameterizing the hardcoded bridge address
  4. Standardize variable naming conventions

The integration approach is sound, but these issues must be resolved to ensure the model functions correctly across all supported chains.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

) }}
r
INNER JOIN contract_mapping C
ON C.contract_address = r.chain_id_from_request

Choose a reason for hiding this comment

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

🛑 Logic Error: The join condition uses chain_id_from_request to match against contract_address, but the contract mapping contains a chain_id value ('1') rather than an address. This will cause the join to fail and return no results.

Suggested change
ON C.contract_address = r.chain_id_from_request
ON C.contract_address = r.source_chain_id

origin_function_signature,
in_txs_tx_hash AS tx_hash,
NULL AS event_index,
'0xf70da97812cb96acdf810712aa562db8dfa3dbef' AS bridge_address,

Choose a reason for hiding this comment

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

Hardcoded bridge address should be parameterized. Consider using the contract mapping or a variable to make this configurable across different chains.

Suggested change
'0xf70da97812cb96acdf810712aa562db8dfa3dbef' AS bridge_address,
C.contract_address AS bridge_address,

type,
_log_id AS_id,
TYPE,
_log_id as_id,

Choose a reason for hiding this comment

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

🛑 Syntax Error: Missing space in column alias. This will cause a SQL compilation error.

Suggested change
_log_id as_id,
_log_id AS _id,

type,
_log_id AS_id,
TYPE,
_log_id as_id,

Choose a reason for hiding this comment

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

🛑 Syntax Error: Missing space in column alias. This will cause a SQL compilation error.

Suggested change
_log_id as_id,
_log_id AS _id,

{{ ref('silver_bridge__across_fundsdeposited') }}

{% if is_incremental() and 'across' not in vars.CURATED_FR_MODELS %}
{% if is_incremental() and 'across' not in vars.curated_fr_models %}

Choose a reason for hiding this comment

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

Variable name inconsistency: curated_fr_models (lowercase) is used throughout the file but should match the original CURATED_FR_MODELS (uppercase) pattern for consistency with other variables.

Suggested change
{% if is_incremental() and 'across' not in vars.curated_fr_models %}
{% if is_incremental() and 'across' not in vars.CURATED_FR_MODELS %}

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.

2 participants