@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/omnichain-deployers-v6",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- // Make sure the 721 received is from the `JBProjects` contract.
331
- if (msg.sender != address(PROJECTS)) revert JBOmnichainDeployer_UnexpectedNFTReceived();
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
  }