-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add onReceive ERC721 and ERC1155 check
- Loading branch information
Showing
4 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.23; | ||
|
||
import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | ||
|
||
/// @title MockERC1155 | ||
/// @notice MockERC1155 is a mock implementation of ERC1155 token. | ||
/// IT SHOULD NEVER BE USED IN PRODUCTION. | ||
contract MockERC1155 is ERC1155 { | ||
constructor() ERC1155("") { } | ||
|
||
function mint(address _to, uint256 _id, uint256 _value, bytes memory _data) public { | ||
_mint(_to, _id, _value, _data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity 0.8.23; | ||
|
||
import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | ||
|
||
/// @title MockERC721 | ||
/// @notice MockERC721 is a mock implementation of ERC721 token. | ||
/// IT SHOULD NEVER BE USED IN PRODUCTION. | ||
contract MockERC721 is ERC721 { | ||
constructor() ERC721("MockERC721", "ERC721") { } | ||
|
||
function mint(address _to, uint256 _id) public { | ||
_mint(_to, _id); | ||
} | ||
} |