@bananapus/omnichain-deployers-v6 0.0.37 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -325,10 +325,12 @@ contract JBOmnichainDeployer is
|
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
/// @dev Make sure this contract can only receive project NFTs from `JBProjects
|
|
329
|
-
function onERC721Received(address, address, uint256, bytes calldata) external view returns (bytes4) {
|
|
330
|
-
//
|
|
331
|
-
if (msg.sender != address(PROJECTS)
|
|
328
|
+
/// @dev Make sure this contract can only receive project NFTs minted from `JBProjects` (not transferred).
|
|
329
|
+
function onERC721Received(address, address from, uint256, bytes calldata) external view returns (bytes4) {
|
|
330
|
+
// Only accept mints (from == address(0)) from the `JBProjects` contract, not arbitrary transfers.
|
|
331
|
+
if (msg.sender != address(PROJECTS) || from != address(0)) {
|
|
332
|
+
revert JBOmnichainDeployer_UnexpectedNFTReceived();
|
|
333
|
+
}
|
|
332
334
|
|
|
333
335
|
return IERC721Receiver.onERC721Received.selector;
|
|
334
336
|
}
|