-
Notifications
You must be signed in to change notification settings - Fork 1
Dat2 151/relay bridge fsc #444
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
base: main
Are you sure you want to change the base?
Conversation
|
⏳ 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 GitHubAmazon 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
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo 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
|
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.
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_idinstead ofAS _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_modelsvsCURATED_FR_MODELS
Recommendations
- Fix the syntax errors in column aliases
- Correct the join logic in the relay model to properly match chain IDs
- Consider parameterizing the hardcoded bridge address
- 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 |
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.
🛑 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.
| 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, |
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.
Hardcoded bridge address should be parameterized. Consider using the contract mapping or a variable to make this configurable across different chains.
| '0xf70da97812cb96acdf810712aa562db8dfa3dbef' AS bridge_address, | |
| C.contract_address AS bridge_address, |
| type, | ||
| _log_id AS_id, | ||
| TYPE, | ||
| _log_id as_id, |
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.
🛑 Syntax Error: Missing space in column alias. This will cause a SQL compilation error.
| _log_id as_id, | |
| _log_id AS _id, |
| type, | ||
| _log_id AS_id, | ||
| TYPE, | ||
| _log_id as_id, |
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.
🛑 Syntax Error: Missing space in column alias. This will cause a SQL compilation error.
| _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 %} |
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.
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.
| {% if is_incremental() and 'across' not in vars.curated_fr_models %} | |
| {% if is_incremental() and 'across' not in vars.CURATED_FR_MODELS %} |
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: