Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
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
12 changes: 12 additions & 0 deletions contracts/src/external/HyperdriveTarget0.sol
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,18 @@ abstract contract HyperdriveTarget0 is
_revert(abi.encode(_nonces[account]));
}

/// @notice Returns whether or not an interface is supported.
/// @param interfaceId The ID of the interface.
/// @return A flag indicating whether or not the interface is supported.
function supportsInterface(
bytes4 interfaceId
) external pure returns (bool) {
if (interfaceId == bytes4(0xd9b67a26)) {
Comment thread
jalextowle marked this conversation as resolved.
Outdated
return true;
}
return false;
}

/// Helpers ///

/// @dev Reverts with the provided bytes. This is useful in getters used
Expand Down
6 changes: 1 addition & 5 deletions contracts/src/internal/HyperdriveMultiToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { HyperdriveBase } from "./HyperdriveBase.sol";
/// @notice Implements the MultiToken accounting that Hyperdrive uses to track
/// user's positions. MultiToken maintains a set of balances and
/// approvals for a list of sub-tokens specified by an asset ID. This
/// token is mostly ERC1155 compliant; however, we remove on transfer
/// callbacks and safe transfer because of the risk of external calls to
/// untrusted code.
/// token is ERC1155 compliant.
/// @dev Our architecture maintains ERC20 compatibility by allowing users to
/// access their balances and approvals through ERC20 forwarding contracts
/// deployed by the registered forwarder factory. To ensure that only the
Expand Down Expand Up @@ -141,8 +139,6 @@ abstract contract HyperdriveMultiToken is IHyperdriveEvents, HyperdriveBase {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert IHyperdrive.ERC1155InvalidReceiver();
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert IHyperdrive.ERC1155InvalidReceiver();
}
Expand Down