Skip to content

Commit

Permalink
update interface, unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianakocsis committed Jan 10, 2025
1 parent ba6c3cd commit 6f05aaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/interfaces/IPositionDescriptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ interface IPositionDescriptor {
/// @return The wrapped native token for this descriptor
function wrappedNative() external view returns (address);

/// @return The native currency label bytes for this descriptor
function nativeCurrencyLabelBytes() external view returns (bytes32);

/// @return The native currency label for this descriptor
function nativeCurrencyLabel() external view returns (string memory);

Expand Down
5 changes: 5 additions & 0 deletions test/PositionDescriptor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ contract PositionDescriptorTest is Test, PosmTestSetup {
address public TBTC = 0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa;
address public WBTC = 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599;
string public nativeCurrencyLabel = "ETH";
bytes32 public nativeCurrencyLabelBytes = "ETH";

struct Token {
string description;
Expand Down Expand Up @@ -58,6 +59,10 @@ contract PositionDescriptorTest is Test, PosmTestSetup {
function test_setup_succeeds() public view {
assertEq(address(proxyAsImplementation.poolManager()), address(manager));
assertEq(proxyAsImplementation.wrappedNative(), WETH9);
assertEq(proxyAsImplementation.nativeCurrencyLabelBytes(), nativeCurrencyLabelBytes);
}

function test_nativeCurrencyLabel_succeeds() public view {
assertEq(proxyAsImplementation.nativeCurrencyLabel(), nativeCurrencyLabel);
}

Expand Down

0 comments on commit 6f05aaf

Please sign in to comment.