3
3
pragma solidity ^ 0.8.16 ;
4
4
5
5
import "../ICatalog.sol " ;
6
- import "../IEquippable .sol " ;
6
+ import "../IERC6220 .sol " ;
7
7
import "../library/EquippableLib.sol " ;
8
8
9
9
error TokenHasNoAssets ();
@@ -116,7 +116,7 @@ contract EquipRenderUtils {
116
116
virtual
117
117
returns (ExtendedActiveAsset[] memory )
118
118
{
119
- IEquippable target_ = IEquippable (target);
119
+ IERC6220 target_ = IERC6220 (target);
120
120
121
121
uint64 [] memory assets = target_.getActiveAssets (tokenId);
122
122
uint16 [] memory priorities = target_.getActiveAssetPriorities (tokenId);
@@ -180,7 +180,7 @@ contract EquipRenderUtils {
180
180
virtual
181
181
returns (ExtendedPendingAsset[] memory )
182
182
{
183
- IEquippable target_ = IEquippable (target);
183
+ IERC6220 target_ = IERC6220 (target);
184
184
185
185
uint64 [] memory assets = target_.getPendingAssets (tokenId);
186
186
uint256 len = assets.length ;
@@ -243,20 +243,20 @@ contract EquipRenderUtils {
243
243
view
244
244
returns (
245
245
uint64 [] memory slotPartIds ,
246
- IEquippable .Equipment[] memory childrenEquipped
246
+ IERC6220 .Equipment[] memory childrenEquipped
247
247
)
248
248
{
249
- IEquippable target_ = IEquippable (target);
249
+ IERC6220 target_ = IERC6220 (target);
250
250
251
251
(, , address catalogAddress , uint64 [] memory partIds ) = target_
252
252
.getAssetAndEquippableData (tokenId, assetId);
253
253
254
254
(slotPartIds, ) = splitSlotAndFixedParts (partIds, catalogAddress);
255
- childrenEquipped = new IEquippable .Equipment [](slotPartIds.length );
255
+ childrenEquipped = new IERC6220 .Equipment [](slotPartIds.length );
256
256
257
257
uint256 len = slotPartIds.length ;
258
258
for (uint256 i; i < len; ) {
259
- IEquippable .Equipment memory equipment = target_.getEquipment (
259
+ IERC6220 .Equipment memory equipment = target_.getEquipment (
260
260
tokenId,
261
261
catalogAddress,
262
262
slotPartIds[i]
@@ -312,7 +312,7 @@ contract EquipRenderUtils {
312
312
EquippedSlotPart[] memory slotParts
313
313
)
314
314
{
315
- IEquippable target_ = IEquippable (target);
315
+ IERC6220 target_ = IERC6220 (target);
316
316
uint64 [] memory partIds;
317
317
318
318
// If token does not have uint64[] memory slotPartId to save the asset, it would fail here.
@@ -366,15 +366,15 @@ contract EquipRenderUtils {
366
366
* childAssetMetadata,
367
367
* partMetadata
368
368
* ]
369
- * @param target_ An address of the `IEquippable ` smart contract to retrieve the equipped slot parts from.
369
+ * @param target_ An address of the `IERC6220 ` smart contract to retrieve the equipped slot parts from.
370
370
* @param tokenId ID of the token for which to retrieve the equipped slot parts
371
371
* @param assetId ID of the asset on the token to retrieve the equipped slot parts
372
372
* @param catalogAddress The address of the catalog to which the given asset belongs to
373
373
* @param slotPartIds An array of slot part IDs in the asset for which to retrieve the equipped slot parts
374
374
* @return slotParts An array of `EquippedSlotPart` structs representing the equipped slot parts
375
375
*/
376
376
function getEquippedSlotParts (
377
- IEquippable target_ ,
377
+ IERC6220 target_ ,
378
378
uint256 tokenId ,
379
379
uint64 assetId ,
380
380
address catalogAddress ,
@@ -388,13 +388,13 @@ contract EquipRenderUtils {
388
388
ICatalog.Part[] memory catalogSlotParts = ICatalog (catalogAddress)
389
389
.getParts (slotPartIds);
390
390
for (uint256 i; i < len; ) {
391
- IEquippable .Equipment memory equipment = target_.getEquipment (
391
+ IERC6220 .Equipment memory equipment = target_.getEquipment (
392
392
tokenId,
393
393
catalogAddress,
394
394
slotPartIds[i]
395
395
);
396
396
if (equipment.assetId == assetId) {
397
- metadata = IEquippable (equipment.childEquippableAddress)
397
+ metadata = IERC6220 (equipment.childEquippableAddress)
398
398
.getAssetMetadata (
399
399
equipment.childId,
400
400
equipment.childAssetId
0 commit comments