Skip to content

Commit

Permalink
Adds get token to mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
neokry committed Sep 21, 2023
1 parent b17e75e commit 26034ff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/token/interfaces/IMirrorToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ pragma solidity 0.8.16;
/// @author Neokry
/// @notice A token that allows mirroring another token's ownership
interface IMirrorToken {
/// @notice Mirrors the ownership of a given tokenId from {tokenToMirror}
/// @notice Gets the token address being mirrored
/// @return The token address being mirrored
function getTokenToMirror() external view returns (address);

/// @notice Mirrors the ownership of a given tokenId
/// @param _tokenId The ERC-721 token to mirror
function mirror(uint256 _tokenId) external;
}
3 changes: 2 additions & 1 deletion src/token/partial-mirror/IPartialMirrorToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import { IUUPS } from "../../lib/interfaces/IUUPS.sol";
import { IERC721Votes } from "../../lib/interfaces/IERC721Votes.sol";
import { IManager } from "../../manager/IManager.sol";
import { IBaseToken } from "../interfaces/IBaseToken.sol";
import { IMirrorToken } from "../interfaces/IMirrorToken.sol";
import { PartialMirrorTokenTypesV1 } from "./types/PartialMirrorTokenTypesV1.sol";

/// @title IToken
/// @author Neokry
/// @notice The external Token events, errors and functions
interface IPartialMirrorToken is IUUPS, IERC721Votes, IBaseToken, PartialMirrorTokenTypesV1 {
interface IPartialMirrorToken is IUUPS, IERC721Votes, IBaseToken, IMirrorToken, PartialMirrorTokenTypesV1 {
/// ///
/// EVENTS ///
/// ///
Expand Down
5 changes: 5 additions & 0 deletions src/token/partial-mirror/PartialMirrorToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ contract PartialMirrorToken is IPartialMirrorToken, VersionedContract, UUPS, Own
/// ///
/// Mirror ///
/// ///
/// @notice Gets the token address being mirrored
/// @return The token address being mirrored
function getTokenToMirror() external view override returns (address) {
return tokenToMirror;
}

/// @notice Mirrors the ownership of a given tokenId from the mirrored token
/// @param _tokenId The ERC-721 token to mirror
Expand Down

0 comments on commit 26034ff

Please sign in to comment.