Add GUIDELINES.md for marking abstract contracts (#4010)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <fg@frang.io>
This commit is contained in:
Ernesto García
2023-06-14 13:01:33 -06:00
committed by GitHub
parent 7cc2cbfeb5
commit 5cc1ea0a39
8 changed files with 14 additions and 7 deletions

View File

@ -17,7 +17,7 @@ import "../../interfaces/draft-IERC6093.sol";
*
* _Available since v3.1._
*/
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;

View File

@ -13,7 +13,7 @@ import "./ERC1155Receiver.sol";
*
* @dev _Available since v3.1._
*/
contract ERC1155Holder is ERC1155Receiver {
abstract contract ERC1155Holder is ERC1155Receiver {
function onERC1155Received(
address,
address,

View File

@ -35,7 +35,7 @@ import "../../interfaces/draft-IERC6093.sol";
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;

View File

@ -16,7 +16,7 @@ import "../../interfaces/draft-IERC6093.sol";
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
using Strings for uint256;
// Token name

View File

@ -11,7 +11,7 @@ import "../IERC721Receiver.sol";
* Accepts all token transfers.
* Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
*/
contract ERC721Holder is IERC721Receiver {
abstract contract ERC721Holder is IERC721Receiver {
/**
* @dev See {IERC721Receiver-onERC721Received}.
*