Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated inverse projection #309

Merged
merged 6 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ pragma solidity ^0.8.13;

import {IInverseProjectedNft} from "./IInverseProjectedNft.sol";

/// @dev A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
/// @dev A standard ERC721 that can be freely minted and stores an unique <minter, userTokenId> pair (used in tokenURI) when minted.
matejos marked this conversation as resolved.
Show resolved Hide resolved
interface IInverseAppProjectedNft is IInverseProjectedNft {
/// @dev Emitted when the globally-enforced tokenId as well as the unique <minter, userTokenId> pair.
/// @dev Emitted when the globally-enforced tokenId in combination with an unique <minter, userTokenId> pair is minted.
event Minted(uint256 indexed tokenId, address indexed minter, uint256 indexed userTokenId);

/// @dev Mints a new token to address `_to`
/// Increases the `totalSupply` and `currentTokenId`.
/// Reverts if `totalSupply` is not less than `maxSupply` or if `_to` is a zero address.
/// Reverts if `_to` is a zero address or if it refers to smart contract but does not implement IERC721Receiver-onERC721Received.
/// Emits the `Minted` event.
function mint(address _to) external returns (uint256);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {IInverseProjectedNft} from "./IInverseProjectedNft.sol";

/// @dev A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
interface IInverseBaseProjectedNft is IInverseProjectedNft {
/// @dev Emitted when the globally-enforced tokenId, and `initialData` provided in the `mint` function parameters.
/// @dev Emitted when the globally-enforced tokenId is minted, with `initialData` provided in the `mint` function parameters.
event Minted(uint256 indexed tokenId, string initialData);

/// @dev Mints a new token to address `_to`, passing `initialData` to be emitted in the event.
/// Increases the `totalSupply` and `currentTokenId`.
/// Reverts if `totalSupply` is not less than `maxSupply` or if `_to` is a zero address.
/// Reverts if `_to` is a zero address or if it refers to smart contract but does not implement IERC721Receiver-onERC721Received.
/// Emits the `Minted` event.
function mint(address _to, string calldata initialData) external returns (uint256);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {IERC4906} from "@openzeppelin/contracts/interfaces/IERC4906.sol";

/// @dev A standard ERC721 that accepts calldata in the mint function for any initialization data needed in a Paima dApp.
/// @dev A standard ERC721 that can be burned and has a special tokenURI function accepting a custom base URI.
interface IInverseProjectedNft is IERC4906 {
/// @dev Emitted when `baseExtension` is updated from `oldBaseExtension` to `newBaseExtension`.
event SetBaseExtension(string oldBaseExtension, string newBaseExtension);
Expand Down