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

Cross-chain NFT #482

Open
mypeaceduck opened this issue May 29, 2024 · 1 comment
Open

Cross-chain NFT #482

mypeaceduck opened this issue May 29, 2024 · 1 comment

Comments

@mypeaceduck
Copy link

mypeaceduck commented May 29, 2024

Hello.

I create cross-chain NFT:

ETH: 1-100 NFT IDs
BSC: 101-200 NFT IDs
FIL: 201-300 NFT IDs

https://github.com/chiru-labs/ERC721A/blob/main/contracts/ERC721A.sol#L977

The coinage restriction does not allow NFT to be burned on ETH and minted on FIL.
It is possible to make the restriction not
tokenId <= _sequentialUpTo()
to
tokenId > _startTokenId() && tokenId <= _sequentialUpTo()

If I burn the token, can I mint _mintSpot it with the same ID within the range?

Thx.

@Nlferu
Copy link

Nlferu commented Nov 5, 2024

Hi @mypeaceduck

I have the same problem, but I see your architecture is different. To understand your approach better, are you minting all 300 NFTS among 3 blockchains on the same time? So lets say user on ETH is minting 1-100 NFT's cross-chain message is sent to BSC and FIL and there we mint 101-200 and 201-300 NFT's?

I have taken approach where I mint some NFT's for user on source chain then only on cross-chain tokens transfer i mint the same amount on destination chain (locking those tokenIds on source chain), but indeed I had to make source chain to _startTokenId return 2 then on destination chain i had to override _sequentialUpTo retrun 1... This doesnt look good i know but I can use _spotMint now for 1st NFT token created (which is tokenId = 2) otherwise if we wouldnt change startId then we couldnt transfer tokenId = 0 and we couldnt even transfer tokenId = 1 as _sequentialUpTo needs to be greater than _startTokenId. I do also think minting straight away on all chains is just unnecessarily expensive.

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