Skip to content
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

[fluid] adding fluid to dex.trades #7291

Merged
merged 21 commits into from
Dec 16, 2024

Conversation

darvinrio
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:

[...]


quick links for more information:

@darvinrio
Copy link
Contributor Author

darvinrio commented Dec 10, 2024

@jeff-dude need some help with debugging this

@jeff-dude jeff-dude added WIP work in progress dbt: dex covers the DEX dbt subproject labels Dec 10, 2024
@darvinrio darvinrio marked this pull request as ready for review December 11, 2024 07:37
@darvinrio darvinrio requested a review from jeff-dude December 11, 2024 14:03
Comment on lines 31 to 33
from {{ source('ethereum', 'logs')}}
where topic0 = 0x3fecd5f7aca6136a20a999e7d11ff5dcea4bd675cb125f93ccd7d53f98ec57e4
-- DexT1Deployed -> sample tx: https://etherscan.io/tx/0xabf5c0e676e69de941c283400d7ac5f47b17a09d870f225b5240522f95da501c#eventlog
Copy link
Member

Choose a reason for hiding this comment

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

any particular reason we're not going through normal decoding process here, to build those tables vs. reading raw data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the etherscan abi didn't have that particular event.
i can manually edit the json to add that single event in.
I'm not sure if its safe though.

https://etherscan.io/address/0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085#code

Copy link
Member

Choose a reason for hiding this comment

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

i see a warning there that the contract may be a proxy? doesn't that typically mean you can find the underlying contract, and that has the correct ABI (or am i oversimplifying that)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cant really say its the correct ABI, since the events are split between both proxy and impl.
i think the ideal work around is to manually add the event to the abi json. i however suspect, with their v2 launch this could change.

https://github.com/Instadapp/fluid-contracts-public/blob/3ec13bd35ebd88286143148b1d637e56e11187ed/deployments/mainnet/DexT1DeploymentLogic.json#L436

Copy link
Contributor Author

@darvinrio darvinrio Dec 12, 2024

Choose a reason for hiding this comment

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

on the otherhand, i think i should add version to the tables

Copy link
Member

Choose a reason for hiding this comment

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

yeah, we should have a model per version of the DEX to keep logic isolated and understand the differences. are you planning to do that in this PR?

if this doesn't fix the existing version logic, and we need to use raw logs due to decoding complexities, we can likely sign off on that.

Copy link
Member

Choose a reason for hiding this comment

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

oh i see, you added version already, but v2 doesn't exist yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i saw it making waves on twitter today. will need to spend some time to figure out whats up with that.

Copy link
Member

Choose a reason for hiding this comment

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

okay, do you want to keep this PR open to wait for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i shall add that in a later PR

@jeff-dude jeff-dude self-assigned this Dec 11, 2024
@jeff-dude jeff-dude added question Further information is requested in review Assignee is currently reviewing the PR and removed WIP work in progress labels Dec 11, 2024
@jeff-dude jeff-dude added WIP work in progress and removed question Further information is requested labels Dec 13, 2024
@jeff-dude jeff-dude added ready-for-merging and removed WIP work in progress in review Assignee is currently reviewing the PR labels Dec 13, 2024
@0xRobin 0xRobin merged commit 643d7b9 into duneanalytics:main Dec 16, 2024
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dbt: dex covers the DEX dbt subproject ready-for-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants