Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set baseExtension to .json in constructor #344

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ contract InverseAppProjected1155 is IInverseAppProjected1155, ERC1155Supply, Own
name = _name;
symbol = _symbol;
currentTokenId = 1;
baseExtension = ".json";
}

/// @dev Returns true if this contract implements the interface defined by `interfaceId`. See EIP165.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ contract InverseBaseProjected1155 is IInverseBaseProjected1155, ERC1155Supply, O
name = _name;
symbol = _symbol;
currentTokenId = 1;
baseExtension = ".json";
}

/// @dev Returns true if this contract implements the interface defined by `interfaceId`. See EIP165.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ contract InverseAppProjected1155Test is CTest, ERC1155Holder {
"/",
userTokenId.toString(),
"/",
value.toString()
value.toString(),
".json"
)
);
}
Expand All @@ -158,7 +159,8 @@ contract InverseAppProjected1155Test is CTest, ERC1155Holder {
"/",
userTokenId.toString(),
"/",
value.toString()
value.toString(),
".json"
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ contract InverseBaseProjected1155Test is CTest, ERC1155Holder {
string memory result = token.uri(tokenId);
assertEq(
result,
string.concat(baseURI, "eip155:", block.chainid.toString(), "/", tokenId.toString())
string.concat(
baseURI,
"eip155:",
block.chainid.toString(),
"/",
tokenId.toString(),
".json"
)
);
}

Expand All @@ -111,7 +118,14 @@ contract InverseBaseProjected1155Test is CTest, ERC1155Holder {
string memory result = token.uri(tokenId, customUri);
assertEq(
result,
string.concat(customUri, "eip155:", block.chainid.toString(), "/", tokenId.toString())
string.concat(
customUri,
"eip155:",
block.chainid.toString(),
"/",
tokenId.toString(),
".json"
)
);
}

Expand Down