그냥 일반 민트 펑션을 이용한것과 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);
}
무엇이 문제일까요…ㅜㅜ