-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adding shadow to dex.trades on sonic #7584
base: main
Are you sure you want to change the base?
Conversation
dbt_subprojects/dex/models/trades/sonic/dex_sonic_base_trades.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/dex/seeds/trades/shadow_sonic_base_trades_seed.csv
Outdated
Show resolved
Hide resolved
Co-authored-by: Huang Geyang <[email protected]>
Co-authored-by: Huang Geyang <[email protected]>
….csv Co-authored-by: Huang Geyang <[email protected]>
It's been so long since I've github'd. Bare with me. I think I accidentally just re-requested you to review something for now reason. |
dbt_subprojects/dex/models/trades/sonic/platforms/shadow_sonic_base_trades.sql
Outdated
Show resolved
Hide resolved
{{ | ||
uniswap_compatible_v2_trades( | ||
blockchain = 'sonic', | ||
project = 'shadow', | ||
version = '1', | ||
Pair_evt_Swap = source('shadow_sonic', 'Pair_evt_Swap'), | ||
Factory_evt_PairCreated = source('shadow_sonic', 'Core_PairFactory_evt_PairCreated') | ||
) | ||
}} | ||
|
||
{{ | ||
uniswap_compatible_v3_trades( | ||
blockchain = 'sonic', | ||
project = 'shadow', | ||
version = '3', | ||
Pair_evt_Swap = source('shadow_sonic', 'RamsesV3Pool_evt_Swap'), | ||
Factory_evt_PoolCreated = source('shadow_sonic', 'RamsesV3Factory_evt_PoolCreated') | ||
) | ||
}} |
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.
We may need to split this part into 2 spells.
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.
so like shadow_sonic_base_trades_v1.sql and shadow_sonic_base_trades_v3.sql ?
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.
I'll take a look at snipping out the v2 bits since a majority of the volume goes through v3 pools.
and then double back and do another one of these for the v2.
dbt_subprojects/dex/seeds/trades/shadow_sonic_base_trades_seed.csv
Outdated
Show resolved
Hide resolved
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.
I think that should have done it.
If shadow is newly added into dex.trades, then we may need to add it into dex.info as well: |
@@ -0,0 +1,2 @@ | |||
blockchain,project,version,block_month,block_date,block_time,block_number,token_sold_amount_raw,token_bought_amount_raw,token_sold_address,token_bought_address,tx_hash,evt_index | |||
sonic,shadow,3,2025-01-01 00:00,2025-01-24 00:00,2025-01-24 14:34,5266265,151051097278346452,900000000000000000000,0x50c42dEAcD8Fc9773493ED674b675bE577f2634b,0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38,0x7b9c8c8eb8d384b892be64f8ce461b20575a327a15a3c64e8b010a3bd0f343a8,0 |
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.
Please verify this seed:
https://sonicscan.org/tx/0x7b9c8c8eb8d384b892be64f8ce461b20575a327a15a3c64e8b010a3bd0f343a8
(seems not in the table):
https://dune.com/queries/4652741
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.
will check it out on Monday!
thx @Hosuke
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.
looks like I managed to get the seed sorted, I think.
Now I'm stuck on: Failure in test check_dex_info_relationship_dex_sonic_base_trades_
which when I run the associated query: select * from hive.test_schema.git_dunesql_74bbc6d_check_dex_info_relationship_dex_sonic_base_trades_
it returns "shadow" as missing dex info.
Failure in test check_dex_info_relationship_dex_sonic_base_trades_ (models/trades/sonic/_schema.yml)
I thought there was an entry for shadow in the _schema.yml file, but really I'm just out of my depth here.
This, i *think*, should fix it. I kept flipping the bought and sold addresses some how.
smh, whenever I would query the check dex test schema, it looked like I had the bought and sold addresses swapped, so I flipped them: using the following as my seed: blockchain,project,version,block_date,tx_hash,evt_index,token_bought_address,token_sold_address,block_number,token_bought_amount_raw,token_sold_amount_raw sonic,shadow,3,2025-02-06,0x7d39202a1e950e05a9005648a3577b6306a1640b9a53ed3db8711bafaf02be03,4,0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38,0x29219dd400f2bf60e5a23d13be72b486d4038894,6758314,250436493,538400000000000000000 I'm sure I'm missing something simple/obvious: Any chance @Hosuke could take a peek at it, and see if I'm making some obvious mistake? |
We need to update the |
Well, crap. Honestly, I accidentally pushed this PR to the spellbook when I meant to push it to my fork.
Sorry if it's a cluster f.
Description:
[...]
quick links for more information: