Skip to content

Commit 4f5ffc6

Browse files
authored
Update ERC-6220: fix Import path in EquipRenderUtils.sol
Merged by EIP-Bot.
1 parent 37e4a88 commit 4f5ffc6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

assets/erc-6220/contracts/utils/EquipRenderUtils.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pragma solidity ^0.8.16;
44

55
import "../ICatalog.sol";
6-
import "../IEquippable.sol";
6+
import "../IERC6220.sol";
77
import "../library/EquippableLib.sol";
88

99
error TokenHasNoAssets();
@@ -116,7 +116,7 @@ contract EquipRenderUtils {
116116
virtual
117117
returns (ExtendedActiveAsset[] memory)
118118
{
119-
IEquippable target_ = IEquippable(target);
119+
IERC6220 target_ = IERC6220(target);
120120

121121
uint64[] memory assets = target_.getActiveAssets(tokenId);
122122
uint16[] memory priorities = target_.getActiveAssetPriorities(tokenId);
@@ -180,7 +180,7 @@ contract EquipRenderUtils {
180180
virtual
181181
returns (ExtendedPendingAsset[] memory)
182182
{
183-
IEquippable target_ = IEquippable(target);
183+
IERC6220 target_ = IERC6220(target);
184184

185185
uint64[] memory assets = target_.getPendingAssets(tokenId);
186186
uint256 len = assets.length;
@@ -243,20 +243,20 @@ contract EquipRenderUtils {
243243
view
244244
returns (
245245
uint64[] memory slotPartIds,
246-
IEquippable.Equipment[] memory childrenEquipped
246+
IERC6220.Equipment[] memory childrenEquipped
247247
)
248248
{
249-
IEquippable target_ = IEquippable(target);
249+
IERC6220 target_ = IERC6220(target);
250250

251251
(, , address catalogAddress, uint64[] memory partIds) = target_
252252
.getAssetAndEquippableData(tokenId, assetId);
253253

254254
(slotPartIds, ) = splitSlotAndFixedParts(partIds, catalogAddress);
255-
childrenEquipped = new IEquippable.Equipment[](slotPartIds.length);
255+
childrenEquipped = new IERC6220.Equipment[](slotPartIds.length);
256256

257257
uint256 len = slotPartIds.length;
258258
for (uint256 i; i < len; ) {
259-
IEquippable.Equipment memory equipment = target_.getEquipment(
259+
IERC6220.Equipment memory equipment = target_.getEquipment(
260260
tokenId,
261261
catalogAddress,
262262
slotPartIds[i]
@@ -312,7 +312,7 @@ contract EquipRenderUtils {
312312
EquippedSlotPart[] memory slotParts
313313
)
314314
{
315-
IEquippable target_ = IEquippable(target);
315+
IERC6220 target_ = IERC6220(target);
316316
uint64[] memory partIds;
317317

318318
// If token does not have uint64[] memory slotPartId to save the asset, it would fail here.
@@ -366,15 +366,15 @@ contract EquipRenderUtils {
366366
* childAssetMetadata,
367367
* partMetadata
368368
* ]
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.
370370
* @param tokenId ID of the token for which to retrieve the equipped slot parts
371371
* @param assetId ID of the asset on the token to retrieve the equipped slot parts
372372
* @param catalogAddress The address of the catalog to which the given asset belongs to
373373
* @param slotPartIds An array of slot part IDs in the asset for which to retrieve the equipped slot parts
374374
* @return slotParts An array of `EquippedSlotPart` structs representing the equipped slot parts
375375
*/
376376
function getEquippedSlotParts(
377-
IEquippable target_,
377+
IERC6220 target_,
378378
uint256 tokenId,
379379
uint64 assetId,
380380
address catalogAddress,
@@ -388,13 +388,13 @@ contract EquipRenderUtils {
388388
ICatalog.Part[] memory catalogSlotParts = ICatalog(catalogAddress)
389389
.getParts(slotPartIds);
390390
for (uint256 i; i < len; ) {
391-
IEquippable.Equipment memory equipment = target_.getEquipment(
391+
IERC6220.Equipment memory equipment = target_.getEquipment(
392392
tokenId,
393393
catalogAddress,
394394
slotPartIds[i]
395395
);
396396
if (equipment.assetId == assetId) {
397-
metadata = IEquippable(equipment.childEquippableAddress)
397+
metadata = IERC6220(equipment.childEquippableAddress)
398398
.getAssetMetadata(
399399
equipment.childId,
400400
equipment.childAssetId

0 commit comments

Comments
 (0)