Is there a front-running concern with setParentNFT
?
For example, I send CoolNft #442
to the MFNFT
contract, then I call setParentNFT(CoolNft, 442, 100)
.
Before my transaction is included, some third party calls setParentNFT(CoolNft, 442, 1)
.
Would it make more sense to write this EIP as a direct extension of EIP-1155?
interface MFNFT is IERC1155 {
/**
@notice Sets the NFT as a new type token
@dev The contract itself should verify if the ownership of NFT is belongs to this contract itself with the `_parentNFTContractAddress` & `_parentNFTTokenId` before adding the token.
MUST revert if the same NFT is already registered.
MUST revert if `_parentNFTContractAddress` is address zero.
MUST revert if `_parentNFTContractAddress` is not ERC-721 compatible.
MUST revert if this contract itself is not the owner of the NFT.
MUST revert on any other error.
MUST emit `TokenAddition` event to reflect the token type addition.
@param _parentNFTContractAddress NFT contract address
@param _parentNFTTokenId NFT tokenID
@param _totalSupply Total token supply
*/
function setParentNFT(address _parentNFTContractAddress, uint256 _parentNFTTokenId, uint256 _totalSupply) external;
/**
@notice Get the bool value which represents whether the NFT is already registered and fractionalized by this contract.
@param _parentNFTContractAddress NFT contract address
@param _parentNFTTokenId NFT tokenID
@return The bool value representing the whether the NFT is already registered.
*/
function isRegistered(address _parentNFTContractAddress, uint256 _parentNFTTokenId) external view returns (bool);
}