이더리움의 safemint를 implement해서 민팅시에 opensea에 nft가 뜨지않습니다

그냥 일반 민트 펑션을 이용한것과 erc721의 safemint 함수를 실행한 트랜젝션을 비교해봤는데
차이점을 못찾겠는데도 불구하고 opensea testnet에서 safemint실행하여 민팅한 nft는 뜨지 않네요…
뭐가 잘못된걸까요? 유일하게 찾은 다른점은 input data의 decoded value입니다.
컨트랙은 다 쓰고 테스트를 하는 중이었는데 생각지도 못한곳에서 시간이 지체되고 있네요 .ㅜㅜ

트랜젝션
kip17의 mint function

erc721의 safeMint를 implement한것

아래는 safemint function입니다

    function _safeMint(address to, uint256 quantity, bytes memory _data) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "KIP17: mint to the zero address");
        // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
        require(!_exists(startTokenId), "KIP17: token already minted");
        require(quantity <= maxBatchSize, "KIP17: quantity to mint too high");

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        AddressData memory addressData = _addressData[to];
        _addressData[to] = AddressData(
            addressData.balance + uint128(quantity),
            addressData.numberMinted + uint128(quantity)
        );
        _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

        uint256 updatedIndex = startTokenId;

        for (uint256 i = 0; i < quantity; i++) {
            emit Transfer(address(0), to, updatedIndex);
            require(
                _checkOnKIP17Received(address(0), to, updatedIndex, _data),
                "KIP17: transfer to non KIP17Receiver implementer"
            );
            updatedIndex++;
        }

        currentIndex = updatedIndex;
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

무엇이 문제일까요…ㅜㅜ

@STF

Opensea 에서 표시해주는 매커니즘을 먼저 아셔야할 거 같습니다.
그들이 어떤 NFT를 보여주는지를 먼저 파악하고 해당 인터페이스에 맞춰서 테스트를 해보시는 게 좋을 거 같습니다.

답변 감사합니다. 결국 코드를 수정하여 해결하였는데 궁금한점은 말씀하신 interface가 interfaceid를 말씀하시는건가요? 그부분을 건드려보다 시간이 촉박하여 다른방식으로 고쳤는데 궁금해서 여쭤봅니다

@STF

제가 말씀드린 인터페이스는 Opensea 에서 NFT를 보여주는 매커니즘을 말씀드린 겁니다 :slight_smile:

예를 들어 safeTransfer 를 사용해서 민팅한 것만 파싱해서 보여준다던가 하는 매커니즘을 먼저 정확하게 파악하고 (오픈씨의 문서 등을 통해 확인) 그걸 토대로 놓친 게 있는지를 점검해보면 좋을 거 같다는 의미였습니다.

아하 감사합니다 Denver님 !:slight_smile:
확인해보도록 하겠습니다 ^^

1개의 좋아요