Intercoin / NFTremixContract

GNU General Public License v3.0
0 stars 1 forks source link

Feature "NFT fork" #1

Open artman325 opened 2 years ago

artman325 commented 2 years ago
artman325 commented 2 years ago

Greg wrote

So you can inherit across contracts

Here is a real example:

Gregory Magarshak, [29.03.2022 18:14]
pooh is contract CA series A
piglet is contract CC series B
now we make cartoon about both and it is contract CC series C

Now I am saying we pick some id which was not yet sold in any of these series

A0087afc000000
B0087afc000000
C0087afc000000

They are different tokenIds on different contracts
But they may be on same contract

Transferring can only be done of C0087afc000000 because NFTremix would revert if you try to transfer a tokenId of a series that has children.

And if you transfer C0087afc000000 it will DELEGATECALL transfer hook in the NFTremix and that in turn will transfer the other two in other contracts. Thats all !

seems there are some things

EGreg commented 2 years ago

You are supposed to DELEGATECALL from NFT to NFTremix and thrn DELEGATECALL again from NFTremix to other NFT. So since everything is DELEGATECALL, it should work.

The only thing is that the memory layout should be compatible across the two contracts since it is delegatecall

On Tue, Mar 29, 2022 at 2:59 PM artman325 @.***> wrote:

Greg wrote

So you can inherit across contracts

Here is a real example:

Gregory Magarshak, [29.03.2022 18:14] pooh is contract CA series A piglet is contract CC series B now we make cartoon about both and it is contract CC series C

Now I am saying we pick some id which was not yet sold in any of these series

A0087afc000000 B0087afc000000 C0087afc000000

They are different tokenIds on different contracts But they may be on same contract

Transferring can only be done of C0087afc000000 because NFTremix would revert if you try to transfer a tokenId of a series that has children.

And if you transfer C0087afc000000 it will DELEGATECALL transfer hook in the NFTremix and that in turn will transfer the other two in other contracts. Thats all !

seems there are some things

  • if user will make first buy(primary sell) then contract initiate two buy's transactions: pooh CA and piglet in CC. if any of them will not revert(nft can be already exists !!!). And after that we try to buy cartton token CC series C.
  • big problem will happens via transfer C0087afc000000. if try to delegatecall in transfer method contract C then context will be CC but not User. so it can not be applicable for ANY external contract.

— Reply to this email directly, view it on GitHub https://github.com/Intercoin/NFTremixContract/issues/1#issuecomment-1082260797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACV7PZQGZ5EWSCYRZEIFXLVCNHKVANCNFSM5PEWLIEQ . You are receiving this because you were assigned.Message ID: @.***>

-- Sincerely, Greg Magarshak Qbix Inc.

(To set up a meeting: https://calendly.com/qbix/meeting)