Skip to content

Commit

Permalink
SEQ-1 Remove ERC1155 Meta transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ScreamingHawk committed Jan 4, 2024
1 parent f6d4dd7 commit b32f88b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/tokens/ERC1155/ERC1155BaseToken.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.19;

import {ERC1155Supply, ERC1155} from "@0xsequence/contracts-library/tokens/ERC1155/extensions/supply/ERC1155Supply.sol";
import {ERC1155Meta} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Meta.sol";
import {
ERC1155Supply, ERC1155
} from "@0xsequence/contracts-library/tokens/ERC1155/extensions/supply/ERC1155Supply.sol";
import {ERC1155Metadata} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Metadata.sol";
import {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";

Expand All @@ -11,7 +12,7 @@ error InvalidInitialization();
/**
* A standard base implementation of ERC-1155 for use in Sequence library contracts.
*/
abstract contract ERC1155BaseToken is ERC1155Supply, ERC1155Meta, ERC1155Metadata, ERC2981Controlled {
abstract contract ERC1155BaseToken is ERC1155Supply, ERC1155Metadata, ERC2981Controlled {
bytes32 internal constant METADATA_ADMIN_ROLE = keccak256("METADATA_ADMIN_ROLE");

string private _contractURI;
Expand Down Expand Up @@ -119,11 +120,10 @@ abstract contract ERC1155BaseToken is ERC1155Supply, ERC1155Meta, ERC1155Metadat
public
view
virtual
override (ERC1155Supply, ERC1155Metadata, ERC2981Controlled, ERC1155)
override (ERC1155Supply, ERC1155Metadata, ERC2981Controlled)
returns (bool)
{
return ERC1155Supply.supportsInterface(interfaceId) || ERC1155Metadata.supportsInterface(interfaceId)
|| ERC1155.supportsInterface(interfaceId) || ERC2981Controlled.supportsInterface(interfaceId)
|| super.supportsInterface(interfaceId);
|| ERC2981Controlled.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);
}
}
4 changes: 2 additions & 2 deletions src/tokens/ERC1155/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This subsection contains contracts related to the [ERC1155 token standard](https

This contract is a base implementation of the ERC-1155 token standard. It includes role based access control features from the [OpenZeppelin AccessControlEnumberable](https://docs.openzeppelin.com/contracts/4.x/access-control) contract, to provide control over added features. Please refer to OpenZeppelin documentation for more information on `AccessControlEnumberable`.

This contracts provide minting capabilities, support for meta transactions, and metadata functionality. It includes additional features from the ERC1155MintBurn, ERC1155Meta, and ERC1155Metadata contracts. Meta transactions are provided by the [0xSequence ERC1155 library](https://github.com/0xsequence/erc-1155/blob/master/SPECIFICATIONS.md#meta-transactions). Please refer to library documentation for more information on meta transactions.
This contracts provide minting capabilities, support for meta transactions, and metadata functionality. It includes additional features from the ERC1155MintBurn and ERC1155Metadata contracts. Please refer to library documentation for more information on meta transactions.

The contract supports the [ERC2981 token royalty standard](https://eips.ethereum.org/EIPS/eip-2981) via the ERC2981Controlled contract. Please refer to the ERC2981Controlled documentation for more information on token royalty.

Expand Down Expand Up @@ -39,7 +39,7 @@ This section of this repo utilitizes a factory pattern that deploys proxies cont

## Dependencies

This repository relies on the ERC1155, ERC1155MintBurn, ERC1155Meta, ERC1155Metadata contracts from 0xSequence for core ERC-1155 functionality, `AccessControlEnumberable` from OpenZeppelin for role base permissions and the ERC2981Controlled contract for handling of royalties.
This repository relies on the ERC1155, ERC1155MintBurn, ERC1155Metadata contracts from 0xSequence for core ERC-1155 functionality, `AccessControlEnumberable` from OpenZeppelin for role base permissions and the ERC2981Controlled contract for handling of royalties.

## Access Controls

Expand Down
5 changes: 0 additions & 5 deletions test/tokens/ERC1155/presets/ERC1155Items.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,13 @@ contract ERC1155ItemsTest is TestHelper, IERC1155ItemsSignals {
checkSelectorCollision(0xb48ab8b6); // batchMint(address,uint256[],uint256[],bytes)
checkSelectorCollision(0xb390c0ab); // burn(uint256,uint256)
checkSelectorCollision(0xe8a3d485); // contractURI()
checkSelectorCollision(0x2d0335ab); // getNonce(address)
checkSelectorCollision(0x248a9ca3); // getRoleAdmin(bytes32)
checkSelectorCollision(0x9010d07c); // getRoleMember(bytes32,uint256)
checkSelectorCollision(0xca15c873); // getRoleMemberCount(bytes32)
checkSelectorCollision(0x2f2ff15d); // grantRole(bytes32,address)
checkSelectorCollision(0x91d14854); // hasRole(bytes32,address)
checkSelectorCollision(0xf8954818); // initialize(address,string,string,string,address,uint96)
checkSelectorCollision(0xe985e9c5); // isApprovedForAll(address,address)
checkSelectorCollision(0xfa4e12d7); // isValidSignature(address,bytes32,bytes,bytes)
checkSelectorCollision(0xa3d4926e); // metaSafeBatchTransferFrom(address,address,uint256[],uint256[],bool,bytes)
checkSelectorCollision(0xce0b514b); // metaSafeTransferFrom(address,address,uint256,uint256,bool,bytes)
checkSelectorCollision(0xf5d4c820); // metaSetApprovalForAll(address,address,bool,bool,bytes)
checkSelectorCollision(0x731133e9); // mint(address,uint256,uint256,bytes)
checkSelectorCollision(0x06fdde03); // name()
checkSelectorCollision(0x36568abe); // renounceRole(bytes32,address)
Expand Down

0 comments on commit b32f88b

Please sign in to comment.