Skip to content

Adding Pharaoh legacy (uni v2) support for dex.trades on avalanche_c #8535

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

discochuck
Copy link
Contributor

Thank you for contributing to Spellbook 🪄

Please open the PR in draft and mark as ready when you want to request a review.

Description:

It's been a very long time since I've attempted this, so bare with me.

Attempting to add pharaoh legacy swap support to dex.trades.


quick links for more information:

@github-actions github-actions bot marked this pull request as draft July 24, 2025 00:01
@github-actions github-actions bot added WIP work in progress dbt: dex covers the DEX dbt subproject labels Jul 24, 2025
@dune-eng
Copy link

Workflow run id 16484402366 approved.

@dune-eng
Copy link

Workflow run id 16484402300 approved.

@dune-eng
Copy link

Workflow run id 16484402310 approved.

@discochuck discochuck marked this pull request as ready for review July 24, 2025 02:37
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Jul 24, 2025
@dune-eng
Copy link

Workflow run id 16486415700 approved.

@dune-eng
Copy link

Workflow run id 16497314752 approved.

@dune-eng
Copy link

Workflow run id 16497314751 approved.

@dune-eng
Copy link

Workflow run id 16497315302 approved.

@dune-eng
Copy link

Workflow run id 16497783871 approved.

@dune-eng
Copy link

Workflow run id 16497783879 approved.

@dune-eng
Copy link

Workflow run id 16497784143 approved.

@discochuck
Copy link
Contributor Author

Currently error'n out on:

  Model 'model.dex.pharaoh_legacy_avalanche_c_base_trades' (models/trades/avalanche_c/platforms/pharaoh_legacy_avalanche_c_base_trades.sql) depends on a source named 'pharaoh_avalanche_c.pair_evt_swap' which was not found

But I can

select * from pharaoh_avalanche_c.pair_evt_swap

I'm guessing I'm not remembering/understanding the source it's referring to?

@dune-eng
Copy link

Workflow run id 16498497839 approved.

@dune-eng
Copy link

Workflow run id 16498497849 approved.

@dune-eng
Copy link

Workflow run id 16498498205 approved.

@dune-eng
Copy link

Workflow run id 16501851744 approved.

@dune-eng
Copy link

Workflow run id 16501851750 approved.

@dune-eng
Copy link

Workflow run id 16501851963 approved.

@dune-eng
Copy link

Workflow run id 16511018088 approved.

@dune-eng
Copy link

Workflow run id 16511018278 approved.

@dune-eng
Copy link

Workflow run id 16511038763 approved.

@dune-eng
Copy link

Workflow run id 16511038766 approved.

@dune-eng
Copy link

Workflow run id 16511038984 approved.

@dune-eng
Copy link

Workflow run id 16543207057 approved.

@dune-eng
Copy link

Workflow run id 16543207063 approved.

@dune-eng
Copy link

Workflow run id 16543207160 approved.

@dune-eng
Copy link

Workflow run id 16543384927 approved.

@dune-eng
Copy link

Workflow run id 16543384941 approved.

@dune-eng
Copy link

Workflow run id 16543385245 approved.

@dune-eng
Copy link

Workflow run id 16557350820 approved.

@dune-eng
Copy link

Workflow run id 16557350769 approved.

@dune-eng
Copy link

Workflow run id 16557350767 approved.

@dune-eng
Copy link

Workflow run id 16594338042 approved.

@dune-eng
Copy link

Workflow run id 16594338043 approved.

@dune-eng
Copy link

Workflow run id 16594338333 approved.

@jeff-dude jeff-dude marked this pull request as draft July 29, 2025 17:51
@github-actions github-actions bot added WIP work in progress and removed ready-for-review this PR development is complete, please review labels Jul 29, 2025
@jeff-dude
Copy link
Member

marking back as draft until CI is passing.

@discochuck
Copy link
Contributor Author

marking back as draft until CI is passing.

select
    abi_id,
    address,
    name,
    namespace,
    dynamic,
    base,
    factory,
    detection_source,
    created_at
from avalanche_c.contracts
where namespace = 'pharaoh'
   and name = 'Pair'
image

so my seed wasn't finding match and it turns out there's a super weird decode (issue?) with duplicate Pair contracts within the pharaoh namespace on avalanche_c

ref: https://discord.com/channels/757637422384283659/1397931881701445783

once this is fixed, the PR should go through. I wonder if I might be able to get an extra eyeball or two on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbt: dex covers the DEX dbt subproject WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants