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

DUX-762 Init sonic chain #7341

Merged
merged 13 commits into from
Jan 3, 2025
Merged

Conversation

Hosuke
Copy link
Collaborator

@Hosuke Hosuke commented Dec 16, 2024

Init sonic chain

@github-actions github-actions bot added WIP work in progress dbt: daily covers the Daily dbt subproject labels Dec 16, 2024
@Hosuke Hosuke marked this pull request as ready for review December 16, 2024 17:03
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Dec 16, 2024
@jeff-dude jeff-dude self-assigned this Dec 16, 2024
@jeff-dude jeff-dude added WIP work in progress and removed ready-for-review this PR development is complete, please review labels Dec 16, 2024
@jeff-dude jeff-dude marked this pull request as draft December 16, 2024 22:17
@jeff-dude jeff-dude changed the title Init sonic chain DUX-762 Init sonic chain Dec 17, 2024
@Hosuke
Copy link
Collaborator Author

Hosuke commented Dec 19, 2024

Currently 4 trusted tokens to be added:
https://sonicscan.org/tokens

@github-actions github-actions bot added the dbt: tokens covers the Tokens dbt subproject label Dec 23, 2024
@Hosuke Hosuke marked this pull request as ready for review December 23, 2024 16:10
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Dec 23, 2024
@Hosuke
Copy link
Collaborator Author

Hosuke commented Dec 23, 2024

#7370 includes sonic tokens' spells.

@IrishLatte19
Copy link
Contributor

IrishLatte19 commented Dec 30, 2024

Hey @Hosuke,
Could you please add 'Wrapped Sonic' and 'Silver' Token in the prices spell as well.
Wrapped Sonic
Contract Address - 0x832497895f05100E53f42DFA8fC758B4866B183a
Decimals - 18
Symbol - 'WS'

Silver
Contract Address - 0x005851f943ee2957B1748957F26319e4f9EdeBC1
Decimals - 18
Symbol - 'AG'

@Hosuke
Copy link
Collaborator Author

Hosuke commented Dec 30, 2024

Hey @Hosuke, Could you please add 'Wrapped Sonic' and 'Silver' Token in the prices spell as well. Wrapped Sonic Contract Address - 0x832497895f05100E53f42DFA8fC758B4866B183a Decimals - 18 Symbol - 'WS'

Silver Contract Address - 0x005851f943ee2957B1748957F26319e4f9EdeBC1 Decimals - 18 Symbol - 'AG'

Sorry, I do not have the token-ids for these 2 tokens. If you know their token-ids, I may add them into prices.usd table.

You may search for their token-ids in this list: https://api.coinpaprika.com/v1/coins/

@IrishLatte19
Copy link
Contributor

Hey @Hosuke, Could you please add 'Wrapped Sonic' and 'Silver' Token in the prices spell as well. Wrapped Sonic Contract Address - 0x832497895f05100E53f42DFA8fC758B4866B183a Decimals - 18 Symbol - 'WS'
Silver Contract Address - 0x005851f943ee2957B1748957F26319e4f9EdeBC1 Decimals - 18 Symbol - 'AG'

Sorry, I do not have the token-ids for these 2 tokens. If you know their token-ids, I may add them into prices.usd table.

You may search for their token-ids in this list: https://api.coinpaprika.com/v1/coins/

If there a way to get the price of Wrapped Sonic (WS)? It is the most traded token on Sonic hence much needed for any dashboard

@Hosuke
Copy link
Collaborator Author

Hosuke commented Dec 30, 2024

Hey @Hosuke, Could you please add 'Wrapped Sonic' and 'Silver' Token in the prices spell as well. Wrapped Sonic Contract Address - 0x832497895f05100E53f42DFA8fC758B4866B183a Decimals - 18 Symbol - 'WS'
Silver Contract Address - 0x005851f943ee2957B1748957F26319e4f9EdeBC1 Decimals - 18 Symbol - 'AG'

Sorry, I do not have the token-ids for these 2 tokens. If you know their token-ids, I may add them into prices.usd table.
You may search for their token-ids in this list: https://api.coinpaprika.com/v1/coins/

If there a way to get the price of Wrapped Sonic (WS)? It is the most traded token on Sonic hence much needed for any dashboard

Currently we are missing sonic price feed, we may use dex.prices or prices.hour later then.

@IrishLatte19
Copy link
Contributor

Okayy! Any idea till when can we expect this data in dex.prices?

@Hosuke
Copy link
Collaborator Author

Hosuke commented Dec 30, 2024

Okayy! Any idea till when can we expect this data in dex.prices?

After this PR and #7399 merged.

@@ -12,8 +12,8 @@ SELECT
, symbol
, decimals
FROM (VALUES
(0x309C92261178fA0CF748A855e90Ae73FDb79EBc7, 'WETH', 18)
, (0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38, 'WS', 18)
(0x50c42dEAcD8Fc9773493ED674b675bE577f2634b, 'WETH', 18)
Copy link
Member

Choose a reason for hiding this comment

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

fyi @Hosuke @IrishLatte19
looks like this is the verified WETH contract address on sonic
https://sonicscan.org/token/0x50c42dEAcD8Fc9773493ED674b675bE577f2634b

(0x309C92261178fA0CF748A855e90Ae73FDb79EBc7, 'WETH', 18)
, (0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38, 'WS', 18)
(0x50c42dEAcD8Fc9773493ED674b675bE577f2634b, 'WETH', 18)
, (0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38, 'wS', 18)
Copy link
Member

Choose a reason for hiding this comment

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

minor update to symbol casing to match block explorer

FROM
(
VALUES
('ftm-fantom', 'wS', 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38, 18) -- looks like FTM <--> S token are same price and 1:1 upgrade according to docs
Copy link
Member

Choose a reason for hiding this comment

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

using FTM for now, since it appears the prices match + there is 1:1 upgrade via their docs. would be nice to update if/when coinpaprika has sonic available

Copy link
Member

Choose a reason for hiding this comment

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

this is by far most transferred token though, i think it's important we include

Comment on lines +21 to +22
data_tests:
- unique
Copy link
Member

Choose a reason for hiding this comment

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

adding unique test. something we should likely have on all prices spells.

Comment on lines +146 to +149
, ('sonic', 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38)
, ('sonic', 0x29219dd400f2Bf60E5a23d13Be72B486D4038894)
, ('sonic', 0x50c42dEAcD8Fc9773493ED674b675bE577f2634b)
, ('sonic', 0xe715cba7b5ccb33790cebff1436809d36cb17e57)
Copy link
Member

Choose a reason for hiding this comment

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

select
    contract_address,
    count(1)
from
    erc20_sonic.evt_transfer
group by
    contract_address
order by
    2 desc
limit
    10

to establish initial trusted tokens, should compliment when we add DEXs to find gaps in amounts calculated

@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed ready-for-review this PR development is complete, please review labels Jan 2, 2025
Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

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

i believe we should be all set now 🙏

@jeff-dude jeff-dude added ready-for-merging and removed in review Assignee is currently reviewing the PR labels Jan 2, 2025
@IrishLatte19
Copy link
Contributor

Thanksss!! @jeff-dude

@jeff-dude jeff-dude merged commit 70f01d0 into duneanalytics:main Jan 3, 2025
6 of 7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dbt: daily covers the Daily dbt subproject dbt: tokens covers the Tokens dbt subproject ready-for-merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants