Skip to content

Commit

Permalink
removed check for claim requirements in crafting
Browse files Browse the repository at this point in the history
  • Loading branch information
dan13ram committed Feb 20, 2024
1 parent ba82099 commit 28c59fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ClassLevelAdaptorTest:testSupportsInterface() (gas: 10580)
ClassesTest:testAssignClass() (gas: 253854)
ClassesTest:testClaimClass() (gas: 135793)
ClassesTest:testCreateClass() (gas: 131486)
ClassesTest:testFuzz_DeLevelClass(uint256) (runs: 256, μ: 389860, ~: 376766)
ClassesTest:testFuzz_DeLevelClass(uint256) (runs: 256, μ: 390917, ~: 376766)
ClassesTest:testLevelClass() (gas: 282246)
ClassesTest:testRenounceClass() (gas: 215492)
ClassesTest:testRevokeClass() (gas: 187712)
Expand Down Expand Up @@ -72,13 +72,13 @@ ItemsTest:testComplexRequirementsClaimRevertWithTooMuchExp() (gas: 1296494)
ItemsTest:testComplexRequirementsClaimWithItem1() (gas: 1338942)
ItemsTest:testComplexRequirementsClaimWithItem1ForShallowNot() (gas: 1293054)
ItemsTest:testComplexRequirementsClaimWithItem2() (gas: 1345370)
ItemsTest:testCraftItem() (gas: 668246)
ItemsTest:testCraftItemRevert() (gas: 476356)
ItemsTest:testCraftItem() (gas: 659057)
ItemsTest:testCraftItemRevert() (gas: 455407)
ItemsTest:testCreateClaimableItem() (gas: 67084)
ItemsTest:testCreateCraftableItem() (gas: 60849)
ItemsTest:testCreateItemTypeRevert() (gas: 63981)
ItemsTest:testDeleteItem() (gas: 207696)
ItemsTest:testDismantleItems() (gas: 1112968)
ItemsTest:testDismantleItems() (gas: 1103779)
ItemsTest:testDropLoot() (gas: 1219494)
ItemsTest:testDropLootRevert() (gas: 234577)
ItemsTest:testInvalidTreeAnd() (gas: 628352)
Expand Down
3 changes: 0 additions & 3 deletions src/implementations/ItemsImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ contract ItemsImplementation is
* @return success bool if crafting is a success return true, else return false
*/
function craftItem(uint256 itemId, uint256 amount) external onlyCharacter returns (bool success) {
if (!itemsManager.checkClaimRequirements(msg.sender, itemId, amount)) {
revert Errors.RequirementNotMet();
}
Item memory item = _items[itemId];

if (itemsManager.craftItem(item, itemId, amount, msg.sender)) {
Expand Down

0 comments on commit 28c59fb

Please sign in to comment.