-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added erc721/erc1155 onreceived * added test case for receive
- Loading branch information
Showing
12 changed files
with
116 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "solady/tokens/ERC1155.sol"; | ||
|
||
contract MockERC1155 is ERC1155 { | ||
function test_ignore() public {} | ||
|
||
function uri(uint256) public pure override returns (string memory) { | ||
return "https://example.com"; | ||
} | ||
|
||
function mint(address to, uint256 id, uint256 amount, bytes memory data) public { | ||
_mint(to, id, amount, data); | ||
} | ||
|
||
function batchMint(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public { | ||
_batchMint(to, ids, amounts, 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,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "solady/tokens/ERC20.sol"; | ||
|
||
contract MockERC20 is ERC20 { | ||
constructor() ERC20() {} | ||
|
||
function test_ignore() public {} | ||
|
||
function name() public pure override returns (string memory) { | ||
return "MockERC20"; | ||
} | ||
|
||
function symbol() public pure override returns (string memory) { | ||
return "MOCK"; | ||
} | ||
|
||
function mint(address _to, uint256 _amount) external { | ||
_mint(_to, _amount); | ||
} | ||
} |
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,30 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "solady/tokens/ERC721.sol"; | ||
|
||
contract MockERC721 is ERC721 { | ||
constructor() ERC721() {} | ||
|
||
function test_ignore() public {} | ||
|
||
function name() public pure override returns (string memory) { | ||
return "MockERC721"; | ||
} | ||
|
||
function symbol() public pure override returns (string memory) { | ||
return "MOCK"; | ||
} | ||
|
||
function tokenURI(uint256) public pure override returns (string memory) { | ||
return ""; | ||
} | ||
|
||
function mint(address _to, uint256 _id) external { | ||
_mint(_to, _id); | ||
} | ||
|
||
function safeMint(address _to, uint256 _id) external { | ||
_safeMint(_to, _id); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.