I am doing a two step minting process.
user will setApprovalForAll for a new contract to transfer old tokens
user will burn old tokens and mint new ones from the new contract
Burn and mint function below:
function BurnBabyBurn()
public
{
require(burnIsActive, "burn must be active to mint Final");
require(BurnContract(piecesAddress).balanceOf(msg.sender, burnPieceIds[0]) > 0, "Must
have a balance for each piece");
BurnContract(piecesAddress).safeTransferFrom(msg.sender, to, burnPieceIds[0],
burnPieceAmounts[0], "");
_mint(msg.sender, finalPieceId, 1, "");
}
When I run this on Mumbai everything works as expected. When I switch to matic mainnet I start to receive this error
"execution reverted: AssetContractShared#creatorOnly: ONLY_CREATOR_ALLOWED"
The tokens we are burning come from the opensea collectibles contract(0x2953399124F0cBB46d2CbACD8A89cF0599974963). Inside of that contract there is a modifier
/**
* @dev Require msg.sender to be the creator of the token id
*/
modifier creatorOnly(uint256 _id) {
require(
_isCreatorOrProxy(_id, _msgSender()),
"AssetContractShared#creatorOnly: ONLY_CREATORALLOWED"
);
;
}
But this is where I am very confused as the modifier is only added to these functions: Mint, setURI, setPermanentURI, setCreator
Im not calling any of these functions. any idea why this could be happening?
Interface used above:
interface BurnContract {
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
}