Skip to content

Commit

Permalink
[gms-1228] remove draft references from 1155 (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonzwli authored Mar 26, 2024
1 parent d90165c commit 87bcbf8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ pragma solidity 0.8.19;
import {ImmutableERC1155Base} from "../abstract/ImmutableERC1155Base.sol";

/**
* @title draft-ImmutableERC1155
* @author
* @notice This contract is experimental and is in draft. It should be thoroughly reviewed before using.
* It is possible for this contract to receive breaking changes, and backwards compatibility is not insured.
* @title ImmutableERC1155
* @author @jasonzwli, Immutable
*/

contract ImmutableERC1155 is ImmutableERC1155Base {
Expand Down
22 changes: 22 additions & 0 deletions contracts/token/erc1155/preset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ERC1155 contracts

The ImmutableERC1155 contracts allows clients to mint multiple different tokens with different token ids within the same collection. The contract features methods to allow for minting multiples of multiple token ids to simplify the minting flow and reduce gas costs. This contract is built on top of the [Openzeppelin implemention of EIP-1155](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol).

[Read more On the Threat Model](../../../audits/202312-threat-model-preset-erc1155.md)
[Read more On the EIP](https://eips.ethereum.org/EIPS/eip-1155)

## preset/ImmutableERC1155

The ImmutableERC1155 contract is a version of the Immutable's preset 1155 contract. It has been internally audited and is ready to be used. The contract contains all external facing interfaces that are needed to interact(read and write) with deployed ERC1155 collections.

## abstract/ERC1155Permit

This is an abstract contract that is used as an ancestor to the preset 1155. It contains the permit feature for the preset, allowing token owners to give approval and permission to a secure and trusted actor. This action is gasless for the token owner but will require gas from the approved operator. Please note that using permits in an ERC1155 collections exposes all the tokens owned by an address to the approved operator. Please double check to make sure the operator is secure and trusted.

## abstract/IERC1155Permit

Provides the required interface for ERC1155Permit.

## abstract/ImmutableERC1155Base

This is another abstract contract used as an ancestor to the preset 1155. It implements many of the internal methods for the preset that are not directly public facing for everyday uses. It contains functionalities to update royalties, set URIs and manage collection roles.
2 changes: 1 addition & 1 deletion test/token/erc1155/ImmutableERC1155.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity 0.8.19;

import "forge-std/Test.sol";
import {ImmutableERC1155} from "../../../contracts/token/erc1155/preset/draft-ImmutableERC1155.sol";
import {ImmutableERC1155} from "../../../contracts/token/erc1155/preset/ImmutableERC1155.sol";
import {IImmutableERC1155Errors} from "../../../contracts/errors/Errors.sol";
import {OperatorAllowlistEnforcementErrors} from "../../../contracts/errors/Errors.sol";
import {OperatorAllowlistUpgradeable} from "../../../contracts/allowlist/OperatorAllowlistUpgradeable.sol";
Expand Down

0 comments on commit 87bcbf8

Please sign in to comment.