-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updating tests cases to fit with the new interface 7589/ update…
… Fixture to add new constructor parameter
- Loading branch information
EDUARDO MELO DE SIQUEIRA
authored and
EDUARDO MELO DE SIQUEIRA
committed
Jul 4, 2024
1 parent
6e3e9c9
commit dad6387
Showing
8 changed files
with
456 additions
and
209 deletions.
There are no files selected for viewing
28 changes: 0 additions & 28 deletions
28
contracts/interfaces/ICommitTokensAndGrantRoleExtension.sol
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
contracts/interfaces/IERC7589LockTokensAndGrantRoleExtension.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
pragma solidity 0.8.9; | ||
|
||
/// @title ERC-7589 Semi-Fungible Token Roles, optional lock tokens and grant role extension | ||
/// @dev See https://eips.ethereum.org/EIPS/eip-7589 | ||
/// Note: the ERC-165 identifier for this interface is 0x0a644ace. | ||
interface IERC7589LockTokensAndGrantRoleExtension { | ||
/// @notice Lock tokens and grant role in a single transaction. | ||
/// @param _owner The owner of the tokens. | ||
/// @param _tokenAddress The token address. | ||
/// @param _tokenId The token identifier. | ||
/// @param _tokenAmount The token amount. | ||
/// @param _roleId The role identifier. | ||
/// @param _recipient The recipient the role. | ||
/// @param _expirationDate The expiration date of the role. | ||
/// @param _revocable Whether the role is revocable. | ||
/// @param _data Any additional data about the role. | ||
/// @return lockId_ The identifier of the locked tokens. | ||
function lockTokensAndGrantRole( | ||
address _owner, | ||
address _tokenAddress, | ||
uint256 _tokenId, | ||
uint256 _tokenAmount, | ||
bytes32 _roleId, | ||
address _recipient, | ||
uint64 _expirationDate, | ||
bool _revocable, | ||
bytes calldata _data | ||
) external returns (uint256 lockId_); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
pragma solidity 0.8.9; | ||
|
||
interface IOriumWrapperManager { | ||
/** External Functions **/ | ||
|
||
/// @notice Maps a token to a wrapped token. | ||
/// @param _tokenAddress The token address. | ||
/// @param _wrappedTokenAddress The wrapped token address. | ||
function mapToken(address _tokenAddress, address _wrappedTokenAddress) external; | ||
|
||
/// @notice Unmaps a token (removes association from storage). | ||
/// @param _tokenAddress The token address. | ||
function unmapToken(address _tokenAddress) external; | ||
|
||
/// @notice Sets the maximum duration for a token. | ||
/// @param _tokenAddress The token address. | ||
/// @param _maxDuration The maximum duration. | ||
function setMaxDuration(address _tokenAddress, uint256 _maxDuration) external; | ||
|
||
/// @notice Sets the marketplace address. | ||
/// @param _marketplaceAddress The marketplace address. | ||
function setMarketplaceAddress(address _marketplaceAddress) external; | ||
|
||
/** View Functions **/ | ||
|
||
/// @notice Gets the marketplace address of a token. | ||
/// @param _tokenAddress The token address. | ||
/// @return The marketplace address. | ||
function getMarketplaceAddressOf(address _tokenAddress) external view returns (address); | ||
|
||
/// @notice Gets the wrapped token of a token. | ||
/// @param _tokenAddress The token address. | ||
/// @return The wrapped token address. | ||
function getWrappedTokenOf(address _tokenAddress) external view returns (address); | ||
|
||
/// @notice Gets the original token of a wrapped token. | ||
/// @param _wrappedTokenAddress The wrapped token address. | ||
/// @return The original token address. | ||
function getOriginalTokenOf(address _wrappedTokenAddress) external view returns (address); | ||
|
||
/// @notice Gets the maximum duration of a token. | ||
/// @param _tokenAddress The token address. | ||
/// @return The maximum duration. | ||
function getMaxDurationOf(address _tokenAddress) external view returns (uint256); | ||
} |
Oops, something went wrong.