Skip to content

feat: update across schemas and extraction/generation for Mayan Swift and deBridge#29

Merged
AndreAugusto11 merged 3 commits into
mainfrom
tx-input
Mar 2, 2026
Merged

feat: update across schemas and extraction/generation for Mayan Swift and deBridge#29
AndreAugusto11 merged 3 commits into
mainfrom
tx-input

Conversation

@AndreAugusto11

Copy link
Copy Markdown
Owner

No description provided.

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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., AcrossFilledV3RelayAcrossFilledRelay) 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 expands AcrossCrossChainTransaction with refund/fee/middle-swap fields.
  • deBridge schema update: Renames DeBridgeBlockchainTransactionDeBridgeBlockchainTransactions (including __tablename__), expands Numeric precision, adds fix_token_symbol_clashes logic, and improves Solana-to-EVM matching with new filters.
  • Mayan Swift/Solana improvements: Increases Numeric precision for large token amounts, replaces hardcoded zero percent fee with a calculated formula, adds deduplication by intent_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 DeBridgeBlockchainTransactionRepositoryDeBridgeBlockchainTransactionsRepository
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 AcrossFilledV3RelayRepository and AcrossV3FundsDepositedRepository class names (lines 19, 21, 25, 26). These classes have been renamed to AcrossFilledRelayRepository and AcrossFundsDepositedRepository in the repository layer. Running this test will fail with an ImportError.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread extractor/base_handler.py
Comment thread rpcs/solana_rpc_client.py
Comment thread extractor/solana_extractor.py
Comment thread repository/across/models.py
Comment thread generator/across/generator.py
Comment thread repository/debridge/models.py
Comment thread generator/mayan/generator.py
Comment thread extractor/debridge/handler.py
@AndreAugusto11 AndreAugusto11 merged commit c56b23b into main Mar 2, 2026
5 of 13 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.

2 participants