feat: update across schemas and extraction/generation for Mayan Swift and deBridge#29
Merged
Conversation
Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt>
Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt>
…, Mayan Signed-off-by: André Augusto <andre.augusto@tecnico.ulisboa.pt>
There was a problem hiding this comment.
Pull request overview
This PR updates the data extraction and generation pipelines for three cross-chain bridges — Across, Mayan Swift, and deBridge — to support updated smart contract schemas and a new Unichain blockchain.
Changes:
- Across schema update: Renames models/repositories from
V3-prefixed names (e.g.,AcrossFilledV3Relay→AcrossFilledRelay) to reflect new contract event names, updates topic hashes, adds Unichain support, converts the cross-chain data generation query from raw SQL to SQLAlchemy ORM, and expandsAcrossCrossChainTransactionwith refund/fee/middle-swap fields. - deBridge schema update: Renames
DeBridgeBlockchainTransaction→DeBridgeBlockchainTransactions(including__tablename__), expandsNumericprecision, addsfix_token_symbol_clasheslogic, and improves Solana-to-EVM matching with new filters. - Mayan Swift/Solana improvements: Increases
Numericprecision for large token amounts, replaces hardcoded zero percent fee with a calculated formula, adds deduplication byintent_id, and improves Solana signature fetching (deduplication, removing debug file writes from the old code, pagination refactor).
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
tests/across/test_data_extraction.py |
Comment update only; imports still reference deleted V3 repository class names |
rpcs/solana_rpc_client.py |
Refactored pagination and deduplication; removed json import and debug file write |
repository/mayan/models.py |
Increased Numeric precision from (30,0) to (50,0) for large token amount columns |
repository/debridge/repository.py |
Renamed DeBridgeBlockchainTransactionRepository → DeBridgeBlockchainTransactionsRepository |
repository/debridge/models.py |
Renamed table/class, increased Numeric precision, changed referral_code to nullable |
repository/debridge/__init__.py |
Updated exports for renamed repository class |
repository/across/repository.py |
Renamed V3 repository classes; replaced id count with intent_id count; removed update_amount_usd method |
repository/across/models.py |
Renamed classes and tables, dropped auto-increment PKs in favor of deposit_id/intent_id as natural keys; expanded AcrossCrossChainTransaction schema |
repository/across/__init__.py |
Updated exports for renamed repository classes |
generator/mayan/generator.py |
Calculates percent fee dynamically, reorders token info population, adds duplicate intent_id deduplication, expands token symbol clash fix |
generator/debridge/generator.py |
Fixes src_contract_address source, adds Solana filters, adds fix_token_symbol_clashes call |
generator/common/price_generator.py |
Adds None guard for token_metadata before accessing name |
generator/across/generator.py |
Replaces raw SQL INSERT with SQLAlchemy ORM insert().from_select(); adds fetch_unichain_data method |
extractor/solana_extractor.py |
Adds skip-if-exists check, deduplication via set(), and unconditional signature file write |
extractor/mayan/handler.py |
Adds new instruction name branches, skips already-processed fulfillments, adds infinite-loop guard |
extractor/extractor.py |
Fixes incorrect import from urllib.request.BaseHandler to project's BaseHandler |
extractor/debridge/handler.py |
Renames model/repo references, adds new function selector parsers, improves post-processing logic |
extractor/base_handler.py |
Adds input_data bytes-to-hex conversion and truncation before DB write |
extractor/across/handler.py |
Updates to new event topics/names; adds unpad_address for address fields; stores message_hash instead of message |
extractor/across/decoder.py |
Updates event topic hashes to new contract version |
extractor/across/constants.py |
Updates topic hashes; adds Unichain blockchain configuration |
extractor/across/ABIs/unichain/across.json |
New ABI file for Unichain Across SpokePool contract |
config/rpcs_base_config.yaml |
Adds Unichain RPC config; switches Solana RPC to Blockdaemon |
config/constants.py |
Updates Polygon native token; adds Unichain chain ID 130 |
cli/cli.py |
Adds "unichain" as a valid --blockchains option |
Comments suppressed due to low confidence (1)
tests/across/test_data_extraction.py:26
- The test file still imports and uses the old, now-deleted
AcrossFilledV3RelayRepositoryandAcrossV3FundsDepositedRepositoryclass names (lines 19, 21, 25, 26). These classes have been renamed toAcrossFilledRelayRepositoryandAcrossFundsDepositedRepositoryin the repository layer. Running this test will fail with anImportError.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.