mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-26 19:26:33 +00:00
Fix .gitignore: stop tracking ignored files
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
contract ERC165MaliciousData {
|
||||
function supportsInterface(bytes4) public pure returns (bool) {
|
||||
assembly {
|
||||
mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
|
||||
return(0, 32)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
contract ERC165MissingData {
|
||||
function supportsInterface(bytes4 interfaceId) public view {} // missing return
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
contract ERC165NotSupported {}
|
||||
@@ -0,0 +1,18 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "../../utils/introspection/IERC165.sol";
|
||||
|
||||
contract ERC165ReturnBombMock is IERC165 {
|
||||
function supportsInterface(bytes4 interfaceId) public pure override returns (bool) {
|
||||
if (interfaceId == type(IERC165).interfaceId) {
|
||||
assembly {
|
||||
mstore(0, 1)
|
||||
}
|
||||
}
|
||||
assembly {
|
||||
return(0, 101500)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user