Skip to content

Commit d85e7ff

Browse files
author
Yash Agrawal
committed
feat: add test cases for tokenURI
1 parent 1de3166 commit d85e7ff

File tree

2 files changed

+365
-10
lines changed

2 files changed

+365
-10
lines changed

contracts/SBT.sol

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
124124
string memory attributeInString = string(
125125
abi.encodePacked(
126126
// solhint-disable-next-line quotes
127-
'{"trait_type": "',
127+
'{"trait_type":"',
128128
stringAttributes[i].trait_type,
129129
// solhint-disable-next-line quotes
130130
'",',
131131
// solhint-disable-next-line quotes
132-
' "value": "',
132+
'"value":"',
133133
stringAttributes[i].value,
134134
// solhint-disable-next-line quotes
135135
'"}'
@@ -141,7 +141,7 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
141141
sbtAttributes = attributeInString;
142142
} else {
143143
sbtAttributes = string(
144-
abi.encodePacked(sbtAttributes, ", ", attributeInString)
144+
abi.encodePacked(sbtAttributes, ",", attributeInString)
145145
);
146146
}
147147
}
@@ -150,17 +150,17 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
150150
string memory attributeInString = string(
151151
abi.encodePacked(
152152
// solhint-disable-next-line quotes
153-
'{"trait_type": "',
153+
'{"trait_type":"',
154154
numberAttributes[i].trait_type,
155155
// solhint-disable-next-line quotes
156156
'",',
157157
// solhint-disable-next-line quotes
158-
' "display_type": "',
158+
'"display_type":"',
159159
numberAttributes[i].display_type,
160160
// solhint-disable-next-line quotes
161161
'",',
162162
// solhint-disable-next-line quotes
163-
' "value": "',
163+
'"value":"',
164164
numberAttributes[i].value.toString(),
165165
// solhint-disable-next-line quotes
166166
'"}'
@@ -171,7 +171,7 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
171171
sbtAttributes = attributeInString;
172172
} else {
173173
sbtAttributes = string(
174-
abi.encodePacked(sbtAttributes, ", ", attributeInString)
174+
abi.encodePacked(sbtAttributes, ",", attributeInString)
175175
);
176176
}
177177
}
@@ -188,13 +188,13 @@ contract SBT is ISBT, ERC721EnumerableUpgradeable {
188188
'{"name":"',
189189
name,
190190
// solhint-disable-next-line quotes
191-
'", "description":"',
191+
'","description":"',
192192
description,
193193
// solhint-disable-next-line quotes
194-
'", "image": "',
194+
'","image":"',
195195
tokenUriImage,
196196
// solhint-disable-next-line quotes
197-
'", "attributes":',
197+
'","attributes":',
198198
sbtAttributes,
199199
"}"
200200
)

0 commit comments

Comments
 (0)