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

Understanding multiple trait definitions #184

Open
whoabuddy opened this issue Jun 11, 2024 · 2 comments
Open

Understanding multiple trait definitions #184

whoabuddy opened this issue Jun 11, 2024 · 2 comments

Comments

@whoabuddy
Copy link
Member

whoabuddy commented Jun 11, 2024

During the last Clarity WG on 6/11/2024 call we discussed traits for SIP-009 and SIP-010, and there was some confusion over whether everyone has to use the same trait reference or if someone can use a duplicate.

Pulling from my memory, it should be possible to use a trait deployed at your own address as long as the trait contains the same code as the SIP-009 and SIP-010 traits on mainnet.

In practice there may have been some challenges with this:

  • how does this affect DEX or NFT marketplaces?
  • how does this affect SIPs like SIP-019 for metadata, which uses SIP-009 and SIP-010 traits?
  • how are people handling which trait to use now?
  • is this defined anywhere in more detail that we can reference?

This older PR added the trait definitions to each SIP, which are now out of date for testnet following the reset.

Tagging @obycode and @setzeus for additional reseearch and input to start!

Also @jcnelson time permitting - I remember we've discussed this topic in past blockchain meetings!

@whoabuddy
Copy link
Member Author

From @obycode - a test showing trait compatibility.
https://github.com/obycode/trait-test

@friedger
Copy link
Contributor

friedger commented Sep 16, 2024

There is an incompatibility when we want to deal with bar and bar-2 in the meta contract foo.

Example: A SIP-11 token takes a commission trait when tokens are sold. A marketplace contract would not be able to define a trait for these tokens if the tokens have not used the same trait as their commission trait.

For test showing incompatibility see obycode/trait-test#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants