0

I came across an ERC1155 nft token which is at the same time owned by two wallet addresses. I asked a friend how is that possible and they told me that ERC1155 tokens can be owned by multiple accounts at the same time and it is kind of like a partial ownership.

  1. Is this correct?
  2. Let's say this NFT is in both wallet A and B. What happens if wallet A transfers it to wallet B? Because the wallet B already has this token.

1 Answer 1

1
  1. Correct - the smart contract can be built so people can own fractions of a token, that token is then represented as a % of the specified NFT ID.

  2. If the contract is built correctly - the transaction simply won't execute, you can try submitting the tx and will probably be charged a huge amount of gas but because the function to have duplicate IDs under one address doesn't exist it's in violation of the code so it just fails. See examples - as you can see there are numerous considerations to the logic here.

    function depositAsset() public {
        require(!deposited, "NFT already deposited");
        msg.sender.transfer(address(this).balance);
        asset.transferFrom(msg.sender, address(this), assetId);
        deposited = true;
    }
    modifier isTransferable(address _from, address _to) {
        require(asset.ownerOf(assetId) == address(this), "asset not owned");
        require(!approved[_from], "transfer from account that approved the sale");
        require(!approved[_to], "transfer to account that approved the sale");
        require(!sold, "asset already sold"); // can we allow token transfer after the sale?
        _;
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.