diff --git a/script/DeployAndRedeemTrait.s.sol b/script/DeployAndRedeemTrait.s.sol index 92c5cdb..673021d 100644 --- a/script/DeployAndRedeemTrait.s.sol +++ b/script/DeployAndRedeemTrait.s.sol @@ -63,7 +63,6 @@ contract DeployAndRedeemTrait is Script, Test { traitRedemptions[0] = TraitRedemption({ substandard: 1, token: address(redeemToken), - identifier: 0, // unused field traitKey: traitKey, traitValue: traitValue, substandardValue: substandardValue diff --git a/src/lib/ERC7498NFTRedeemables.sol b/src/lib/ERC7498NFTRedeemables.sol index 149a424..acd41c6 100644 --- a/src/lib/ERC7498NFTRedeemables.sol +++ b/src/lib/ERC7498NFTRedeemables.sol @@ -458,9 +458,7 @@ contract ERC7498NFTRedeemables is IERC165, IERC7498, DynamicTraits, RedeemablesE uint256 newTraitValue = uint256(currentTraitValue) - uint256(traitValue); // Decrement the trait by the trait value. - IERC7496(token).setTrait( - traitRedemptions[i].identifier, traitRedemptions[i].traitKey, bytes32(newTraitValue) - ); + IERC7496(token).setTrait(identifier, traitRedemptions[i].traitKey, bytes32(newTraitValue)); } else if (substandard == 4) { // Revert if the current trait value is not equal to the substandard value. if (currentTraitValue != substandardValue) { diff --git a/src/lib/RedeemablesStructs.sol b/src/lib/RedeemablesStructs.sol index 8b42b27..942a77a 100644 --- a/src/lib/RedeemablesStructs.sol +++ b/src/lib/RedeemablesStructs.sol @@ -21,7 +21,6 @@ struct CampaignRequirements { struct TraitRedemption { uint8 substandard; address token; - uint256 identifier; bytes32 traitKey; bytes32 traitValue; bytes32 substandardValue; diff --git a/test/ERC7498-DynamicTraits.t.sol b/test/ERC7498-DynamicTraits.t.sol index bdb270a..73bd007 100644 --- a/test/ERC7498-DynamicTraits.t.sol +++ b/test/ERC7498-DynamicTraits.t.sol @@ -77,7 +77,6 @@ contract ERC7498_DynamicTraits is BaseRedeemablesTest { traitRedemptions[0] = TraitRedemption({ substandard: 1, token: address(redeemToken), - identifier: 0, // unused field traitKey: traitKey, traitValue: bytes32(uint256(1)), substandardValue: bytes32(uint256(0)) diff --git a/test/RedeemableContractOfferer-1155.t.sol.txt b/test/RedeemableContractOfferer-1155.t.sol.txt index 2568b18..a75ce5c 100644 --- a/test/RedeemableContractOfferer-1155.t.sol.txt +++ b/test/RedeemableContractOfferer-1155.t.sol.txt @@ -1071,7 +1071,6 @@ contract TestRedeemableContractOfferer_1155 is BaseOrderTest, RedeemablesErrors // TraitRedemption memory traitRedemption = TraitRedemption({ // substandard: 0, // set value to traitValue // token: address(dynamicTraitsToken), - // identifier: redeemableTokenId0, // traitKey: "isRedeemed", // traitValue: bytes32(abi.encode(1)), // substandardValue: bytes32(abi.encode(0)) diff --git a/test/RedeemableContractOfferer-721.t.sol.txt b/test/RedeemableContractOfferer-721.t.sol.txt index 0592086..b7defde 100644 --- a/test/RedeemableContractOfferer-721.t.sol.txt +++ b/test/RedeemableContractOfferer-721.t.sol.txt @@ -1022,7 +1022,6 @@ contract TestRedeemableContractOfferer_721 is BaseOrderTest, RedeemablesErrors { // traitRedemption: TraitRedemption({ // substandard: 0, // set value to traitValue // token: address(dynamicTraitsToken), - // identifier: redeemableTokenId0, // traitKey: "isRedeemed", // traitValue: bytes32(abi.encode(1)), // substandardValue: bytes32(abi.encode(0)) @@ -1036,7 +1035,6 @@ contract TestRedeemableContractOfferer_721 is BaseOrderTest, RedeemablesErrors { TraitRedemption memory traitRedemption = TraitRedemption({ substandard: 0, // set value to traitValue token: address(dynamicTraitsToken), - identifier: redeemableTokenId0, traitKey: "isRedeemed", traitValue: bytes32(abi.encode(1)), substandardValue: bytes32(abi.encode(0))