Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c4bb465e
Unverified
Commit
c4bb465e
authored
Nov 10, 2022
by
mergify[bot]
Committed by
GitHub
Nov 10, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3946 from ethereum-optimism/sc/ctb-move-mintable-interface
fix: move MintableERC721 interface
parents
d188e795
6fbd06e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
78 deletions
+75
-78
L2ERC721Bridge.sol
packages/contracts-bedrock/contracts/L2/L2ERC721Bridge.sol
+1
-1
IOptimismMintableERC721.sol
...s-bedrock/contracts/universal/IOptimismMintableERC721.sol
+0
-76
OptimismMintableERC721.sol
...ts-bedrock/contracts/universal/OptimismMintableERC721.sol
+1
-1
SupportedInterfaces.sol
...racts-bedrock/contracts/universal/SupportedInterfaces.sol
+73
-0
No files found.
packages/contracts-bedrock/contracts/L2/L2ERC721Bridge.sol
View file @
c4bb465e
...
@@ -4,7 +4,7 @@ pragma solidity 0.8.15;
...
@@ -4,7 +4,7 @@ pragma solidity 0.8.15;
import { ERC721Bridge } from "../universal/ERC721Bridge.sol";
import { ERC721Bridge } from "../universal/ERC721Bridge.sol";
import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import { L1ERC721Bridge } from "../L1/L1ERC721Bridge.sol";
import { L1ERC721Bridge } from "../L1/L1ERC721Bridge.sol";
import { IOptimismMintableERC721 } from "../universal/
IOptimismMintableERC721
.sol";
import { IOptimismMintableERC721 } from "../universal/
SupportedInterfaces
.sol";
import { Semver } from "../universal/Semver.sol";
import { Semver } from "../universal/Semver.sol";
/**
/**
...
...
packages/contracts-bedrock/contracts/universal/IOptimismMintableERC721.sol
deleted
100644 → 0
View file @
d188e795
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {
IERC721Enumerable
} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
/**
* @title IOptimismMintableERC721
* @notice Interface for contracts that are compatible with the OptimismMintableERC721 standard.
* Tokens that follow this standard can be easily transferred across the ERC721 bridge.
*/
interface IOptimismMintableERC721 is IERC721Enumerable {
/**
* @notice Emitted when a token is minted.
*
* @param account Address of the account the token was minted to.
* @param tokenId Token ID of the minted token.
*/
event Mint(address indexed account, uint256 tokenId);
/**
* @notice Emitted when a token is burned.
*
* @param account Address of the account the token was burned from.
* @param tokenId Token ID of the burned token.
*/
event Burn(address indexed account, uint256 tokenId);
/**
* @notice Mints some token ID for a user, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* @param _to Address of the user to mint the token for.
* @param _tokenId Token ID to mint.
*/
function safeMint(address _to, uint256 _tokenId) external;
/**
* @notice Burns a token ID from a user.
*
* @param _from Address of the user to burn the token from.
* @param _tokenId Token ID to burn.
*/
function burn(address _from, uint256 _tokenId) external;
/**
* @notice Chain ID of the chain where the remote token is deployed.
*/
function REMOTE_CHAIN_ID() external view returns (uint256);
/**
* @notice Address of the token on the remote domain.
*/
function REMOTE_TOKEN() external view returns (address);
/**
* @notice Address of the ERC721 bridge on this network.
*/
function BRIDGE() external view returns (address);
/**
* @notice Chain ID of the chain where the remote token is deployed.
*/
function remoteChainId() external view returns (uint256);
/**
* @notice Address of the token on the remote domain.
*/
function remoteToken() external view returns (address);
/**
* @notice Address of the ERC721 bridge on this network.
*/
function bridge() external view returns (address);
}
packages/contracts-bedrock/contracts/universal/OptimismMintableERC721.sol
View file @
c4bb465e
...
@@ -7,7 +7,7 @@ import {
...
@@ -7,7 +7,7 @@ import {
import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
import { IOptimismMintableERC721 } from "./
IOptimismMintableERC721
.sol";
import { IOptimismMintableERC721 } from "./
SupportedInterfaces
.sol";
/**
/**
* @title OptimismMintableERC721
* @title OptimismMintableERC721
...
...
packages/contracts-bedrock/contracts/universal/SupportedInterfaces.sol
View file @
c4bb465e
...
@@ -3,6 +3,9 @@ pragma solidity ^0.8.0;
...
@@ -3,6 +3,9 @@ pragma solidity ^0.8.0;
// Import this here to make it available just by importing this file
// Import this here to make it available just by importing this file
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {
IERC721Enumerable
} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
/**
/**
* @title IOptimismMintableERC20
* @title IOptimismMintableERC20
...
@@ -33,3 +36,73 @@ interface ILegacyMintableERC20 {
...
@@ -33,3 +36,73 @@ interface ILegacyMintableERC20 {
function burn(address _from, uint256 _amount) external;
function burn(address _from, uint256 _amount) external;
}
}
/**
* @title IOptimismMintableERC721
* @notice Interface for contracts that are compatible with the OptimismMintableERC721 standard.
* Tokens that follow this standard can be easily transferred across the ERC721 bridge.
*/
interface IOptimismMintableERC721 is IERC721Enumerable {
/**
* @notice Emitted when a token is minted.
*
* @param account Address of the account the token was minted to.
* @param tokenId Token ID of the minted token.
*/
event Mint(address indexed account, uint256 tokenId);
/**
* @notice Emitted when a token is burned.
*
* @param account Address of the account the token was burned from.
* @param tokenId Token ID of the burned token.
*/
event Burn(address indexed account, uint256 tokenId);
/**
* @notice Mints some token ID for a user, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* @param _to Address of the user to mint the token for.
* @param _tokenId Token ID to mint.
*/
function safeMint(address _to, uint256 _tokenId) external;
/**
* @notice Burns a token ID from a user.
*
* @param _from Address of the user to burn the token from.
* @param _tokenId Token ID to burn.
*/
function burn(address _from, uint256 _tokenId) external;
/**
* @notice Chain ID of the chain where the remote token is deployed.
*/
function REMOTE_CHAIN_ID() external view returns (uint256);
/**
* @notice Address of the token on the remote domain.
*/
function REMOTE_TOKEN() external view returns (address);
/**
* @notice Address of the ERC721 bridge on this network.
*/
function BRIDGE() external view returns (address);
/**
* @notice Chain ID of the chain where the remote token is deployed.
*/
function remoteChainId() external view returns (uint256);
/**
* @notice Address of the token on the remote domain.
*/
function remoteToken() external view returns (address);
/**
* @notice Address of the ERC721 bridge on this network.
*/
function bridge() external view returns (address);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment