-
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
Add is_creator_token to nft.trades, nft.mints #5836
Add is_creator_token to nft.trades, nft.mints #5836
Conversation
Create new spell for nft.creator_tokens to inspect contracts and flag if they implement the Creator Token Standards Use data from nft.creator_tokens to add is_creator_token field to nft.mints and nft.trades for data analysis.
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Workflow run id 8840262151 approved. |
Workflow run id 8840262329 approved. |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Workflow run id 8840390455 approved. |
Workflow run id 8840390501 approved. |
Workflow run id 8840455703 approved. |
Workflow run id 8840455616 approved. |
Workflow run id 8840568460 approved. |
Workflow run id 8840568575 approved. |
Workflow run id 8840664171 approved. |
Workflow run id 8840664265 approved. |
Workflow run id 8840817049 approved. |
Workflow run id 8840817194 approved. |
Workflow run id 8841178506 approved. |
Workflow run id 8841178591 approved. |
Workflow run id 8841280938 approved. |
Workflow run id 8841281123 approved. |
Workflow run id 8841332006 approved. |
Workflow run id 8842781571 approved. |
Workflow run id 8842781655 approved. |
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.
continuing from the Telegram conversation:
Rob: This seems to be a rather limitbreak specific extension (tracking usage of your erc721 implementation) and so it should not necessarily live within the nft.trades tables. A separate table with this info that can be joined to nft.trades on the smart contract address is the way to go here. I'll put my comments and guidance on the PR and we can continue there.
I suggest removing the integrations for :
macros/models/_sector/nft/enrich_nft_trades.sql
macros/models/_sector/nft/port_to_old_schema.sql
models/_sector/nft/mints/nft_mints.sql
And moving the creator_tokens
models under a models/limitbreak/
directory and a limitbreak
schema.
Thus models/_sector_nft/creator_tokens/nft_creator_tokens.sql
-> models/limitbreak/limitbreak_creator_tokens.sql
The usage will then be a simple join:
select
t.*
l.is_creator_token
from
nft.trades t
left join limitbreak.creator_tokens l
on t.blockchain = l.blockchain
and t.nft_contract_address = l.address
which should be performant enough for user queries.
macros/models/_sector/nft/creator_tokens/creator_tokens_inspect_contracts.sql
Outdated
Show resolved
Hide resolved
macros/models/_sector/nft/creator_tokens/creator_tokens_inspect_contracts.sql
Outdated
Show resolved
Hide resolved
macros/models/_sector/nft/creator_tokens/creator_tokens_inspect_contracts.sql
Outdated
Show resolved
Hide resolved
…t_contracts.sql Co-authored-by: 0xRob <[email protected]>
Workflow run id 8849815133 approved. |
Workflow run id 8849815252 approved. |
…https://github.com/LB-thomasp/spellbook into limit-break-add-is-creator-token-to-trades-and-mints
Workflow run id 8849831253 approved. |
Workflow run id 8849831424 approved. |
Changes have been applied for the With respect to where the Contracts deployed by Creator Token supportTrading volume by Creator Token SupportMagic Eden and OpenSea have both integrated Creator Token Standards into their launchpad products with customizations allowed by the standard and while developing these data sets we have identified other entities have been building their products on the Creator Token Standards without us even being aware of it. Creator Token Standards are reaching a social consensus among businesses and individual developers as the best choice for launching a new token. For those reasons we think it would make sense for data consumers to find the data in a location that is core to NFT's and not in a Limit Break specific sector. With respect to the added column on |
Bumping this up for review based on changes made and feedback provided here as well in the Telegram chat with OpenSea who is a significant consumer of the data being requested. |
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.
At this time we don't feel the integration with nft.trades
is necessary.
That said the creator tokens tables are still valuable to materialize, I suggest following the previous feedback and we can look to finalize this PR.
I suggest removing the integrations for :
macros/models/_sector/nft/enrich_nft_trades.sql
macros/models/_sector/nft/port_to_old_schema.sql
models/_sector/nft/mints/nft_mints.sql
And moving the creator_tokens models under a models/limitbreak/ directory and a limitbreak schema.
Workflow run id 8987614507 approved. |
Workflow run id 8987614745 approved. |
@0xRobin changes have been made per your suggestions, please review for finalization and merge so we can get these materialized for consumers. |
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.
the code looks clean, thank you and welcome to spellbook 🔥
nice collab here to get it prepped for merge. i agree with the feedback, but we look forward to seeing the usage on these and how we can explore expanding nft spells in the near future
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2024 Dune Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
Create new spell for nft.creator_tokens to inspect contracts and flag if they implement the Creator Token Standards
Use data from nft.creator_tokens to add is_creator_token field to nft.mints and nft.trades for data analysis.
Thank you for contributing to Spellbook!
Thank you for taking the time to submit code in Spellbook. A few things to consider:
Best practices
To speed up your development process in PRs, keep these tips in mind:
readme
) and rundbt compile
target/
directory to copy/paste and run on Dune directly for initial query testingWHERE
filter for only ~7 days of history on large source tables, i.e.ethereum.transactions
Incremental model setup
COALESCE()
as needed on key column(s), otherwise the tests may fail on duplicates🪄 Use the built CI tables for testing 🪄
Once CI completes, you can query the CI tables and errors in dune when it finishes running.
run initial models
andtest initial models
, there will be a schema that looks like this:test_schema.git_dunesql_4da8bae_sudoswap_v2_base_pool_creations
Leverage these tables to perform QA testing on Dune query editor -- or even full test dashboards!
Spellbook contribution docs
The docs directory has been implemented to answer as many questions as possible. Please take the time to reference each
.md
file within this directory to understand how to efficiently contribute & why the repo is designed as it is 🪄Example questions to be answered:
Please navigate through the docs directory to find as much info as you can.
Note: happy to take PRs to improve the docs, let us know 🤝