Replies: 16 comments 2 replies
-
Not sure this is the right issue for this, on discord we discussed that users may want to bridge their nfts to starknet to take advantage of the low low gas fees. Issues I see that can arise from this:
|
Beta Was this translation helpful? Give feedback.
-
I also wonder how NFTs bridges should/will look like. |
Beta Was this translation helpful? Give feedback.
-
Let me start by prefacing I'm only concerned about bridging from L1 to L2, not from L2 to L1 or from L2 to L2 (which is a much harder problem from what I understand). I'm also looking at this from the point of view of individual users that want to move their NFT to a Layer-2 to take advantage of the cheap services there, not from projects that want to migrate entirely on L2.
Agree. On the other hand users could query information that is outdated or wrong which is pretty dangerous. Basically I'm wondering if we can make it convenient and foolproof.
If I'm writing a dapp frontend I want to know if the ERC-721 I'm looking at is an L2 one or bridged. If it's bridged I want to know what's the original L1 token so that, for example, I can use the L1 interface BridgedERC721 {
function l1Address() view returns address;
function l1ChainId() view returns uint256;
}
I started thinking about this too and I would love to hear more from others. At the moment there are not many NFT bridges available. One advantage of StarkNet is that it should be possible to go back from L2 to L1 in less than a day and not a week like other Layer 2. |
Beta Was this translation helpful? Give feedback.
-
@0xsoon mentioned on twitter that Vitalik wrote a post about it |
Beta Was this translation helpful? Give feedback.
-
I wonder, for the tokens that originate in L2, what the pattern is in the event of a roll-up fallback event. You inherit the L1 security and can recover your token on L1 (at some cost). This would involve minting, and does this imply that an L2 token points to a contract factory on L1? |
Beta Was this translation helpful? Give feedback.
-
My intuition is that the token URI should not be copied, and the L2/bridged NFT should just redirect the client to fetch the URI from the L1/original chain. XLNT/use.nifti.es is kind of a way to do this. It offers an endpoint to fetch metadata of an arbitrary NFT from any chain. This is a centralized service so it would not work as is, but I believe the solution should look something like it. The original NFT remains the source of truth, and dynamic URIs would in theory be seamlessly supported. I would consider definining a new URI protocol inspired by use.nifti.es, together with a library that can resolve those URIs. Curious if @shrugs has any input, as the author of use.nifti.es! |
Beta Was this translation helpful? Give feedback.
-
it would be best if clients knew to fetch metadata from the L1 contracts but i'm not sure if there's a way to do that automatically without a proxy like you mentioned with use.nifti.es. centralized definitely wouldn't be ok for such a core piece of infrastructure. the freeze doesn't feel like a perfect idea either. what about a new URI scheme that indicates that one should search on a specific chain for a token's metadata? like ( |
Beta Was this translation helpful? Give feedback.
-
I like this idea a lot! I'm concerned how you would support a ERC-721 (1155) that doesn't implement |
Beta Was this translation helpful? Give feedback.
-
if L1 token doesn't support metadata, neither should L2, since there's nothing to display, right? |
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't express myself clearly. How would a dapp or smart contract know a token is a bridged token if they cannot inspect the tokenuri? Should a dapp even care if a token is bridged if there is no token uri? |
Beta Was this translation helpful? Give feedback.
-
A URI scheme like that is exactly what I was thinking! If the original NFT doesn't implement ERC721Metadata, I think the bridged NFT should still offer a tokenURI and the client upon being redirected would find that there is no metadata to be shown. |
Beta Was this translation helpful? Give feedback.
-
ah yeah that makes sense and has fewer edge cases. then the spec for L2 tokens is quite simply "a token uri always exists, follow the redirect as you choose, and then resolve as in EIP-721/EIP-1155 as before" |
Beta Was this translation helpful? Give feedback.
-
There is a project to register a |
Beta Was this translation helpful? Give feedback.
-
yeah that seems ideal tbh |
Beta Was this translation helpful? Give feedback.
-
Related to ERC-721 is how should we handle the NFT royalty standard. |
Beta Was this translation helpful? Give feedback.
-
Hello! The discussion is a bit old, but here is my take on this @martriay.
This solution can always be used (independently if Starknet supports long strings or not), as it allows the Dapp to directly go to the source of the token URI. That also solves the @fracek proposal of knowing when a token was bridged or not. With the Talking more about Starknet, if we want easy adoption for creators to upload their collections, we must support natively at least A first solution can be that, We can also imaging that the first Or better than an array, a tuple perhaps? Struct? token_uri(token_id: u256) -> (felt252, Span<felt252>);
struct TokenUri {
len: felt252,
content: Span<felt252>,
} Hope that can be interesting, I do like the |
Beta Was this translation helpful? Give feedback.
-
What considerations should we have in mind when developing the L2 version of ERC721?
Beta Was this translation helpful? Give feedback.
All reactions